1a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
2a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * This file was generated automatically by gen-mterp.py for 'armv5te-vfp'.
3a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
4a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * --> DO NOT EDIT <--
5a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
6a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/header.S */
8a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
9a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Copyright (C) 2008 The Android Open Source Project
10a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
11a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Licensed under the Apache License, Version 2.0 (the "License");
12a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * you may not use this file except in compliance with the License.
13a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * You may obtain a copy of the License at
14a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
15a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *      http://www.apache.org/licenses/LICENSE-2.0
16a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
17a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Unless required by applicable law or agreed to in writing, software
18a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * distributed under the License is distributed on an "AS IS" BASIS,
19a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * See the License for the specific language governing permissions and
21a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * limitations under the License.
22a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
23c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden
24a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
25a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * ARMv5 definitions and declarations.
26a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
27a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
28a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
29a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenARM EABI general notes:
30a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
31a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr0-r3 hold first 4 args to a method; they are not preserved across method calls
32a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr4-r8 are available for general use
33a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr9 is given special treatment in some situations, but not for us
34a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr10 (sl) seems to be generally available
35a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr11 (fp) is used by gcc (unless -fomit-frame-pointer is set)
36a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr12 (ip) is scratch -- not preserved across method calls
37a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr13 (sp) should be managed carefully in case a signal arrives
38a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr14 (lr) must be preserved
39a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr15 (pc) can be tinkered with directly
40a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
41a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr0 holds returns of <= 4 bytes
42a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenr0-r1 hold returns of 8 bytes, low word in r0
43a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
44a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenCallee must save/restore r4+ (except r12) if it modifies them.  If VFP
45a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenis present, registers s16-s31 (a/k/a d8-d15, a/k/a q4-q7) must be preserved,
46a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddens0-s15 (d0-d7, q0-a3) do not need to be.
47a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
48a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenStack is "full descending".  Only the arguments that don't fit in the first 4
49a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenregisters are placed on the stack.  "sp" points at the first stacked argument
50a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden(i.e. the 5th arg).
51a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
52a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenVFP: single-precision results in s0, double-precision results in d0.
53a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
54a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenIn the EABI, "sp" must be 64-bit aligned on entry to a function, and any
55a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden64-bit quantities (long long, double) must be 64-bit aligned.
56a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden*/
57a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
58a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
59a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenMterp and ARM notes:
60a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
61a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenThe following registers have fixed assignments:
62a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
63a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden  reg nick      purpose
64a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden  r4  rPC       interpreted program counter, used for fetching instructions
65a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden  r5  rFP       interpreted frame pointer, used for accessing locals and args
669f601a917c8878204482c37aec7005054b6776fabuzbee  r6  rSELF     self (Thread) pointer
671da12167d913efde56ec3b40491524b051679f2cAndy McFadden  r7  rINST     first 16-bit code unit of current instruction
681da12167d913efde56ec3b40491524b051679f2cAndy McFadden  r8  rIBASE    interpreted instruction base pointer, used for computed goto
69a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
70a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenMacros are provided for common operations.  Each macro MUST emit only
71a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenone instruction to make instruction-counting easier.  They MUST NOT alter
72a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddenunspecified registers or condition codes.
73a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden*/
74a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
75a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* single-purpose registers, given names for clarity */
76a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define rPC     r4
77a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define rFP     r5
789f601a917c8878204482c37aec7005054b6776fabuzbee#define rSELF   r6
791da12167d913efde56ec3b40491524b051679f2cAndy McFadden#define rINST   r7
801da12167d913efde56ec3b40491524b051679f2cAndy McFadden#define rIBASE  r8
81a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
829f601a917c8878204482c37aec7005054b6776fabuzbee/* save/restore the PC and/or FP from the thread struct */
839f601a917c8878204482c37aec7005054b6776fabuzbee#define LOAD_PC_FROM_SELF()     ldr     rPC, [rSELF, #offThread_pc]
849f601a917c8878204482c37aec7005054b6776fabuzbee#define SAVE_PC_TO_SELF()       str     rPC, [rSELF, #offThread_pc]
8530bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee#define LOAD_FP_FROM_SELF()     ldr     rFP, [rSELF, #offThread_curFrame]
8630bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee#define SAVE_FP_TO_SELF()       str     rFP, [rSELF, #offThread_curFrame]
879f601a917c8878204482c37aec7005054b6776fabuzbee#define LOAD_PC_FP_FROM_SELF()  ldmia   rSELF, {rPC, rFP}
889f601a917c8878204482c37aec7005054b6776fabuzbee#define SAVE_PC_FP_TO_SELF()    stmia   rSELF, {rPC, rFP}
89a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
90a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
91a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * "export" the PC to the stack frame, f/b/o future exception objects.  Must
9298f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee * be done *before* something throws.
93a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
94a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * In C this is "SAVEAREA_FROM_FP(fp)->xtra.currentPc = pc", i.e.
95a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * fp - sizeof(StackSaveArea) + offsetof(SaveArea, xtra.currentPc)
96a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
97a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * It's okay to do this more than once.
98a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
99a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define EXPORT_PC() \
100a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     rPC, [rFP, #(-sizeofStackSaveArea + offStackSaveArea_currentPc)]
101a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
102a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
103a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Given a frame pointer, find the stack save area.
104a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
105a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * In C this is "((StackSaveArea*)(_fp) -1)".
106a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
107a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define SAVEAREA_FROM_FP(_reg, _fpreg) \
108a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     _reg, _fpreg, #sizeofStackSaveArea
109a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
110a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Fetch the next instruction from rPC into rINST.  Does not advance rPC.
112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define FETCH_INST()            ldrh    rINST, [rPC]
114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
116a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Fetch the next instruction from the specified offset.  Advances rPC
117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * to point to the next instruction.  "_count" is in 16-bit code units.
118a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Because of the limited size of immediate constants on ARM, this is only
120a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * suitable for small forward movements (i.e. don't try to implement "goto"
121a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * with this).
122a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
123a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * This must come AFTER anything that can throw an exception, or the
124a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * exception catch may miss.  (This also implies that it must come after
125a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * EXPORT_PC().)
126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
12724bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden#define FETCH_ADVANCE_INST(_count) ldrh    rINST, [rPC, #((_count)*2)]!
128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
130a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * The operation performed here is similar to FETCH_ADVANCE_INST, except the
131a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * src and dest registers are parameterized (not hard-wired to rPC and rINST).
132a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
133a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define PREFETCH_ADVANCE_INST(_dreg, _sreg, _count) \
13424bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden        ldrh    _dreg, [_sreg, #((_count)*2)]!
135a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
136a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
137a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Fetch the next instruction from an offset specified by _reg.  Updates
138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * rPC to point to the next instruction.  "_reg" must specify the distance
139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * in bytes, *not* 16-bit code units, and may be a signed value.
140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
1419a3147c7412f4794434b4c2604aa2ba784867774buzbee * We want to write "ldrh rINST, [rPC, _reg, lsl #1]!", but some of the
142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * bits that hold the shift distance are used for the half/byte/sign flags.
143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * In some cases we can pre-double _reg for free, so we require a byte offset
144a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * here.
145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
146a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define FETCH_ADVANCE_INST_RB(_reg) ldrh    rINST, [rPC, _reg]!
147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
149a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Fetch a half-word code unit from an offset past the current PC.  The
150a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * "_count" value is in 16-bit code units.  Does not advance rPC.
151a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
152a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * The "_S" variant works the same but treats the value as signed.
153a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
15424bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden#define FETCH(_reg, _count)     ldrh    _reg, [rPC, #((_count)*2)]
15524bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden#define FETCH_S(_reg, _count)   ldrsh   _reg, [rPC, #((_count)*2)]
156a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
157a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
158a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Fetch one byte from an offset past the current PC.  Pass in the same
159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * "_count" as you would for FETCH, and an additional 0/1 indicating which
160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * byte of the halfword you want (lo/hi).
161a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16224bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden#define FETCH_B(_reg, _count, _byte) ldrb     _reg, [rPC, #((_count)*2+(_byte))]
163a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Put the instruction's opcode field into the specified register.
166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define GET_INST_OPCODE(_reg)   and     _reg, rINST, #255
168a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
169a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
170a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Put the prefetched instruction's opcode field into the specified register.
171a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
172a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define GET_PREFETCHED_OPCODE(_oreg, _ireg)   and     _oreg, _ireg, #255
173a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
174a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
175a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Begin executing the opcode in _reg.  Because this only jumps within the
176a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * interpreter, we don't have to worry about pre-ARMv5 THUMB interwork.
177a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
178a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define GOTO_OPCODE(_reg)       add     pc, rIBASE, _reg, lsl #6
1799a3147c7412f4794434b4c2604aa2ba784867774buzbee#define GOTO_OPCODE_BASE(_base,_reg)  add     pc, _base, _reg, lsl #6
180ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#define GOTO_OPCODE_IFEQ(_reg)  addeq   pc, rIBASE, _reg, lsl #6
181ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#define GOTO_OPCODE_IFNE(_reg)  addne   pc, rIBASE, _reg, lsl #6
182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Get/set the 32-bit value from a Dalvik register.
185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define GET_VREG(_reg, _vreg)   ldr     _reg, [rFP, _vreg, lsl #2]
187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define SET_VREG(_reg, _vreg)   str     _reg, [rFP, _vreg, lsl #2]
188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Convert a virtual register index into an address.
191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
192a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define VREG_INDEX_TO_ADDR(_reg, _vreg) \
193a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden        add     _reg, rFP, _vreg, lsl #2
194a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
195a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * This is a #include, not a %include, because we want the C pre-processor
197a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * to expand the macros into assembler assignment statements.
198a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#include "../common/asm-constants.h"
200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2017b133ef7c84e68c3c4042176d830ea5b52e84139Ben Cheng#if defined(WITH_JIT)
2027b133ef7c84e68c3c4042176d830ea5b52e84139Ben Cheng#include "../common/jit-config.h"
2037b133ef7c84e68c3c4042176d830ea5b52e84139Ben Cheng#endif
204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/platform.S */
206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
207a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * ===========================================================================
208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *  CPU-version-specific defines
209a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * ===========================================================================
210a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
211a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
212a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
213c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden * Macro for data memory barrier; not meaningful pre-ARMv6K.
214c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden */
2150890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden.macro  SMP_DMB
216c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.endm
217c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden
2181df319e3674d993a07bc0ff1f56a5915410b5903Andy McFadden/*
2191df319e3674d993a07bc0ff1f56a5915410b5903Andy McFadden * Macro for data memory barrier; not meaningful pre-ARMv6K.
2201df319e3674d993a07bc0ff1f56a5915410b5903Andy McFadden */
2211df319e3674d993a07bc0ff1f56a5915410b5903Andy McFadden.macro  SMP_DMB_ST
2221df319e3674d993a07bc0ff1f56a5915410b5903Andy McFadden.endm
2231df319e3674d993a07bc0ff1f56a5915410b5903Andy McFadden
224a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/entry.S */
225a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Copyright (C) 2008 The Android Open Source Project
227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Licensed under the Apache License, Version 2.0 (the "License");
229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * you may not use this file except in compliance with the License.
230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * You may obtain a copy of the License at
231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *      http://www.apache.org/licenses/LICENSE-2.0
233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
234a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Unless required by applicable law or agreed to in writing, software
235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * distributed under the License is distributed on an "AS IS" BASIS,
236a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * See the License for the specific language governing permissions and
238a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * limitations under the License.
239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Interpreter entry point.
242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
244a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
245a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * We don't have formal stack frames, so gdb scans upward in the code
246a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * to find the start of the function (a label with the %function type),
247a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * and then looks at the next few instructions to figure out what
248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * got pushed onto the stack.  From this it figures out how to restore
249a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * the registers, including PC, for the previous stack frame.  If gdb
250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * sees a non-function label, it stops scanning, so either we need to
251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * have nothing but assembler-local labels between the entry point and
252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * the break, or we need to fake it out.
253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * When this is defined, we add some stuff to make gdb less confused.
255a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
256a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define ASSIST_DEBUGGER 1
257a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .text
259a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .align  2
260a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .global dvmMterpStdRun
261a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .type   dvmMterpStdRun, %function
262a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
263a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
264a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * On entry:
2659f601a917c8878204482c37aec7005054b6776fabuzbee *  r0  Thread* self
266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
2679a3147c7412f4794434b4c2604aa2ba784867774buzbee * The return comes via a call to dvmMterpStdBail().
268a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddendvmMterpStdRun:
270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define MTERP_ENTRY1 \
271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .save {r4-r10,fp,lr}; \
272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r4-r10,fp,lr}         @ save 9 regs
273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#define MTERP_ENTRY2 \
274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .pad    #4; \
275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     sp, sp, #4                  @ align 64
276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .fnstart
278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    MTERP_ENTRY1
279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    MTERP_ENTRY2
280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* save stack pointer, add magic word for debuggerd */
2829f601a917c8878204482c37aec7005054b6776fabuzbee    str     sp, [r0, #offThread_bailPtr]  @ save SP for eventual return
283a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* set up "named" registers, figure out entry point */
2859f601a917c8878204482c37aec7005054b6776fabuzbee    mov     rSELF, r0                   @ set rSELF
2869f601a917c8878204482c37aec7005054b6776fabuzbee    LOAD_PC_FP_FROM_SELF()              @ load rPC and rFP from "thread"
287a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    ldr     rIBASE, [rSELF, #offThread_curHandlerTable] @ set rIBASE
288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
289ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
290d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng.LentryInstr:
291ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    /* Entry is always a possible trace start */
2929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
293ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    FETCH_INST()
2947a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov     r1, #0                      @ prepare the value for the new state
2959f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [rSELF, #offThread_inJitCodeCache] @ back to the interp land
2967a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    cmp     r0,#0                       @ is profiling disabled?
2977a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng#if !defined(WITH_SELF_VERIFICATION)
2987a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    bne     common_updateProfile        @ profiling is enabled
2997a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng#else
3009f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_shadowSpace] @ to find out the jit exit state
3017a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    beq     1f                          @ profiling is disabled
3027a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    ldr     r3, [r2, #offShadowSpace_jitExitState]  @ jit exit state
3037a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    cmp     r3, #kSVSTraceSelect        @ hot trace following?
3047a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    moveq   r2,#kJitTSelectRequestHot   @ ask for trace selection
3057a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    beq     common_selectTrace          @ go build the trace
3067a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    cmp     r3, #kSVSNoProfile          @ don't profile the next instruction?
3077a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    beq     1f                          @ intrepret the next instruction
3087a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    b       common_updateProfile        @ collect profiles
3097a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng#endif
3107a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng1:
311ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)
312ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)
313ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* start executing the instruction at rPC */
315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_INST()                        @ load rINST from rPC
316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
318ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#endif
319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.Lbad_arg:
321a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, strBadEntryPoint
3225dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r0, pc
323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ r1 holds value of entryPoint
324a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      printf
325a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmAbort
326a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .fnend
327b387fe1b970a216c09d2abc98c893ff1fff3e512Andy McFadden    .size   dvmMterpStdRun, .-dvmMterpStdRun
328a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3295dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrBadEntryPoint:
3305dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrBadEntryPoint,0b)
331a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
332a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .global dvmMterpStdBail
333a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .type   dvmMterpStdBail, %function
334a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
335a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
336a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Restore the stack pointer and PC from the save point established on entry.
337a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * This is essentially the same as a longjmp, but should be cheaper.  The
338a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * last instruction causes us to return to whoever called dvmMterpStdRun.
339a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
340a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * We pushed some registers on the stack in dvmMterpStdRun, then saved
341a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * SP and LR.  Here we restore SP, restore the registers, and then restore
342a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * LR to PC.
343a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
344a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * On entry:
3459f601a917c8878204482c37aec7005054b6776fabuzbee *  r0  Thread* self
346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddendvmMterpStdBail:
3489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     sp, [r0, #offThread_bailPtr]    @ sp<- saved SP
349a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     sp, sp, #4                      @ un-align 64
350d88756df5b4dbc6fd450afd0019a5f64ebe4432dElliott Hughes    ldmfd   sp!, {r4-r10,fp,pc}             @ restore 9 regs and return
351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
353a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
354a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .global dvmAsmInstructionStart
355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .type   dvmAsmInstructionStart, %function
356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddendvmAsmInstructionStart = .L_OP_NOP
357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .text
358a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
361a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NOP: /* 0x00 */
362a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NOP.S */
363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance to next instr, load rINST
364a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
365a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ execute it
366a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#ifdef ASSIST_DEBUGGER
368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* insert fake function header to help gdb find the stack frame */
369a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .type   dalvik_inst, %function
370a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddendalvik_inst:
371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .fnstart
372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    MTERP_ENTRY1
373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    MTERP_ENTRY2
374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .fnend
375a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#endif
376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE: /* 0x01 */
380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE.S */
381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for move, move-object, long-to-int */
382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB */
383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B from 15:12
384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A from 11:8
385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[B]
387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r0)                    @ fp[A]<- r2
390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ execute next instruction
391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_FROM16: /* 0x02 */
395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_FROM16.S */
396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for: move/from16, move-object/from16 */
397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBBBB */
398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[BBBB]
402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r0)                    @ fp[AA]<- r2
404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_16: /* 0x03 */
409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_16.S */
410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for: move/16, move-object/16 */
411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAAAA, vBBBB */
412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB
413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- AAAA
414a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[BBBB]
416a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
418a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_WIDE: /* 0x04 */
423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_WIDE.S */
424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* move-wide vA, vB */
425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* NOTE: regs can overlap, e.g. "move v6,v7" or "move v7,v6" */
426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- A(+)
427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15
429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[B]
430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[A]
431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- fp[B]
432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
437a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
439a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_WIDE_FROM16: /* 0x05 */
440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_WIDE_FROM16.S */
441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* move-wide/from16 vAA, vBBBB */
442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* NOTE: regs can overlap, e.g. "move v6,v7" or "move v7,v6" */
443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r3, 1)                        @ r3<- BBBB
444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
445a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[BBBB]
446a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[AA]
447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- fp[BBBB]
448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_WIDE_16: /* 0x06 */
456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_WIDE_16.S */
457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* move-wide/16 vAAAA, vBBBB */
458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* NOTE: regs can overlap, e.g. "move v6,v7" or "move v7,v6" */
459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r3, 2)                        @ r3<- BBBB
460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r2, 1)                        @ r2<- AAAA
461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[BBBB]
462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[AAAA]
463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- fp[BBBB]
464445194bc141dc67e2f678aa1bbd5e59ca66254e5Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r2, {r0-r1}                 @ fp[AAAA]<- r0/r1
467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_OBJECT: /* 0x07 */
472a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_OBJECT.S */
473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE.S */
474a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for move, move-object, long-to-int */
475a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB */
476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B from 15:12
477a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A from 11:8
478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
479a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[B]
480a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
481a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
482a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r0)                    @ fp[A]<- r2
483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ execute next instruction
484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_OBJECT_FROM16: /* 0x08 */
489a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_OBJECT_FROM16.S */
490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_FROM16.S */
491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for: move/from16, move-object/from16 */
492a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBBBB */
493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[BBBB]
497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r0)                    @ fp[AA]<- r2
499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
501a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_OBJECT_16: /* 0x09 */
505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_OBJECT_16.S */
506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_16.S */
507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for: move/16, move-object/16 */
508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAAAA, vBBBB */
509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB
510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- AAAA
511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[BBBB]
513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
517a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_RESULT: /* 0x0a */
521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_RESULT.S */
522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for: move-result, move-result-object */
523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA */
524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5269f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_retval]    @ r0<- self->retval.i
527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r2)                    @ fp[AA]<- r0
529a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_RESULT_WIDE: /* 0x0b */
534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_RESULT_WIDE.S */
535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* move-result-wide vAA */
536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
5379f601a917c8878204482c37aec7005054b6776fabuzbee    add     r3, rSELF, #offThread_retval  @ r3<- &self->retval
538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[AA]
539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- retval.j
540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
542a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
544a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
545a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
546a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
547a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_RESULT_OBJECT: /* 0x0c */
548a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_RESULT_OBJECT.S */
549a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_RESULT.S */
550a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for: move-result, move-result-object */
551a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA */
552a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
553a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5549f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_retval]    @ r0<- self->retval.i
555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r2)                    @ fp[AA]<- r0
557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MOVE_EXCEPTION: /* 0x0d */
563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE_EXCEPTION.S */
564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* move-exception vAA */
565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
5669f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_exception]  @ r3<- dvmGetException bypass
567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, #0                      @ r1<- 0
568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r3, r2)                    @ fp[AA]<- exception obj
570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5719f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [rSELF, #offThread_exception]  @ dvmClearException bypass
572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
576a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_RETURN_VOID: /* 0x0e */
577a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_RETURN_VOID.S */
578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_returnFromMethod
579a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
581a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_RETURN: /* 0x0f */
583a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_RETURN.S */
584a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5859f601a917c8878204482c37aec7005054b6776fabuzbee     * Return a 32-bit value.  Copies the return value into the "thread"
586a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * structure, then jumps to the return handler.
587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: return, return-object
589a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA */
591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vAA
5939f601a917c8878204482c37aec7005054b6776fabuzbee    str     r0, [rSELF, #offThread_retval] @ retval.i <- vAA
594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_returnFromMethod
595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_RETURN_WIDE: /* 0x10 */
599a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_RETURN_WIDE.S */
600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6019f601a917c8878204482c37aec7005054b6776fabuzbee     * Return a 64-bit value.  Copies the return value into the "thread"
602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * structure, then jumps to the return handler.
603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* return-wide vAA */
605a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[AA]
6079f601a917c8878204482c37aec7005054b6776fabuzbee    add     r3, rSELF, #offThread_retval  @ r3<- &self->retval
608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1 <- vAA/vAA+1
609a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r3, {r0-r1}                 @ retval<- r0/r1
610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_returnFromMethod
611a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
612a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
614a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_RETURN_OBJECT: /* 0x11 */
615a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_RETURN_OBJECT.S */
616a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_RETURN.S */
617a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6189f601a917c8878204482c37aec7005054b6776fabuzbee     * Return a 32-bit value.  Copies the return value into the "thread"
619a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * structure, then jumps to the return handler.
620a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
621a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: return, return-object
622a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
623a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA */
624a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
625a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vAA
6269f601a917c8878204482c37aec7005054b6776fabuzbee    str     r0, [rSELF, #offThread_retval] @ retval.i <- vAA
627a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_returnFromMethod
628a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
630a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_4: /* 0x12 */
633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_4.S */
634a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const/4 vA, #+B */
635a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsl #16          @ r1<- Bxxx0000
636a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A+
637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r1, asr #28             @ r1<- sssssssB (sign-extended)
639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r0)                    @ fp[A]<- r1
642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ execute next instruction
643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
646a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_16: /* 0x13 */
647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_16.S */
648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const/16 vAA, #+BBBB */
649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r0, 1)                      @ r0<- ssssBBBB (sign-extended)
650a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
651a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r3)                    @ vAA<- r0
653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
654a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
655a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
656a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
657a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
658a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST: /* 0x14 */
659a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST.S */
660a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const vAA, #+BBBBbbbb */
661a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- bbbb (low)
663a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB (high)
664a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
665a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, lsl #16         @ r0<- BBBBbbbb
666a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r3)                    @ vAA<- r0
668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_HIGH16: /* 0x15 */
673a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_HIGH16.S */
674a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const/high16 vAA, #+BBBB0000 */
675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- 0000BBBB (zero-extended)
676a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsl #16             @ r0<- BBBB0000
678a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
679a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r3)                    @ vAA<- r0
680a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
681a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
682a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
683a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
684a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
685a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_WIDE_16: /* 0x16 */
686a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_WIDE_16.S */
687a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const-wide/16 vAA, #+BBBB */
688a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r0, 1)                      @ r0<- ssssBBBB (sign-extended)
689a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
690a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r0, asr #31             @ r1<- ssssssss
691a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
692a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[AA]
693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
694a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r3, {r0-r1}                 @ vAA<- r0/r1
695a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_WIDE_32: /* 0x17 */
700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_WIDE_32.S */
701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const-wide/32 vAA, #+BBBBbbbb */
702a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- 0000bbbb (low)
703a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r2, 2)                      @ r2<- ssssBBBB (high)
705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r2, lsl #16         @ r0<- BBBBbbbb
707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[AA]
708a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r0, asr #31             @ r1<- ssssssss
709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
710a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r3, {r0-r1}                 @ vAA<- r0/r1
711a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
712a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
713a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
714a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
715a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_WIDE: /* 0x18 */
716a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_WIDE.S */
717a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const-wide vAA, #+HHHHhhhhBBBBbbbb */
718a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- bbbb (low)
719a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB (low middle)
720a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r2, 3)                        @ r2<- hhhh (high middle)
721a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, lsl #16         @ r0<- BBBBbbbb (low word)
722a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r3, 4)                        @ r3<- HHHH (high)
723a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r1, r2, r3, lsl #16         @ r1<- HHHHhhhh (high word)
725a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(5)               @ advance rPC, load rINST
726a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vAA<- r0/r1
729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_WIDE_HIGH16: /* 0x19 */
734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_WIDE_HIGH16.S */
735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const-wide/high16 vAA, #+BBBB000000000000 */
736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- 0000BBBB (zero-extended)
737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, #0                      @ r0<- 00000000
739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r1, lsl #16             @ r1<- BBBB0000
740a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[AA]
742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
743a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r3, {r0-r1}                 @ vAA<- r0/r1
744a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
745a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
746a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
747a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
748a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_STRING: /* 0x1a */
749a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_STRING.S */
750a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const/string vAA, String@BBBB */
751a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
7529f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]  @ r2<- self->methodClassDex
753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
754a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offDvmDex_pResStrings]   @ r2<- dvmDex->pResStrings
755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- pResStrings[BBBB]
756a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ not yet resolved?
757a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_CONST_STRING_resolve
758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
759a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
760a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_STRING_JUMBO: /* 0x1b */
766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_STRING_JUMBO.S */
767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const/string vAA, String@BBBBBBBB */
768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- bbbb (low)
769a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB (high)
7709f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]  @ r2<- self->methodClassDex
771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
772a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offDvmDex_pResStrings]   @ r2<- dvmDex->pResStrings
773a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r1, r0, r1, lsl #16         @ r1<- BBBBbbbb
774a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- pResStrings[BBBB]
775a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
776a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_CONST_STRING_JUMBO_resolve
777a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
778a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
779a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
780a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
781a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
782a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
783a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
784a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CONST_CLASS: /* 0x1c */
785a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CONST_CLASS.S */
786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* const/class vAA, Class@BBBB */
787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
7889f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]  @ r2<- self->methodClassDex
789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
790a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offDvmDex_pResClasses]   @ r2<- dvmDex->pResClasses
791a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- pResClasses[BBBB]
792a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ not yet resolved?
793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_CONST_CLASS_resolve
794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
797a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
799a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MONITOR_ENTER: /* 0x1d */
802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MONITOR_ENTER.S */
803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
804a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Synchronize on an object.
805a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* monitor-enter vAA */
807a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
808a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- vAA (object)
8099f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ r0<- self
810a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ null object?
81101605d2b668e8e1701cfdfa302dde847b9171fc9Carl Shapiro    EXPORT_PC()                         @ need for precise GC
812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ null object, throw an exception
813a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
814a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmLockObject               @ call(self, obj)
815a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
816a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
817a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
818a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
819a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
820a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MONITOR_EXIT: /* 0x1e */
821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MONITOR_EXIT.S */
822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
823a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Unlock an object.
824a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
825a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Exceptions that occur when unlocking a monitor need to appear as
826a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * if they happened at the following instruction.  See the Dalvik
827a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instruction spec.
828a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
829a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* monitor-exit vAA */
830a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
831a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ before fetch: export the PC
832a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- vAA (object)
833a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ null object?
8346bbdd6b005ec5cb567ec9576190a7cd784248c5cBill Buzbee    beq     1f                          @ yes
8359f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ r0<- self
836a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmUnlockObject             @ r0<- success for unlock(self, obj)
837a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ failed?
838a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ before throw: advance rPC, load rINST
8396bbdd6b005ec5cb567ec9576190a7cd784248c5cBill Buzbee    beq     common_exceptionThrown      @ yes, exception is pending
840a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
8426bbdd6b005ec5cb567ec9576190a7cd784248c5cBill Buzbee1:
8436bbdd6b005ec5cb567ec9576190a7cd784248c5cBill Buzbee    FETCH_ADVANCE_INST(1)               @ advance before throw
8446bbdd6b005ec5cb567ec9576190a7cd784248c5cBill Buzbee    b      common_errNullObject
845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
846a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CHECK_CAST: /* 0x1f */
849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CHECK_CAST.S */
850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
851a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Check to see if a cast from one class to another is allowed.
852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* check-cast vAA, class@BBBB */
854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r2, 1)                        @ r2<- BBBB
856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r3)                    @ r9<- object
8579f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_methodClassDex]    @ r0<- pDvmDex
858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r9, #0                      @ is object null?
859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r0, #offDvmDex_pResClasses]    @ r0<- pDvmDex->pResClasses
860a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_CHECK_CAST_okay            @ null obj, cast always succeeds
861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, r2, lsl #2]        @ r1<- resolved class
862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r9, #offObject_clazz]  @ r0<- obj->clazz
863a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ have we resolved this before?
864a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_CHECK_CAST_resolve         @ not resolved, do it now
865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_CHECK_CAST_resolved:
866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, r1                      @ same class (trivial success)?
867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_CHECK_CAST_fullcheck       @ no, do full check
868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_CHECK_CAST_okay:
869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
874a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
875a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INSTANCE_OF: /* 0x20 */
876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INSTANCE_OF.S */
877a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Check to see if an object reference is an instance of a class.
879a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
880a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Most common situation is a non-null object, being compared against
881a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an already-resolved class.
882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
883a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* instance-of vA, vB, class@CCCC */
884a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
886a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB (object)
887a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
888a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is object null?
8899f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- pDvmDex
890a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_INSTANCE_OF_store           @ null obj, not an instance, store r0
891a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r3, 1)                        @ r3<- CCCC
892a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offDvmDex_pResClasses]    @ r2<- pDvmDex->pResClasses
893a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r2, r3, lsl #2]        @ r1<- resolved class
894a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
895a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ have we resolved this before?
896a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_INSTANCE_OF_resolve         @ not resolved, do it now
897a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_INSTANCE_OF_resolved: @ r0=obj->clazz, r1=resolved class
898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, r1                      @ same class (trivial success)?
899a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_INSTANCE_OF_trivial         @ yes, trivial finish
900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_INSTANCE_OF_fullcheck       @ no, do full check
901a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
902a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
903a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
904a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ARRAY_LENGTH: /* 0x21 */
905a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_ARRAY_LENGTH.S */
906a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
907a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Return the length of an array.
908a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
909a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
910a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- A+
911a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r1)                    @ r0<- vB (object ref)
912a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15                 @ r2<- A
913a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is object null?
914a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yup, fail
915a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
916a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- array length
917a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
918a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r3, r2)                    @ vB<- length
919a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
920a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
921a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
923a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NEW_INSTANCE: /* 0x22 */
924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NEW_INSTANCE.S */
925a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
926a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Create a new instance of a class.
927a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
928a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* new-instance vAA, class@BBBB */
9299f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
930a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
931a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResClasses]    @ r3<- pDvmDex->pResClasses
932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved class
9339a3147c7412f4794434b4c2604aa2ba784867774buzbee#if defined(WITH_JIT)
9349a3147c7412f4794434b4c2604aa2ba784867774buzbee    add     r10, r3, r1, lsl #2         @ r10<- &resolved_class
9359a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
936a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ req'd for init, resolve, alloc
937a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
938a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_NEW_INSTANCE_resolve         @ no, resolve it now
939a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_NEW_INSTANCE_resolved:   @ r0=class
940a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldrb    r1, [r0, #offClassObject_status]    @ r1<- ClassStatus enum
941a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #CLASS_INITIALIZED      @ has class been initialized?
942a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_NEW_INSTANCE_needinit        @ no, init class now
943a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_NEW_INSTANCE_initialized: @ r0=class
944a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, #ALLOC_DONT_TRACK       @ flags for alloc call
945a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmAllocObject              @ r0<- new object
946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_NEW_INSTANCE_finish          @ continue
947a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NEW_ARRAY: /* 0x23 */
951a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NEW_ARRAY.S */
952a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
953a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Allocate an array of objects, specified with the array class
954a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * and a count.
955a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
956a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * The verifier guarantees that this is an array class, so we don't
957a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * check for it here.
958a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
959a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* new-array vA, vB, class@CCCC */
960a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
961a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r2, 1)                        @ r2<- CCCC
9629f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
963a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r0)                    @ r1<- vB (array length)
964a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResClasses]    @ r3<- pDvmDex->pResClasses
965a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ check length
966a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r2, lsl #2]        @ r0<- resolved class
9678cb0d098d79af61546e275f633325794f4587602buzbee    bmi     common_errNegativeArraySize @ negative length, bail - len in r1
968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
969a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ req'd for resolve, alloc
970a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_NEW_ARRAY_finish          @ resolved, continue
971a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_NEW_ARRAY_resolve         @ do resolve now
972a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
974a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
975a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_FILLED_NEW_ARRAY: /* 0x24 */
976a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_FILLED_NEW_ARRAY.S */
977a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
978a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Create a new array with elements filled from registers.
979a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
980a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: filled-new-array, filled-new-array/range
981a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
982a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
983a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, type@BBBB */
9849f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
985a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
986a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResClasses]    @ r3<- pDvmDex->pResClasses
987a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ need for resolve and alloc
988a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved class
989a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r10, rINST, lsr #8          @ r10<- AA or BA
990a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
991a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_FILLED_NEW_ARRAY_continue        @ yes, continue on
9929f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
993a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, #0                      @ r2<- false
994a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
995a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveClass             @ r0<- call(clazz, ref)
996a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ got null?
997a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_exceptionThrown      @ yes, handle exception
998a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_FILLED_NEW_ARRAY_continue
999a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1000a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1001a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1002a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_FILLED_NEW_ARRAY_RANGE: /* 0x25 */
1003a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_FILLED_NEW_ARRAY_RANGE.S */
1004a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_FILLED_NEW_ARRAY.S */
1005a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1006a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Create a new array with elements filled from registers.
1007a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1008a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: filled-new-array, filled-new-array/range
1009a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1010a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
1011a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, type@BBBB */
10129f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
1013a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
1014a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResClasses]    @ r3<- pDvmDex->pResClasses
1015a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ need for resolve and alloc
1016a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved class
1017a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r10, rINST, lsr #8          @ r10<- AA or BA
1018a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
1019a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_FILLED_NEW_ARRAY_RANGE_continue        @ yes, continue on
10209f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
1021a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, #0                      @ r2<- false
1022a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
1023a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveClass             @ r0<- call(clazz, ref)
1024a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ got null?
1025a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_exceptionThrown      @ yes, handle exception
1026a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_FILLED_NEW_ARRAY_RANGE_continue
1027a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1028a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1029a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1030a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1031a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_FILL_ARRAY_DATA: /* 0x26 */
1032a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_FILL_ARRAY_DATA.S */
1033a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* fill-array-data vAA, +BBBBBBBB */
1034a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- bbbb (lo)
1035a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB (hi)
1036a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
1037a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r1, r0, r1, lsl #16         @ r1<- BBBBbbbb
1038a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vAA (array object)
1039a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rPC, r1, lsl #1         @ r1<- PC + BBBBbbbb*2 (array data off.)
1040a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC();
1041a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmInterpHandleFillArrayData@ fill the array with predefined data
1042a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ 0 means an exception is thrown
1043a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_exceptionThrown      @ has exception
1044a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
1045a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1046a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1047a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1048a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1049a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1050a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_THROW: /* 0x27 */
1051a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_THROW.S */
1052a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1053a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Throw an exception object in the current thread.
1054a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1055a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* throw vAA */
1056a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
1057a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- vAA (exception object)
10588ba2708ea118381f2df5ca55b9bad2ae4c050504Andy McFadden    EXPORT_PC()                         @ exception handler can throw
1059a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ null object?
1060a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, throw an NPE instead
1061a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ bypass dvmSetException, just store it
10629f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [rSELF, #offThread_exception]  @ thread->exception<- obj
1063a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
1064a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1065a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1066a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1067a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_GOTO: /* 0x28 */
1068a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_GOTO.S */
1069a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1070a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Unconditional branch, 8-bit offset.
1071a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1072a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * The branch distance is a signed code-unit offset, which we need to
1073a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * double to get a byte offset.
1074a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1075a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* goto +AA */
10769a3147c7412f4794434b4c2604aa2ba784867774buzbee    /* tuning: use sbfx for 6t2+ targets */
1077a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsl #16          @ r0<- AAxx0000
10789a3147c7412f4794434b4c2604aa2ba784867774buzbee    movs    r1, r0, asr #24             @ r1<- ssssssAA (sign-extended)
10799a3147c7412f4794434b4c2604aa2ba784867774buzbee    add     r2, r1, r1                  @ r2<- byte offset, set flags
10809a3147c7412f4794434b4c2604aa2ba784867774buzbee       @ If backwards branch refresh rIBASE
10819a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
10829a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r2)           @ update rPC, load rINST
1083ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
10849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
10859a3147c7412f4794434b4c2604aa2ba784867774buzbee    bmi     common_testUpdateProfile    @ (r0) check for trace hotness
10869a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1087ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1088ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
1089a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1090a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1091a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1092a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_GOTO_16: /* 0x29 */
1093a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_GOTO_16.S */
1094a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1095a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Unconditional branch, 16-bit offset.
1096a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1097a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * The branch distance is a signed code-unit offset, which we need to
1098a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * double to get a byte offset.
1099a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1100a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* goto/16 +AAAA */
1101a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r0, 1)                      @ r0<- ssssAAAA (sign-extended)
11029a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r0, r0                  @ r1<- byte offset, flags set
11039a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
11049a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
1105ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
11069a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
11079a3147c7412f4794434b4c2604aa2ba784867774buzbee    bmi     common_testUpdateProfile    @ (r0) hot trace head?
11089a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1109a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1110a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_GOTO_32: /* 0x2a */
1115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_GOTO_32.S */
1116a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Unconditional branch, 32-bit offset.
1118a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * The branch distance is a signed code-unit offset, which we need to
1120a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * double to get a byte offset.
1121a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1122a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Unlike most opcodes, this one is allowed to branch to itself, so
11239a3147c7412f4794434b4c2604aa2ba784867774buzbee     * our "backward branch" test must be "<=0" instead of "<0".  Because
11249a3147c7412f4794434b4c2604aa2ba784867774buzbee     * we need the V bit set, we'll use an adds to convert from Dalvik
11259a3147c7412f4794434b4c2604aa2ba784867774buzbee     * offset to byte offset.
1126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1127a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* goto/32 +AAAAAAAA */
1128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- aaaa (lo)
1129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- AAAA (hi)
11309a3147c7412f4794434b4c2604aa2ba784867774buzbee    orr     r0, r0, r1, lsl #16         @ r0<- AAAAaaaa
11319a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r0, r0                  @ r1<- byte offset
1132ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
11339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
11349a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrle   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
11359a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
11369a3147c7412f4794434b4c2604aa2ba784867774buzbee    ble     common_testUpdateProfile    @ (r0) hot trace head?
1137ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
11389a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
11399a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrle   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
11409a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1141ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1142ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
1143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1144a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1146a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_PACKED_SWITCH: /* 0x2b */
1147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_PACKED_SWITCH.S */
1148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1149a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a packed-switch or sparse-switch instruction.  In both cases
1150a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * we decode it and hand it off to a helper function.
1151a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1152a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * We don't really expect backward branches in a switch statement, but
1153a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * they're perfectly legal, so we check for them here.
1154a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
11559a3147c7412f4794434b4c2604aa2ba784867774buzbee     * When the JIT is present, all targets are considered treated as
11569a3147c7412f4794434b4c2604aa2ba784867774buzbee     * a potential trace heads regardless of branch direction.
11579a3147c7412f4794434b4c2604aa2ba784867774buzbee     *
1158a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: packed-switch, sparse-switch
1159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, +BBBB */
1161a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- bbbb (lo)
1162a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB (hi)
1163a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
1164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, lsl #16         @ r0<- BBBBbbbb
1165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vAA
1166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, rPC, r0, lsl #1         @ r0<- PC + BBBBbbbb*2
1167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmInterpHandlePackedSwitch                       @ r0<- code-unit branch offset
11689a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r0, r0                  @ r1<- byte offset; clear V
1169ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
11709a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
11719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrle   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
11729a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
11739a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0, #0
1174ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bne     common_updateProfile
1175ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
11769a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrle   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
11779a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
11789a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1179a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1180a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1181a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPARSE_SWITCH: /* 0x2c */
1185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPARSE_SWITCH.S */
1186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_PACKED_SWITCH.S */
1187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a packed-switch or sparse-switch instruction.  In both cases
1189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * we decode it and hand it off to a helper function.
1190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * We don't really expect backward branches in a switch statement, but
1192a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * they're perfectly legal, so we check for them here.
1193a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
11949a3147c7412f4794434b4c2604aa2ba784867774buzbee     * When the JIT is present, all targets are considered treated as
11959a3147c7412f4794434b4c2604aa2ba784867774buzbee     * a potential trace heads regardless of branch direction.
11969a3147c7412f4794434b4c2604aa2ba784867774buzbee     *
1197a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: packed-switch, sparse-switch
1198a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, +BBBB */
1200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- bbbb (lo)
1201a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- BBBB (hi)
1202a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ r3<- AA
1203a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, lsl #16         @ r0<- BBBBbbbb
1204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vAA
1205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, rPC, r0, lsl #1         @ r0<- PC + BBBBbbbb*2
1206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmInterpHandleSparseSwitch                       @ r0<- code-unit branch offset
12079a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r0, r0                  @ r1<- byte offset; clear V
1208ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
12099a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
12109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrle   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
12119a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
12129a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0, #0
1213ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bne     common_updateProfile
1214ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
12159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrle   rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh handler base
12169a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
12179a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1218ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1219ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
1220a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1221a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1223a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1224a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CMPL_FLOAT: /* 0x2d */
1225968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_CMPL_FLOAT.S */
1226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Compare two floating-point values.  Puts 0, 1, or -1 into the
1228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * destination register based on the results of the comparison.
1229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * int compare(x, y) {
1231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     if (x == y) {
1232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 0;
1233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x > y) {
1234a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 1;
1235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x < y) {
1236a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return -1;
1237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else {
1238a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return -1;
1239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     }
1240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * }
1241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
1243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
12448fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1245a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
1246a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
12478fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
1248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
12498fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    flds    s0, [r2]                    @ s0<- vBB
1250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s1, [r3]                    @ s1<- vCC
1251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fcmpes  s0, s1                      @ compare (vBB, vCC)
1252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
1253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mvn     r0, #0                      @ r0<- -1 (default)
1254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1255a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmstat                              @ export status flags
1256a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movgt   r0, #1                      @ (greater than) r1<- 1
1257a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    moveq   r0, #0                      @ (equal) r1<- 0
12588fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    b       .LOP_CMPL_FLOAT_finish          @ argh
1259a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1260a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1261a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1262a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1263a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CMPG_FLOAT: /* 0x2e */
1264968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_CMPG_FLOAT.S */
1265a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Compare two floating-point values.  Puts 0, 1, or -1 into the
1267a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * destination register based on the results of the comparison.
1268a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * int compare(x, y) {
1270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     if (x == y) {
1271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 0;
1272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x < y) {
1273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return -1;
1274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x > y) {
1275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 1;
1276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else {
1277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 1;
1278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     }
1279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * }
1280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
1282a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
12838fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
1285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
12868fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
1287a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
12888fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    flds    s0, [r2]                    @ s0<- vBB
1289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s1, [r3]                    @ s1<- vCC
1290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fcmpes  s0, s1                      @ compare (vBB, vCC)
1291a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
1292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, #1                      @ r0<- 1 (default)
1293a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1294a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmstat                              @ export status flags
1295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mvnmi   r0, #0                      @ (less than) r1<- -1
1296a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    moveq   r0, #0                      @ (equal) r1<- 0
12978fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    b       .LOP_CMPG_FLOAT_finish          @ argh
1298a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1299a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1300a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1301a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1302a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CMPL_DOUBLE: /* 0x2f */
1303968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_CMPL_DOUBLE.S */
1304a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1305a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Compare two floating-point values.  Puts 0, 1, or -1 into the
1306a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * destination register based on the results of the comparison.
1307a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1308a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * int compare(x, y) {
1309a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     if (x == y) {
1310a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 0;
1311a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x > y) {
1312a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 1;
1313a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x < y) {
1314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return -1;
1315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else {
1316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return -1;
1317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     }
1318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * }
1319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
1321a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
13228fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
1324a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
13258fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
1326a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
13278fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    fldd    d0, [r2]                    @ d0<- vBB
1328a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d1, [r3]                    @ d1<- vCC
1329a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fcmped  d0, d1                      @ compare (vBB, vCC)
1330a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
1331a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mvn     r0, #0                      @ r0<- -1 (default)
1332a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1333a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmstat                              @ export status flags
1334a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movgt   r0, #1                      @ (greater than) r1<- 1
1335a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    moveq   r0, #0                      @ (equal) r1<- 0
13368fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    b       .LOP_CMPL_DOUBLE_finish          @ argh
1337a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1338a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1339a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1340a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1341a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CMPG_DOUBLE: /* 0x30 */
1342968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_CMPG_DOUBLE.S */
1343a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1344a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Compare two floating-point values.  Puts 0, 1, or -1 into the
1345a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * destination register based on the results of the comparison.
1346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * int compare(x, y) {
1348a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     if (x == y) {
1349a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 0;
1350a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x < y) {
1351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return -1;
1352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else if (x > y) {
1353a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 1;
1354a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     } else {
1355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *         return 1;
1356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     }
1357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * }
1358a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
1360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
13618fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1362a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
1363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
13648fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
1365a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
13668fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    fldd    d0, [r2]                    @ d0<- vBB
1367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d1, [r3]                    @ d1<- vCC
1368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fcmped  d0, d1                      @ compare (vBB, vCC)
1369a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
1370a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, #1                      @ r0<- 1 (default)
1371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmstat                              @ export status flags
1373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mvnmi   r0, #0                      @ (less than) r1<- -1
1374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    moveq   r0, #0                      @ (equal) r1<- 0
13758fd923e066208c4bbebe5677cac4d11a629bac1bAndy McFadden    b       .LOP_CMPG_DOUBLE_finish          @ argh
1376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_CMP_LONG: /* 0x31 */
1381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_CMP_LONG.S */
1382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Compare two 64-bit values.  Puts 0, 1, or -1 into the destination
1384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * register based on the results of the comparison.
1385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * We load the full values with LDM, but in practice many values could
1387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * be resolved by only looking at the high word.  This could be made
1388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * faster or slower by splitting the LDM into a pair of LDRs.
1389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If we just wanted to set condition flags, we could do this:
1391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *  subs    ip, r0, r2
1392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *  sbcs    ip, r1, r3
1393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *  subeqs  ip, r0, r2
1394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Leaving { <0, 0, >0 } in ip.  However, we have to set it to a specific
1395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * integer value, which we can do with 2 conditional mov/mvn instructions
1396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * (set 1, set -1; if they're equal we already have 0 in ip), giving
1397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * us a constant 5-cycle path plus a branch at the end to the
1398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instruction epilogue code.  The multi-compare approach below needs
1399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 2 or 3 cycles + branch if the high word doesn't match, 6 + branch
1400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * in the worst case (the 64-bit values are equal).
1401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* cmp-long vAA, vBB, vCC */
1403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
1404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
1406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
1407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
1408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
1409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
1410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
1411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare (vBB+1, vCC+1)
1412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    blt     .LOP_CMP_LONG_less            @ signed compare on high part
1413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bgt     .LOP_CMP_LONG_greater
1414a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    r1, r0, r2                  @ r1<- r0 - r2
1415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bhi     .LOP_CMP_LONG_greater         @ unsigned compare on low part
1416a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_CMP_LONG_less
1417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_CMP_LONG_finish          @ equal; r1 already holds 0
1418a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_EQ: /* 0x32 */
1422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_EQ.S */
1423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/bincmp.S */
1424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic two-operand compare-and-branch operation.  Provide a "revcmp"
1426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vA, vB, +CCCC */
1432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A+
1433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
1434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
1435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r1)                    @ r3<- vB
1436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vA
14379a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, r3                      @ compare (vA, vB)
14399a3147c7412f4794434b4c2604aa2ba784867774buzbee    movne r1, #2                 @ r1<- BYTE branch dist for not-taken
14409a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r2, r1, r1                  @ convert to bytes, check sign
14419a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r2)           @ update rPC, load rINST
1442ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
14439a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
14449a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
14459a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0,#0
14469a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile
1447ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
14489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
14499a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_NE: /* 0x33 */
1457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_NE.S */
1458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/bincmp.S */
1459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic two-operand compare-and-branch operation.  Provide a "revcmp"
1461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vA, vB, +CCCC */
1467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A+
1468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
1469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
1470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r1)                    @ r3<- vB
1471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vA
14729a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, r3                      @ compare (vA, vB)
14749a3147c7412f4794434b4c2604aa2ba784867774buzbee    moveq r1, #2                 @ r1<- BYTE branch dist for not-taken
14759a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r2, r1, r1                  @ convert to bytes, check sign
14769a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r2)           @ update rPC, load rINST
1477ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
14789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
14799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
14809a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0,#0
14819a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile
1482ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
14839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
14849a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1489a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_LT: /* 0x34 */
1492a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_LT.S */
1493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/bincmp.S */
1494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic two-operand compare-and-branch operation.  Provide a "revcmp"
1496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1501a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vA, vB, +CCCC */
1502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A+
1503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
1504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
1505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r1)                    @ r3<- vB
1506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vA
15079a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, r3                      @ compare (vA, vB)
15099a3147c7412f4794434b4c2604aa2ba784867774buzbee    movge r1, #2                 @ r1<- BYTE branch dist for not-taken
15109a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r2, r1, r1                  @ convert to bytes, check sign
15119a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r2)           @ update rPC, load rINST
1512ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
15139a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
15149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
15159a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0,#0
15169a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile
1517ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
15189a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
15199a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1526a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_GE: /* 0x35 */
1527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_GE.S */
1528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/bincmp.S */
1529a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic two-operand compare-and-branch operation.  Provide a "revcmp"
1531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vA, vB, +CCCC */
1537a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A+
1538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
1539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
1540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r1)                    @ r3<- vB
1541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vA
15429a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, r3                      @ compare (vA, vB)
15449a3147c7412f4794434b4c2604aa2ba784867774buzbee    movlt r1, #2                 @ r1<- BYTE branch dist for not-taken
15459a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r2, r1, r1                  @ convert to bytes, check sign
15469a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r2)           @ update rPC, load rINST
1547ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
15489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
15499a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
15509a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0,#0
15519a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile
1552ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
15539a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
15549a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_GT: /* 0x36 */
1562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_GT.S */
1563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/bincmp.S */
1564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic two-operand compare-and-branch operation.  Provide a "revcmp"
1566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1571a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vA, vB, +CCCC */
1572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A+
1573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
1574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
1575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r1)                    @ r3<- vB
1576a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vA
15779a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, r3                      @ compare (vA, vB)
15799a3147c7412f4794434b4c2604aa2ba784867774buzbee    movle r1, #2                 @ r1<- BYTE branch dist for not-taken
15809a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r2, r1, r1                  @ convert to bytes, check sign
15819a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r2)           @ update rPC, load rINST
1582ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
15839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
15849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
15859a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0,#0
15869a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile
1587ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
15889a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
15899a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_LE: /* 0x37 */
1597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_LE.S */
1598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/bincmp.S */
1599a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic two-operand compare-and-branch operation.  Provide a "revcmp"
1601a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1605a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vA, vB, +CCCC */
1607a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A+
1608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
1609a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
1610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r1)                    @ r3<- vB
1611a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vA
16129a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, r3                      @ compare (vA, vB)
16149a3147c7412f4794434b4c2604aa2ba784867774buzbee    movgt r1, #2                 @ r1<- BYTE branch dist for not-taken
16159a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r2, r1, r1                  @ convert to bytes, check sign
16169a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r2)           @ update rPC, load rINST
1617ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
16189a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
16199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
16209a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0,#0
16219a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile
1622ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
16239a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
16249a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1625a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1626a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1627a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1628a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1630a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_EQZ: /* 0x38 */
1632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_EQZ.S */
1633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/zcmp.S */
1634a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1635a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic one-operand compare-and-branch operation.  Provide a "revcmp"
1636a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vAA, +BBBB */
1642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
1643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vAA
16449a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ compare (vA, 0)
16469a3147c7412f4794434b4c2604aa2ba784867774buzbee    movne r1, #2                 @ r1<- inst branch dist for not-taken
16479a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r1, r1                  @ convert to bytes & set flags
16489a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
1649ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
16509a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
16519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
1652ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
16539a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile        @ test for JIT off at target
1654ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
16559a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
16569a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1657ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1658ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
1659a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1660a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1661a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1663a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_NEZ: /* 0x39 */
1664a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_NEZ.S */
1665a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/zcmp.S */
1666a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic one-operand compare-and-branch operation.  Provide a "revcmp"
1668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1673a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vAA, +BBBB */
1674a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
1675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vAA
16769a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ compare (vA, 0)
16789a3147c7412f4794434b4c2604aa2ba784867774buzbee    moveq r1, #2                 @ r1<- inst branch dist for not-taken
16799a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r1, r1                  @ convert to bytes & set flags
16809a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
1681ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
16829a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
16839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
1684ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
16859a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile        @ test for JIT off at target
1686ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
16879a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
16889a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1689ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1690ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
1691a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1692a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1694a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1695a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_LTZ: /* 0x3a */
1696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_LTZ.S */
1697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/zcmp.S */
1698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic one-operand compare-and-branch operation.  Provide a "revcmp"
1700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1702a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1703a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vAA, +BBBB */
1706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
1707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vAA
17089a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ compare (vA, 0)
17109a3147c7412f4794434b4c2604aa2ba784867774buzbee    movge r1, #2                 @ r1<- inst branch dist for not-taken
17119a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r1, r1                  @ convert to bytes & set flags
17129a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
1713ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
17149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
17159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
1716ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
17179a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile        @ test for JIT off at target
1718ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
17199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
17209a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1721ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1722ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
1723a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1725a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1726a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_GEZ: /* 0x3b */
1728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_GEZ.S */
1729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/zcmp.S */
1730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic one-operand compare-and-branch operation.  Provide a "revcmp"
1732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vAA, +BBBB */
1738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
1739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vAA
17409a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ compare (vA, 0)
17429a3147c7412f4794434b4c2604aa2ba784867774buzbee    movlt r1, #2                 @ r1<- inst branch dist for not-taken
17439a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r1, r1                  @ convert to bytes & set flags
17449a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
1745ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
17469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
17479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
1748ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
17499a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile        @ test for JIT off at target
1750ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
17519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
17529a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1754a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1756a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1757a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1759a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_GTZ: /* 0x3c */
1760a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_GTZ.S */
1761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/zcmp.S */
1762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic one-operand compare-and-branch operation.  Provide a "revcmp"
1764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1769a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vAA, +BBBB */
1770a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
1771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vAA
17729a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1773a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ compare (vA, 0)
17749a3147c7412f4794434b4c2604aa2ba784867774buzbee    movle r1, #2                 @ r1<- inst branch dist for not-taken
17759a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r1, r1                  @ convert to bytes & set flags
17769a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
1777ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
17789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
17799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
1780ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
17819a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile        @ test for JIT off at target
1782ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
17839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
17849a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1785a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1788a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1790a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1791a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IF_LEZ: /* 0x3d */
1792a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IF_LEZ.S */
1793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/zcmp.S */
1794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic one-operand compare-and-branch operation.  Provide a "revcmp"
1796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * fragment that specifies the *reverse* comparison to perform, e.g.
1797a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for "if-le" you would use "gt".
1798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1799a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* if-cmp vAA, +BBBB */
1802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
1803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vAA
18049a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_S(r1, 1)                      @ r1<- branch offset, in code units
1805a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ compare (vA, 0)
18069a3147c7412f4794434b4c2604aa2ba784867774buzbee    movgt r1, #2                 @ r1<- inst branch dist for not-taken
18079a3147c7412f4794434b4c2604aa2ba784867774buzbee    adds    r1, r1, r1                  @ convert to bytes & set flags
18089a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST_RB(r1)           @ update rPC, load rINST
1809ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
18109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
18119a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
1812ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
18139a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_updateProfile        @ test for JIT off at target
1814ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
18159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrmi   rIBASE, [rSELF, #offThread_curHandlerTable]   @ refresh table base
18169a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
1817ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1818ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
1819a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1820a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1823a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_3E: /* 0x3e */
1824a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_3E.S */
1825a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
1826a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
1827a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1828a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1829a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1830a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1831a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_3F: /* 0x3f */
1832a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_3F.S */
1833a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
1834a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
1835a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1836a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1837a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1838a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1839a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_40: /* 0x40 */
1840a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_40.S */
1841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
1842a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
1843a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1844a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1846a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_41: /* 0x41 */
1848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_41.S */
1849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
1850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
1851a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_42: /* 0x42 */
1856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_42.S */
1857a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
1858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
1859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1860a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1863a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_43: /* 0x43 */
1864a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_43.S */
1865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
1866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
1867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AGET: /* 0x44 */
1872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET.S */
1873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1874a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array get, 32 bits or less.  vAA <- vBB[vCC].
1875a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
1877a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
1878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1879a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short
1880a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1881a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
1882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
1883a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1884a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
1885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
1886a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
1887a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
1888a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
1889a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
1890a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #2     @ r0<- arrayObj + index*width
1891a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
1892a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
1893a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
1894a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr   r2, [r0, #offArrayObject_contents]  @ r2<- vBB[vCC]
1895a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1896a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r9)                    @ vAA<- r2
1897a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1899a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1901a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AGET_WIDE: /* 0x45 */
1902a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET_WIDE.S */
1903a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1904a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array get, 64 bits.  vAA <- vBB[vCC].
1905a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1906a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Arrays of long/double are 64-bit aligned, so it's okay to use LDRD.
1907a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1908a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* aget-wide vAA, vBB, vCC */
1909a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
1910a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1911a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
1912a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
1913a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
1914a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
1915a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
1916a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
1917a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
1918a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #3          @ r0<- arrayObj + index*width
1919a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
1920a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcc     .LOP_AGET_WIDE_finish          @ okay, continue below
1921a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_errArrayIndex        @ index >= length, bail
1922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ May want to swap the order of these two branches depending on how the
1923a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ branch prediction (if any) handles conditional forward branches vs.
1924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ unconditional forward branches.
1925a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1926a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1927a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1928a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AGET_OBJECT: /* 0x46 */
1929a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET_OBJECT.S */
1930a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET.S */
1931a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array get, 32 bits or less.  vAA <- vBB[vCC].
1933a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1934a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
1935a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
1936a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1937a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short
1938a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1939a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
1940a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
1941a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1942a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
1943a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
1944a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
1945a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
1946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
1947a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
1948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #2     @ r0<- arrayObj + index*width
1949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
1950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
1951a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
1952a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr   r2, [r0, #offArrayObject_contents]  @ r2<- vBB[vCC]
1953a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1954a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r9)                    @ vAA<- r2
1955a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1956a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1957a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1958a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1959a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1960a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AGET_BOOLEAN: /* 0x47 */
1961a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET_BOOLEAN.S */
1962a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET.S */
1963a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1964a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array get, 32 bits or less.  vAA <- vBB[vCC].
1965a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1966a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
1967a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
1968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1969a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short
1970a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
1971a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
1972a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
1973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
1974a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
1975a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
1976a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
1977a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
1978a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
1979a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
1980a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #0     @ r0<- arrayObj + index*width
1981a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
1982a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
1983a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
1984a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldrb   r2, [r0, #offArrayObject_contents]  @ r2<- vBB[vCC]
1985a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
1986a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r9)                    @ vAA<- r2
1987a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
1988a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1989a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1990a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
1991a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
1992a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AGET_BYTE: /* 0x48 */
1993a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET_BYTE.S */
1994a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET.S */
1995a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
1996a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array get, 32 bits or less.  vAA <- vBB[vCC].
1997a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
1998a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
1999a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2000a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2001a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short
2002a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2003a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2004a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2005a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2006a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2007a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2008a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2009a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2010a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2011a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2012a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #0     @ r0<- arrayObj + index*width
2013a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2014a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2015a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2016a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldrsb   r2, [r0, #offArrayObject_contents]  @ r2<- vBB[vCC]
2017a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2018a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r9)                    @ vAA<- r2
2019a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2020a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2021a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2022a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2023a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2024a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AGET_CHAR: /* 0x49 */
2025a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET_CHAR.S */
2026a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET.S */
2027a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2028a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array get, 32 bits or less.  vAA <- vBB[vCC].
2029a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2030a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2031a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2032a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2033a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short
2034a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2035a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2036a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2037a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2038a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2039a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2040a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2041a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2042a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2043a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2044a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #1     @ r0<- arrayObj + index*width
2045a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2046a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2047a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2048a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldrh   r2, [r0, #offArrayObject_contents]  @ r2<- vBB[vCC]
2049a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2050a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r9)                    @ vAA<- r2
2051a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2052a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2053a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2054a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2055a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2056a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AGET_SHORT: /* 0x4a */
2057a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET_SHORT.S */
2058a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AGET.S */
2059a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2060a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array get, 32 bits or less.  vAA <- vBB[vCC].
2061a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2062a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2063a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2064a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2065a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short
2066a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2067a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2068a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2069a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2070a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2071a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2072a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2073a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2074a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2075a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2076a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #1     @ r0<- arrayObj + index*width
2077a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2078a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2079a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2080a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldrsh   r2, [r0, #offArrayObject_contents]  @ r2<- vBB[vCC]
2081a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2082a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r9)                    @ vAA<- r2
2083a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2084a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2085a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2086a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2087a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2088a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_APUT: /* 0x4b */
2089a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT.S */
2090a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2091a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array put, 32 bits or less.  vBB[vCC] <- vAA.
2092a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2093a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2094a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2095a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2096a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2097a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2098a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2099a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2100a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2101a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2102a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2103a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2104a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2105a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2106a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2107a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #2     @ r0<- arrayObj + index*width
2108a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2109a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2110a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r9)                    @ r2<- vAA
2112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
2114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2116a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2118a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_APUT_WIDE: /* 0x4c */
2119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT_WIDE.S */
2120a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2121a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array put, 64 bits.  vBB[vCC] <- vAA.
2122a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2123a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Arrays of long/double are 64-bit aligned, so it's okay to use STRD.
2124a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2125a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* aput-wide vAA, vBB, vCC */
2126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
2127a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
2129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
2130a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2131a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2132a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2133a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2134a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2135a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #3          @ r0<- arrayObj + index*width
2136a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2137a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
2138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcc     .LOP_APUT_WIDE_finish          @ okay, continue below
2139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_errArrayIndex        @ index >= length, bail
2140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ May want to swap the order of these two branches depending on how the
2141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ branch prediction (if any) handles conditional forward branches vs.
2142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ unconditional forward branches.
2143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2144a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2146a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_APUT_OBJECT: /* 0x4d */
2147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT_OBJECT.S */
2148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2149a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Store an object into an array.  vBB[vCC] <- vAA.
2150a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2151a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2152a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
2153a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2154a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
2155a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
2156d82097f6b409c5cd48568e54eb701604c3cceb18buzbee    GET_VREG(rINST, r2)                 @ rINST<- vBB (array object)
2157e877cc41c1a5d4f577c5f6fc6bacbe388dfd1d59Elliott Hughes    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2158d82097f6b409c5cd48568e54eb701604c3cceb18buzbee    cmp     rINST, #0                   @ null array object?
2159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r9)                    @ r9<- vAA
2160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2161d82097f6b409c5cd48568e54eb701604c3cceb18buzbee    ldr     r3, [rINST, #offArrayObject_length]   @ r3<- arrayObj->length
2162e877cc41c1a5d4f577c5f6fc6bacbe388dfd1d59Elliott Hughes    add     r10, rINST, r1, lsl #2      @ r10<- arrayObj + index*width
2163e877cc41c1a5d4f577c5f6fc6bacbe388dfd1d59Elliott Hughes    cmp     r1, r3                      @ compare unsigned index, length
2164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcc     .LOP_APUT_OBJECT_finish          @ we're okay, continue on
2165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_errArrayIndex        @ index >= length, bail
2166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2168a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2169a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2170a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_APUT_BOOLEAN: /* 0x4e */
2171a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT_BOOLEAN.S */
2172a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT.S */
2173a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2174a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array put, 32 bits or less.  vBB[vCC] <- vAA.
2175a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2176a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2177a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2178a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2179a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2180a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2181a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #0     @ r0<- arrayObj + index*width
2191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2192a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2193a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2194a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r9)                    @ r2<- vAA
2195a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    strb  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
2197a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2198a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2201a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2202a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_APUT_BYTE: /* 0x4f */
2203a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT_BYTE.S */
2204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT.S */
2205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array put, 32 bits or less.  vBB[vCC] <- vAA.
2207a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2209a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2210a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2211a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2212a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2213a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2214a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2215a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2216a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2217a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2218a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2219a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2220a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2221a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #0     @ r0<- arrayObj + index*width
2223a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2224a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2225a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r9)                    @ r2<- vAA
2227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    strb  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
2229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2234a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_APUT_CHAR: /* 0x50 */
2235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT_CHAR.S */
2236a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT.S */
2237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2238a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array put, 32 bits or less.  vBB[vCC] <- vAA.
2239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2244a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2245a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2246a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2247a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2249a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #1     @ r0<- arrayObj + index*width
2255a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2256a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2257a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r9)                    @ r2<- vAA
2259a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2260a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    strh  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
2261a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2262a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2263a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2264a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2265a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_APUT_SHORT: /* 0x51 */
2267a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT_SHORT.S */
2268a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_APUT.S */
2269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Array put, 32 bits or less.  vBB[vCC] <- vAA.
2271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * instructions.  We use a pair of FETCH_Bs instead.
2274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, vBB, vCC */
2278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r2, 1, 0)                   @ r2<- BB
2279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_B(r3, 1, 1)                   @ r3<- CC
2281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB (array object)
2282a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC (requested index)
2283a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ null array object?
2284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, bail
2285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offArrayObject_length]    @ r3<- arrayObj->length
2286a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1, lsl #1     @ r0<- arrayObj + index*width
2287a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, r3                      @ compare unsigned index, length
2288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bcs     common_errArrayIndex        @ index >= length, bail
2289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r9)                    @ r2<- vAA
2291a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    strh  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
2293a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2294a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2296a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2297a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2298a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET: /* 0x52 */
2299a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET.S */
2300a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2301a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field get.
2302a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2303a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2304a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2305a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2306a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
23079f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2308a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2309a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2310a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2311a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2312a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2313a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_finish          @ no, already resolved
23149f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
2319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_finish
2320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2321a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2322a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2324a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_WIDE: /* 0x53 */
2325a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_WIDE.S */
2326a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2327a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Wide 32-bit instance field get.
2328a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2329a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* iget-wide vA, vB, field@CCCC */
2330a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
23319f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2332a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2333a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pResFields
2334a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2335a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2336a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2337a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_WIDE_finish          @ no, already resolved
23389f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method] @ r2<- current method
2339a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2340a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2341a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2342a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
2343a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_WIDE_finish
2344a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2345a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2348a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_OBJECT: /* 0x54 */
2349a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_OBJECT.S */
2350a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET.S */
2351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field get.
2353a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2354a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
23589f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2361a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2362a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2364a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_OBJECT_finish          @ no, already resolved
23659f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2366a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2369a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
2370a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_OBJECT_finish
2371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2375a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_BOOLEAN: /* 0x55 */
2377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_BOOLEAN.S */
2378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IGET.S" { "load":"ldrb", "sqnum":"1" }
2379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET.S */
2380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field get.
2382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
23879f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_BOOLEAN_finish          @ no, already resolved
23949f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
2399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_BOOLEAN_finish
2400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_BYTE: /* 0x56 */
2406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_BYTE.S */
2407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IGET.S" { "load":"ldrsb", "sqnum":"2" }
2408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET.S */
2409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field get.
2411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2414a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
24169f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2418a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_BYTE_finish          @ no, already resolved
24239f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
2428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_BYTE_finish
2429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_CHAR: /* 0x57 */
2435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_CHAR.S */
2436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IGET.S" { "load":"ldrh", "sqnum":"3" }
2437a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET.S */
2438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2439a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field get.
2440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
24459f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2446a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_CHAR_finish          @ no, already resolved
24529f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
2457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_CHAR_finish
2458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_SHORT: /* 0x58 */
2464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_SHORT.S */
2465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IGET.S" { "load":"ldrsh", "sqnum":"4" }
2466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET.S */
2467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field get.
2469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2472a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
24749f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2475a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2477a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2479a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2480a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_SHORT_finish          @ no, already resolved
24819f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2482a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0
2486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IGET_SHORT_finish
2487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2489a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2492a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT: /* 0x59 */
2493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT.S */
2494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field put.
2496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2497919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
25019f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_finish          @ no, already resolved
25089f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ success?
2513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_finish          @ yes, finish up
2514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2517a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_WIDE: /* 0x5a */
2519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_WIDE.S */
2520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* iput-wide vA, vB, field@CCCC */
2521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
25229f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pResFields
2525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2526a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_WIDE_finish          @ no, already resolved
25299f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method] @ r2<- current method
2530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ success?
2534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_WIDE_finish          @ yes, finish up
2535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2537a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_OBJECT: /* 0x5b */
2540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_OBJECT.S */
2541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2542919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * 32-bit instance field put.
2543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2544919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput-object, iput-object-volatile
2545a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2546a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2547a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
25489f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2549a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2550a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2551a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2552a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2553a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2554a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_OBJECT_finish          @ no, already resolved
25559f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ success?
2560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_OBJECT_finish          @ yes, finish up
2561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_BOOLEAN: /* 0x5c */
2566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_BOOLEAN.S */
2567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IPUT.S" { "store":"strb", "sqnum":"1" }
2568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT.S */
2569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field put.
2571a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2572919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
25769f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2577a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2579a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2581a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_BOOLEAN_finish          @ no, already resolved
25839f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2584a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2585a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2586a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ success?
2588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_BOOLEAN_finish          @ yes, finish up
2589a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_BYTE: /* 0x5d */
2595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_BYTE.S */
2596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IPUT.S" { "store":"strb", "sqnum":"2" }
2597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT.S */
2598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2599a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field put.
2600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2601919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
26059f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2607a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2609a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2611a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_BYTE_finish          @ no, already resolved
26129f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2614a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2615a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2616a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ success?
2617a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_BYTE_finish          @ yes, finish up
2618a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2619a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2620a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2621a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2622a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2623a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_CHAR: /* 0x5e */
2624a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_CHAR.S */
2625a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IPUT.S" { "store":"strh", "sqnum":"3" }
2626a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT.S */
2627a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2628a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field put.
2629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2630919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
26349f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2635a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2636a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_CHAR_finish          @ no, already resolved
26419f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ success?
2646a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_CHAR_finish          @ yes, finish up
2647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2650a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2651a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_SHORT: /* 0x5f */
2653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_SHORT.S */
2654a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/OP_IPUT.S" { "store":"strh", "sqnum":"4" }
2655a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT.S */
2656a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2657a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit instance field put.
2658a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2659919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2660a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2661a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, field@CCCC */
2662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
26639f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
2664a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
2665a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
2666a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
2667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
2668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_SHORT_finish          @ no, already resolved
26709f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
2671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
2672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
2673a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
2674a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ success?
2675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_IPUT_SHORT_finish          @ yes, finish up
2676a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
2677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2678a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2679a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2680a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2681a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SGET: /* 0x60 */
2682a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET.S */
2683a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2684a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SGET handler.
2685a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2686a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2687a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2688a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
26899f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2690a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
26919a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
26929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
2693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2694a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SGET_resolve         @ yes, do resolve
2695a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SGET_finish: @ field ptr in r0
2696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
26970890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    @ no-op                             @ acquiring load
2698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
2701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2702a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2703a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SGET_WIDE: /* 0x61 */
2707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET_WIDE.S */
2708a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 64-bit SGET handler.
2710a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2711a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* sget-wide vAA, field@BBBB */
27129f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2713a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
27149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
27159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
2716a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2717a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SGET_WIDE_resolve         @ yes, do resolve
2718a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SGET_WIDE_finish:
2719861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
2720861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .if 0
2721861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    add     r0, r0, #offStaticField_value @ r0<- pointer to data
27226e10b9aaa72425a4825a25f0043533d0c6fdbba4Andy McFadden    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
2723861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .else
2724861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
2725861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .endif
2726861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
2727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2728861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
2729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SGET_OBJECT: /* 0x62 */
2735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET_OBJECT.S */
2736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET.S */
2737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SGET handler.
2739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2740a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
27439f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2744a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
27459a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
27469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
2747a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2748a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SGET_OBJECT_resolve         @ yes, do resolve
2749a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SGET_OBJECT_finish: @ field ptr in r0
2750a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
27510890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    @ no-op                             @ acquiring load
2752a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2754a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
2755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2756a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2757a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2759a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2760a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SGET_BOOLEAN: /* 0x63 */
2762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET_BOOLEAN.S */
2763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET.S */
2764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SGET handler.
2766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2769a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
27709f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
27729a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
27739a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
2774a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2775a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SGET_BOOLEAN_resolve         @ yes, do resolve
2776a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SGET_BOOLEAN_finish: @ field ptr in r0
2777a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
27780890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    @ no-op                             @ acquiring load
2779a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2780a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2781a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
2782a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2783a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2784a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2785a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2788a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SGET_BYTE: /* 0x64 */
2789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET_BYTE.S */
2790a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET.S */
2791a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2792a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SGET handler.
2793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
27979f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
27999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
28009a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
2801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SGET_BYTE_resolve         @ yes, do resolve
2803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SGET_BYTE_finish: @ field ptr in r0
2804a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
28050890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    @ no-op                             @ acquiring load
2806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2807a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2808a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
2809a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2810a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2811a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2813a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2814a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2815a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SGET_CHAR: /* 0x65 */
2816a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET_CHAR.S */
2817a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET.S */
2818a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2819a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SGET handler.
2820a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2823a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
28249f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2825a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
28269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
28279a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
2828a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2829a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SGET_CHAR_resolve         @ yes, do resolve
2830a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SGET_CHAR_finish: @ field ptr in r0
2831a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
28320890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    @ no-op                             @ acquiring load
2833a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2834a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2835a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
2836a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2837a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2838a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2839a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2840a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2842a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SGET_SHORT: /* 0x66 */
2843a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET_SHORT.S */
2844a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SGET.S */
2845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2846a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SGET handler.
2847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
28519f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
28539a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
28549a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
2855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SGET_SHORT_resolve         @ yes, do resolve
2857a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SGET_SHORT_finish: @ field ptr in r0
2858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
28590890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    @ no-op                             @ acquiring load
2860a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
2863a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
2864a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPUT: /* 0x67 */
2870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT.S */
2871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SPUT handler.
2873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2874919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2875a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
28779f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
28799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
28809a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
2881a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SPUT_resolve         @ yes, do resolve
2883a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SPUT_finish:   @ field ptr in r0
2884a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2886a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- fp[AA]
2887a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
28884185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op                        @ releasing store
2889a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r1, [r0, #offStaticField_value] @ field<- vAA
28904185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op
2891a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2892a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2893a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2894a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2895a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPUT_WIDE: /* 0x68 */
2896a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT_WIDE.S */
2897a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 64-bit SPUT handler.
2899a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* sput-wide vAA, field@BBBB */
29019f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_methodClassDex]  @ r0<- DvmDex
2902a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
29039a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r0, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
2904a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
29059a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r2, [r10, r1, lsl #2]        @ r2<- resolved StaticField ptr
2906a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
2907861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    cmp     r2, #0                      @ is resolved entry null?
2908a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SPUT_WIDE_resolve         @ yes, do resolve
2909861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden.LOP_SPUT_WIDE_finish: @ field ptr in r2, AA in r9
2910a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2911861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
2912861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    GET_INST_OPCODE(r10)                @ extract opcode from rINST
2913861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .if 0
2914861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    add     r2, r2, #offStaticField_value @ r2<- pointer to data
29154185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    bl      dvmQuasiAtomicSwap64Sync    @ stores r0/r1 into addr r2
2916861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .else
2917861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
2918861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .endif
2919861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    GOTO_OPCODE(r10)                    @ jump to next instruction
2920a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2921a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2923a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPUT_OBJECT: /* 0x69 */
2924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT_OBJECT.S */
2925a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2926919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * 32-bit SPUT handler for objects
2927a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2928919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput-object, sput-object-volatile
2929a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2930a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
29319f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
29339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
29349a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
2935a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
29369a3147c7412f4794434b4c2604aa2ba784867774buzbee    beq     .LOP_SPUT_OBJECT_resolve         @ yes, do resolve
29379a3147c7412f4794434b4c2604aa2ba784867774buzbee.LOP_SPUT_OBJECT_finish:   @ field ptr in r0
29389a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r2, rINST, lsr #8           @ r2<- AA
29399a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
29409a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r1, r2)                    @ r1<- fp[AA]
29419a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
29429a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r9, [r0, #offField_clazz]   @ r9<- field->clazz
29439a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
29444185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op                         @ releasing store
29459a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       .LOP_SPUT_OBJECT_end
2946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2947a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPUT_BOOLEAN: /* 0x6a */
2950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT_BOOLEAN.S */
2951a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT.S */
2952a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2953a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SPUT handler.
2954a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2955919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2956a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2957a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
29589f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2959a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
29609a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
29619a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
2962a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2963a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SPUT_BOOLEAN_resolve         @ yes, do resolve
2964a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SPUT_BOOLEAN_finish:   @ field ptr in r0
2965a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2966a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2967a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- fp[AA]
2968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
29694185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op                        @ releasing store
2970a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r1, [r0, #offStaticField_value] @ field<- vAA
29714185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op
2972a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
2973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2974a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
2975a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
2976a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
2977a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPUT_BYTE: /* 0x6b */
2978a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT_BYTE.S */
2979a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT.S */
2980a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
2981a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SPUT handler.
2982a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
2983919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2984a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
2985a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
29869f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
2987a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
29889a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
29899a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
2990a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
2991a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SPUT_BYTE_resolve         @ yes, do resolve
2992a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SPUT_BYTE_finish:   @ field ptr in r0
2993a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
2994a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
2995a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- fp[AA]
2996a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
29974185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op                        @ releasing store
2998a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r1, [r0, #offStaticField_value] @ field<- vAA
29994185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op
3000a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3001a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3002a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3003a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3004a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3005a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPUT_CHAR: /* 0x6c */
3006a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT_CHAR.S */
3007a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT.S */
3008a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3009a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SPUT handler.
3010a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3011919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput, sput-boolean, sput-byte, sput-char, sput-short
3012a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3013a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
30149f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
3015a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
30169a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
30179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
3018a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
3019a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SPUT_CHAR_resolve         @ yes, do resolve
3020a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SPUT_CHAR_finish:   @ field ptr in r0
3021a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
3022a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
3023a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- fp[AA]
3024a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
30254185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op                        @ releasing store
3026a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r1, [r0, #offStaticField_value] @ field<- vAA
30274185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op
3028a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3029a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3030a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3031a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3032a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3033a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SPUT_SHORT: /* 0x6d */
3034a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT_SHORT.S */
3035a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SPUT.S */
3036a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3037a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * General 32-bit SPUT handler.
3038a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3039919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput, sput-boolean, sput-byte, sput-char, sput-short
3040a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3041a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, field@BBBB */
30429f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
3043a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
30449a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
30459a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
3046a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is resolved entry null?
3047a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_SPUT_SHORT_resolve         @ yes, do resolve
3048a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_SPUT_SHORT_finish:   @ field ptr in r0
3049a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
3050a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
3051a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r2)                    @ r1<- fp[AA]
3052a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
30534185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op                        @ releasing store
3054a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r1, [r0, #offStaticField_value] @ field<- vAA
30554185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    @ no-op
3056a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3057a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3058a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3059a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3060a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3061a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_VIRTUAL: /* 0x6e */
3062a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_VIRTUAL.S */
3063a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3064a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a virtual method call.
3065a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3066a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-virtual, invoke-virtual/range
3067a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3068a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3069a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
30709f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3071a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3072a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
3073a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
3074a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved baseMethod
3075a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!0)
3076a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
3077a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3078a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
3079a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
3080a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_INVOKE_VIRTUAL_continue        @ yes, continue on
30819f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
3082a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
3083a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, #METHOD_VIRTUAL         @ resolver method type
3084a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
3085a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ got null?
3086a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_INVOKE_VIRTUAL_continue        @ no, continue
3087a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown      @ yes, handle exception
3088a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3089a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3090a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3091a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_SUPER: /* 0x6f */
3092a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_SUPER.S */
3093a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3094a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a "super" method call.
3095a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3096a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-super, invoke-super/range
3097a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3098a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3099a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3100a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
31019f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3102a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!0)
3103a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
3104a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3105a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3106a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
31079a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r10)                   @ r9<- "this" ptr
3108a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved baseMethod
31099a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null "this"?
31109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [rSELF, #offThread_method] @ r10<- current method
3111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ null "this", throw exception
3112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
31139a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r10, #offMethod_clazz]  @ r10<- method->clazz
3114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
3115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_INVOKE_SUPER_continue        @ resolved, continue on
3116a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_INVOKE_SUPER_resolve         @ do resolve now
3117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3118a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3120a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_DIRECT: /* 0x70 */
3121a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_DIRECT.S */
3122a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3123a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a direct method call.
3124a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3125a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * (We could defer the "is 'this' pointer null" test to the common
3126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * method invocation code, and use a flag to indicate that static
3127a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * calls don't count.  If we do this as part of copying the arguments
3128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * out we could avoiding loading the first arg twice.)
3129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3130a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-direct, invoke-direct/range
3131a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3132a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3133a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
31349f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3135a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3136a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
3137a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
3138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved methodToCall
3139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!0)
3140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
3141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
3143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
31449a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r10)                   @ r9<- "this" ptr
3145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_INVOKE_DIRECT_resolve         @ not resolved, do it now
3146a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_INVOKE_DIRECT_finish:
31479a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null "this" ref?
31489a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_invokeMethodNoRange   @ r0=method, r9="this"
3149a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_errNullObject        @ yes, throw exception
3150a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3151a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3152a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3153a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_STATIC: /* 0x71 */
3154a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_STATIC.S */
3155a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3156a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a static method call.
3157a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3158a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-static, invoke-static/range
3159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3161a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
31629f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3163a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
31659a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r9, #0                      @ null "this" in delay slot
3166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved methodToCall
31679a3147c7412f4794434b4c2604aa2ba784867774buzbee#if defined(WITH_JIT)
31689a3147c7412f4794434b4c2604aa2ba784867774buzbee    add     r10, r3, r1, lsl #2         @ r10<- &resolved_methodToCall
31699a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
3170a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
3171a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
3172a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     common_invokeMethodNoRange @ yes, continue on
31739a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       .LOP_INVOKE_STATIC_resolve
3174a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3175a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3176a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3177a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_INTERFACE: /* 0x72 */
3178a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_INTERFACE.S */
3179a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3180a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle an interface method call.
3181a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-interface, invoke-interface/range
3183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r2, 2)                        @ r2<- FEDC or CCCC
3187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!0)
3189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15                 @ r2<- C (or stays CCCC)
3190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
31929a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r2)                    @ r9<- first arg ("this")
31939f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- methodClassDex
31949a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null obj?
31959f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_method]  @ r2<- method
3196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, fail
31979a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r9, #offObject_clazz]  @ r0<- thisPtr->clazz
3198a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
3199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ failed?
3200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_exceptionThrown      @ yes, handle exception
32019a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       common_invokeMethodNoRange @ (r0=method, r9="this")
3202a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3203a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_73: /* 0x73 */
3206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_73.S */
3207a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
3208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
3209a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3210a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3211a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3212a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3213a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
3214a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_VIRTUAL_RANGE.S */
3215a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_VIRTUAL.S */
3216a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3217a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a virtual method call.
3218a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3219a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-virtual, invoke-virtual/range
3220a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3221a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
32239f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3224a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3225a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
3226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
3227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved baseMethod
3228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!1)
3229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
3230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
3232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
3233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_INVOKE_VIRTUAL_RANGE_continue        @ yes, continue on
32349f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
3235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
3236a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, #METHOD_VIRTUAL         @ resolver method type
3237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
3238a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ got null?
3239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_INVOKE_VIRTUAL_RANGE_continue        @ no, continue
3240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown      @ yes, handle exception
3241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3244a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3245a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_SUPER_RANGE: /* 0x75 */
3246a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_SUPER_RANGE.S */
3247a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_SUPER.S */
3248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3249a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a "super" method call.
3250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-super, invoke-super/range
3252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3255a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
32569f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3257a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!1)
3258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
3259a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3260a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3261a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
32629a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r10)                   @ r9<- "this" ptr
3263a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved baseMethod
32649a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null "this"?
32659a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [rSELF, #offThread_method] @ r10<- current method
3266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ null "this", throw exception
3267a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
32689a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r10, #offMethod_clazz]  @ r10<- method->clazz
3269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
3270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LOP_INVOKE_SUPER_RANGE_continue        @ resolved, continue on
3271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_INVOKE_SUPER_RANGE_resolve         @ do resolve now
3272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_DIRECT_RANGE: /* 0x76 */
3277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_DIRECT_RANGE.S */
3278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_DIRECT.S */
3279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a direct method call.
3281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3282a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * (We could defer the "is 'this' pointer null" test to the common
3283a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * method invocation code, and use a flag to indicate that static
3284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * calls don't count.  If we do this as part of copying the arguments
3285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * out we could avoiding loading the first arg twice.)
3286a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3287a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-direct, invoke-direct/range
3288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
32919f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3293a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
3294a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
3295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved methodToCall
3296a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!1)
3297a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
3298a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3299a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
3300a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
33019a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r10)                   @ r9<- "this" ptr
3302a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LOP_INVOKE_DIRECT_RANGE_resolve         @ not resolved, do it now
3303a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LOP_INVOKE_DIRECT_RANGE_finish:
33049a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null "this" ref?
33059a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     common_invokeMethodRange   @ r0=method, r9="this"
3306a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_errNullObject        @ yes, throw exception
3307a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3308a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3309a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3310a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3311a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_STATIC_RANGE: /* 0x77 */
3312a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_STATIC_RANGE.S */
3313a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_STATIC.S */
3314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a static method call.
3316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-static, invoke-static/range
3318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
33219f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- pDvmDex
3322a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offDvmDex_pResMethods]    @ r3<- pDvmDex->pResMethods
33249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r9, #0                      @ null "this" in delay slot
3325a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1, lsl #2]        @ r0<- resolved methodToCall
33269a3147c7412f4794434b4c2604aa2ba784867774buzbee#if defined(WITH_JIT)
33279a3147c7412f4794434b4c2604aa2ba784867774buzbee    add     r10, r3, r1, lsl #2         @ r10<- &resolved_methodToCall
33289a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
3329a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ already resolved?
3330a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
3331a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     common_invokeMethodRange @ yes, continue on
33329a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       .LOP_INVOKE_STATIC_RANGE_resolve
3333a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3334a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3335a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3336a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3337a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */
3338a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_INTERFACE_RANGE.S */
3339a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_INTERFACE.S */
3340a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3341a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle an interface method call.
3342a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3343a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: invoke-interface, invoke-interface/range
3344a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3345a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r2, 2)                        @ r2<- FEDC or CCCC
3348a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
3349a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!1)
3350a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15                 @ r2<- C (or stays CCCC)
3351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
33539a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r2)                    @ r9<- first arg ("this")
33549f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- methodClassDex
33559a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null obj?
33569f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_method]  @ r2<- method
3357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ yes, fail
33589a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r9, #offObject_clazz]  @ r0<- thisPtr->clazz
3359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
3360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ failed?
3361a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_exceptionThrown      @ yes, handle exception
33629a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       common_invokeMethodRange @ (r0=method, r9="this")
3363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3364a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3365a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3366a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_79: /* 0x79 */
3368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_79.S */
3369a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
3370a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
3371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3375a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_UNUSED_7A: /* 0x7a */
3376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_UNUSED_7A.S */
3377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unused.S */
3378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort
3379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NEG_INT: /* 0x7b */
3384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NEG_INT.S */
3385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unop.S */
3386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary operation.  Provide an "instr" line that
3388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0".
3389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      int-to-byte, int-to-char, int-to-short
3393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r0, r0, #0                              @ r0<- op, r0-r3 changed
3402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
3404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 9-10 instructions */
3406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NOT_INT: /* 0x7c */
3411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NOT_INT.S */
3412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unop.S */
3413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3414a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary operation.  Provide an "instr" line that
3415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0".
3416a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3418a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      int-to-byte, int-to-char, int-to-short
3420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mvn     r0, r0                              @ r0<- op, r0-r3 changed
3429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
3431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 9-10 instructions */
3433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3437a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NEG_LONG: /* 0x7d */
3438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NEG_LONG.S */
3439a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopWide.S */
3440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit unary operation.  Provide an "instr" line that
3442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0/r1".
3443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3445a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: neg-long, not-long, neg-double, long-to-double, double-to-long
3446a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[B]
3452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
3453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vAA
3454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsbs    r0, r0, #0                           @ optional op; may set condition codes
3456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsc     r1, r1, #0                              @ r0/r1<- op, r2-r3 changed
3457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vAA<- r0/r1
3459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-13 instructions */
3461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NOT_LONG: /* 0x7e */
3466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NOT_LONG.S */
3467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopWide.S */
3468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit unary operation.  Provide an "instr" line that
3470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0/r1".
3471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3472a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: neg-long, not-long, neg-double, long-to-double, double-to-long
3474a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3475a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3477a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3479a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[B]
3480a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
3481a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vAA
3482a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mvn     r0, r0                           @ optional op; may set condition codes
3484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mvn     r1, r1                              @ r0/r1<- op, r2-r3 changed
3485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vAA<- r0/r1
3487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-13 instructions */
3489a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3492a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NEG_FLOAT: /* 0x7f */
3494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NEG_FLOAT.S */
3495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unop.S */
3496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary operation.  Provide an "instr" line that
3498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0".
3499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3501a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      int-to-byte, int-to-char, int-to-short
3503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, #0x80000000                              @ r0<- op, r0-r3 changed
3512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
3514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 9-10 instructions */
3516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3517a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_NEG_DOUBLE: /* 0x80 */
3521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_NEG_DOUBLE.S */
3522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopWide.S */
3523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit unary operation.  Provide an "instr" line that
3525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0/r1".
3526a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: neg-long, not-long, neg-double, long-to-double, double-to-long
3529a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[B]
3535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
3536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vAA
3537a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, r1, #0x80000000                              @ r0/r1<- op, r2-r3 changed
3540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vAA<- r0/r1
3542a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-13 instructions */
3544a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3545a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3546a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3547a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3548a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INT_TO_LONG: /* 0x81 */
3549a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INT_TO_LONG.S */
3550a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopWider.S */
3551a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3552a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32bit-to-64bit unary operation.  Provide an "instr" line
3553a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = op r0", where
3554a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "result" is a 64-bit quantity in r0/r1.
3555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: int-to-long, int-to-double, float-to-long, float-to-double
3557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
3564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r0, asr #31                              @ r0<- op, r0-r3 changed
3567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vA/vA+1<- r0/r1
3569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-11 instructions */
3571a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INT_TO_FLOAT: /* 0x82 */
3576968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_INT_TO_FLOAT.S */
3577968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/funop.S */
3578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3579a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary floating-point operation.  Provide an "instr"
3580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * line that specifies an instruction that performs "s1 = op s0".
3581a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: int-to-float, float-to-int
3583a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3584a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3585a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
358638214bbeeb2980609919978f17b009d896023491Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
3588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r3]                    @ s0<- vB
3589a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
3591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsitos  s1, s0                              @ s1<- op
3592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
3594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s1, [r9]                    @ vA<- s1
3595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3599a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INT_TO_DOUBLE: /* 0x83 */
3601968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_INT_TO_DOUBLE.S */
3602968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/funopWider.S */
3603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32bit-to-64bit floating point unary operation.  Provide an
3605a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "instr" line that specifies an instruction that performs "d0 = op s0".
3606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3607a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: int-to-double, float-to-double
3608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3609a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
361138214bbeeb2980609919978f17b009d896023491Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3612a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
3613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r3]                    @ s0<- vB
3614a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3615a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
3616a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsitod  d0, s0                              @ d0<- op
3617a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3618a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
3619a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d0, [r9]                    @ vA<- d0
3620a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3621a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3622a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3623a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3624a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3625a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_LONG_TO_INT: /* 0x84 */
3626a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_LONG_TO_INT.S */
3627a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* we ignore the high word, making this equivalent to a 32-bit reg move */
3628a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MOVE.S */
3629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* for move, move-object, long-to-int */
3630a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB */
3631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B from 15:12
3632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A from 11:8
3633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3634a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[B]
3635a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
3636a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
3637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r2, r0)                    @ fp[A]<- r2
3638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ execute next instruction
3639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_LONG_TO_FLOAT: /* 0x85 */
3644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_LONG_TO_FLOAT.S */
3645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopNarrower.S */
3646a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64bit-to-32bit unary operation.  Provide an "instr" line
3648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = op r0/r1", where
3649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "result" is a 32-bit quantity in r0.
3650a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3651a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: long-to-float, double-to-int, double-to-float
3652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * (This would work for long-to-int, but that instruction is actually
3654a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an exact match for OP_MOVE.)
3655a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3656a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3657a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3658a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3659a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[B]
3660a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3661a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vB/vB+1
3662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3663a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3664a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_l2f                              @ r0<- op, r0-r3 changed
3665a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3666a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vA<- r0
3667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-11 instructions */
3669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3673a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_LONG_TO_DOUBLE: /* 0x86 */
3674a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_LONG_TO_DOUBLE.S */
3675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopWide.S */
3676a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit unary operation.  Provide an "instr" line that
3678a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0/r1".
3679a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3680a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3681a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: neg-long, not-long, neg-double, long-to-double, double-to-long
3682a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3683a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3684a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3685a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3686a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3687a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[B]
3688a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
3689a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vAA
3690a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3691a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3692a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_l2d                              @ r0/r1<- op, r2-r3 changed
3693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3694a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vAA<- r0/r1
3695a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-13 instructions */
3697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_FLOAT_TO_INT: /* 0x87 */
3702968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_FLOAT_TO_INT.S */
3703968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/funop.S */
3704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary floating-point operation.  Provide an "instr"
3706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * line that specifies an instruction that performs "s1 = op s0".
3707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3708a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: int-to-float, float-to-int
3709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3710a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3711a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
371238214bbeeb2980609919978f17b009d896023491Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3713a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
3714a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r3]                    @ s0<- vB
3715a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3716a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
3717a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ftosizs s1, s0                              @ s1<- op
3718a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3719a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
3720a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s1, [r9]                    @ vA<- s1
3721a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3722a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3723a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3725a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3726a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_FLOAT_TO_LONG: /* 0x88 */
3727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_FLOAT_TO_LONG.S */
3728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/unopWider.S" {"instr":"bl      __aeabi_f2lz"}
3729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopWider.S */
3730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32bit-to-64bit unary operation.  Provide an "instr" line
3732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = op r0", where
3733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "result" is a 64-bit quantity in r0/r1.
3734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: int-to-long, int-to-double, float-to-long, float-to-double
3736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3740a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
3743a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3744a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3745a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      f2l_doconv                              @ r0<- op, r0-r3 changed
3746a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3747a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vA/vA+1<- r0/r1
3748a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3749a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-11 instructions */
3750a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3751a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3752a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3754a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_FLOAT_TO_DOUBLE: /* 0x89 */
3756968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_FLOAT_TO_DOUBLE.S */
3757968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/funopWider.S */
3758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3759a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32bit-to-64bit floating point unary operation.  Provide an
3760a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "instr" line that specifies an instruction that performs "d0 = op s0".
3761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: int-to-double, float-to-double
3763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
376638214bbeeb2980609919978f17b009d896023491Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
3768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r3]                    @ s0<- vB
3769a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3770a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
3771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fcvtds  d0, s0                              @ d0<- op
3772a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3773a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
3774a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d0, [r9]                    @ vA<- d0
3775a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3776a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3777a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3778a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3779a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3780a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DOUBLE_TO_INT: /* 0x8a */
3781968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_DOUBLE_TO_INT.S */
3782968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/funopNarrower.S */
3783a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3784a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64bit-to-32bit unary floating point operation.  Provide an
3785a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "instr" line that specifies an instruction that performs "s0 = op d0".
3786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: double-to-int, double-to-float
3788a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3790a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
379138214bbeeb2980609919978f17b009d896023491Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3792a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
3793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r3]                    @ d0<- vB
3794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
3796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ftosizd  s0, d0                              @ s0<- op
3797a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
3799a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s0, [r9]                    @ vA<- s0
3800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3804a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3805a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DOUBLE_TO_LONG: /* 0x8b */
3806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_DOUBLE_TO_LONG.S */
3807a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@include "armv5te/unopWide.S" {"instr":"bl      __aeabi_d2lz"}
3808a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unopWide.S */
3809a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3810a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit unary operation.  Provide an "instr" line that
3811a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0/r1".
3812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3813a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3814a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: neg-long, not-long, neg-double, long-to-double, double-to-long
3815a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3816a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3817a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3818a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3819a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3820a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[B]
3821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
3822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vAA
3823a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3824a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3825a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      d2l_doconv                              @ r0/r1<- op, r2-r3 changed
3826a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3827a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0-r1}                 @ vAA<- r0/r1
3828a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3829a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-13 instructions */
3830a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3831a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3832a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3833a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3834a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3835a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DOUBLE_TO_FLOAT: /* 0x8c */
3836968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_DOUBLE_TO_FLOAT.S */
3837968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/funopNarrower.S */
3838a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3839a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64bit-to-32bit unary floating point operation.  Provide an
3840a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "instr" line that specifies an instruction that performs "s0 = op d0".
3841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3842a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: double-to-int, double-to-float
3843a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3844a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
384638214bbeeb2980609919978f17b009d896023491Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
3848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r3]                    @ d0<- vB
3849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
3851a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fcvtsd  s0, d0                              @ s0<- op
3852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
3854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s0, [r9]                    @ vA<- s0
3855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3857a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3860a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INT_TO_BYTE: /* 0x8d */
3861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INT_TO_BYTE.S */
3862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unop.S */
3863a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3864a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary operation.  Provide an "instr" line that
3865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0".
3866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      int-to-byte, int-to-char, int-to-short
3870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3874a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3875a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asl #24                           @ optional op; may set condition codes
3877a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asr #24                              @ r0<- op, r0-r3 changed
3879a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3880a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
3881a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 9-10 instructions */
3883a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3884a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3886a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3887a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INT_TO_CHAR: /* 0x8e */
3888a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INT_TO_CHAR.S */
3889a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unop.S */
3890a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3891a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary operation.  Provide an "instr" line that
3892a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0".
3893a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3894a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3895a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3896a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      int-to-byte, int-to-char, int-to-short
3897a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3899a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3901a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3902a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3903a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asl #16                           @ optional op; may set condition codes
3904a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3905a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr #16                              @ r0<- op, r0-r3 changed
3906a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3907a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
3908a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3909a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 9-10 instructions */
3910a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3911a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3912a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3913a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3914a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INT_TO_SHORT: /* 0x8f */
3915a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INT_TO_SHORT.S */
3916a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/unop.S */
3917a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3918a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit unary operation.  Provide an "instr" line that
3919a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = op r0".
3920a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.
3921a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3923a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      int-to-byte, int-to-char, int-to-short
3924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3925a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* unop vA, vB */
3926a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
3927a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
3928a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r3)                    @ r0<- vB
3929a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
3930a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asl #16                           @ optional op; may set condition codes
3931a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
3932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asr #16                              @ r0<- op, r0-r3 changed
3933a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3934a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)                    @ vAA<- r0
3935a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3936a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 9-10 instructions */
3937a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3938a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3939a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3940a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3941a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_INT: /* 0x90 */
3942a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_ADD_INT.S */
3943a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
3944a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3945a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
3946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
3947a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
3948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
3949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
3951a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
3952a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
3953a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
3954a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3955a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
3956a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
3957a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
3958a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
3959a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
3960a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
3961a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
3962a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
3963a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
3964a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
3965a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
3966a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
3967a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
3968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
3969a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
3970a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3971a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
3972a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
3973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1                              @ r0<- op, r0-r3 changed
3974a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
3975a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
3976a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
3977a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
3978a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3979a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
3980a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
3981a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
3982a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_INT: /* 0x91 */
3983a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SUB_INT.S */
3984a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
3985a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
3986a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
3987a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
3988a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
3989a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
3990a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3991a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
3992a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
3993a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
3994a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
3995a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
3996a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
3997a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
3998a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
3999a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4000a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4001a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4002a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4003a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4004a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4005a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4006a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4007a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4008a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4009a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4010a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4011a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4012a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4013a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4014a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     r0, r0, r1                              @ r0<- op, r0-r3 changed
4015a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4016a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4017a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4018a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4019a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4020a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4021a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4022a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4023a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_INT: /* 0x92 */
4024a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MUL_INT.S */
4025a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* must be "mul r0, r1, r0" -- "r0, r0, r1" is illegal */
4026a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4027a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4028a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4029a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4030a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4031a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4032a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4033a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4034a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4035a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4036a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4037a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4038a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4039a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4040a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4041a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4042a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4043a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4044a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4045a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4046a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4047a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4048a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4049a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4050a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4051a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4052a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4053a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4054a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4055a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4056a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mul     r0, r1, r0                              @ r0<- op, r0-r3 changed
4057a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4058a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4059a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4060a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4061a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4062a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4063a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4064a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4065a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_INT: /* 0x93 */
4066a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_DIV_INT.S */
4067a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4068a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4069a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4070a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4071a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4072a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4073a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4074a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4075a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4076a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4077a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4078a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4079a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4080a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4081a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4082a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4083a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4084a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4085a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4086a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4087a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4088a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4089a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4090a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
4091a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4092a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4093a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4094a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4095a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4096a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4097a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl     __aeabi_idiv                              @ r0<- op, r0-r3 changed
4098a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4099a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4100a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4101a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4102a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4103a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4104a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4105a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4106a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_INT: /* 0x94 */
4107a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_INT.S */
4108a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* idivmod returns quotient in r0 and remainder in r1 */
4109a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4110a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4116a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4118a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4120a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4121a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4122a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4123a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4124a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4125a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4127a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4130a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4131a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4132a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
4133a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4134a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4135a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4136a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4137a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_idivmod                              @ r1<- op, r0-r3 changed
4140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r9)               @ vAA<- r1
4142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4144a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4146a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AND_INT: /* 0x95 */
4149a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AND_INT.S */
4150a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4151a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4152a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4153a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4154a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4155a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4156a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4157a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4158a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4161a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4162a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4163a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4168a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4169a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4170a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4171a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4172a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4173a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4174a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4175a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4176a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4177a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4178a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4179a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4180a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, r1                              @ r0<- op, r0-r3 changed
4181a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_OR_INT: /* 0x96 */
4190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_OR_INT.S */
4191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4192a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4193a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4194a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4195a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4197a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4198a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4201a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4202a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4203a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4207a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4209a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4210a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4211a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4212a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4213a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4214a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4215a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4216a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4217a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4218a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4219a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4220a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4221a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1                              @ r0<- op, r0-r3 changed
4222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4223a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4224a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4225a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_XOR_INT: /* 0x97 */
4231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_XOR_INT.S */
4232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4234a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4236a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4238a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4244a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4245a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4246a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4247a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4249a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4255a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4256a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4257a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4259a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4260a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4261a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4262a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r0, r0, r1                              @ r0<- op, r0-r3 changed
4263a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4264a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4265a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4267a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4268a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHL_INT: /* 0x98 */
4272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHL_INT.S */
4273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4282a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4283a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4286a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4287a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4291a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4293a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4294a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4296a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4297a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4298a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4299a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4300a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4301a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4302a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
4303a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asl r1                              @ r0<- op, r0-r3 changed
4304a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4305a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4306a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4307a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4308a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4309a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4310a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4311a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4312a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHR_INT: /* 0x99 */
4313a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHR_INT.S */
4314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4321a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4322a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4324a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4325a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4326a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4327a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4328a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4329a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4330a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4331a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4332a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4333a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4334a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4335a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4336a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4337a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4338a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4339a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4340a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4341a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4342a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4343a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
4344a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asr r1                              @ r0<- op, r0-r3 changed
4345a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4348a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4349a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4350a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4353a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_USHR_INT: /* 0x9a */
4354a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_USHR_INT.S */
4355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4358a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4361a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4362a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4364a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4365a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4366a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4369a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4370a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4375a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
4385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr r1                              @ r0<- op, r0-r3 changed
4386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_LONG: /* 0x9b */
4395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_ADD_LONG.S */
4396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
4397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
4399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
4400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
4405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
4408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
4409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4414a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4416a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4418a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
4424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    adds    r0, r0, r2                           @ optional op; may set condition codes
4429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    adc     r1, r1, r3                              @ result<- op, r0-r3 changed
4430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
4432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
4434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4437a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_LONG: /* 0x9c */
4439a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SUB_LONG.S */
4440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
4441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
4443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
4444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4445a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4446a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
4449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
4452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
4453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
4468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4472a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    r0, r0, r2                           @ optional op; may set condition codes
4473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sbc     r1, r1, r3                              @ result<- op, r0-r3 changed
4474a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4475a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
4476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4477a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
4478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4479a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4480a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4481a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4482a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_LONG: /* 0x9d */
4483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MUL_LONG.S */
4484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Signed 64-bit integer multiply.
4486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Consider WXxYZ (r1r0 x r3r2) with a long multiply:
4488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *        WX
4489a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      x YZ
4490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *  --------
4491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *     ZW ZX
4492a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *  YW YX
4493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * The low word of the result holds ZX, the high word holds
4495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * (ZW+YX) + (the high overflow from ZX).  YW doesn't matter because
4496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * it doesn't fit in the low 64 bits.
4497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Unlike most ARM math operations, multiply instructions have
4499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * restrictions on using the same register more than once (Rd and Rm
4500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * cannot be the same).
4501a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* mul-long vAA, vBB, vCC */
4503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mul     ip, r2, r1                  @  ip<- ZxW
4511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    umull   r9, r10, r2, r0             @  r9/r10 <- ZxX
4512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mla     r2, r0, r3, ip              @  r2<- YxX + (ZxW)
4513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
4514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r10, r2, r10                @  r10<- r10 + low(ZxW + (YxX))
4515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, rFP, r0, lsl #2         @ r0<- &fp[AA]
4516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4517a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_MUL_LONG_finish
4518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_LONG: /* 0x9e */
4522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_DIV_LONG.S */
4523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
4524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
4526a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
4527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4529a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
4532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
4535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
4536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4537a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4542a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4544a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4545a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4546a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4547a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4548a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4549a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
4550a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
4551a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4552a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4553a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4554a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_ldivmod                              @ result<- op, r0-r3 changed
4557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
4559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
4561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_LONG: /* 0x9f */
4566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_LONG.S */
4567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ldivmod returns quotient in r0/r1 and remainder in r2/r3 */
4568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
4569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
4571a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
4572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4576a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
4577a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4579a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
4580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
4581a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4583a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4584a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4585a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4586a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4589a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
4595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
4596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4599a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4601a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_ldivmod                              @ result<- op, r0-r3 changed
4602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r2,r3}     @ vAA/vAA+1<- r2/r3
4604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4605a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
4606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4607a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4609a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AND_LONG: /* 0xa0 */
4611a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AND_LONG.S */
4612a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
4613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4614a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
4615a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
4616a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4617a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4618a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4619a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4620a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
4621a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4622a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4623a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
4624a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
4625a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4626a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4627a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4628a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4630a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4634a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4635a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4636a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
4640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, r2                           @ optional op; may set condition codes
4645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, r3                              @ result<- op, r0-r3 changed
4646a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
4648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
4650a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4651a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4654a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_OR_LONG: /* 0xa1 */
4655a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_OR_LONG.S */
4656a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
4657a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4658a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
4659a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
4660a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4661a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4663a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4664a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
4665a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4666a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
4668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
4669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4673a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4674a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4676a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4678a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4679a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4680a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4681a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4682a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4683a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
4684a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4685a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4686a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4687a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4688a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r2                           @ optional op; may set condition codes
4689a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r1, r1, r3                              @ result<- op, r0-r3 changed
4690a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4691a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
4692a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
4694a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4695a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_XOR_LONG: /* 0xa2 */
4699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_XOR_LONG.S */
4700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
4701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4702a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
4703a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
4704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4708a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
4709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4710a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4711a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
4712a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
4713a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4714a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4715a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4716a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4717a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4718a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4719a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4720a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4721a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4722a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
4723a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
4724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4725a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
4726a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
4728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r0, r0, r2                           @ optional op; may set condition codes
4733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r1, r1, r3                              @ result<- op, r0-r3 changed
4734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
4736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
4738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4740a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHL_LONG: /* 0xa3 */
4743a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHL_LONG.S */
4744a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4745a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Long integer shift.  This is different from the generic 32/64-bit
4746a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * binary operations because vAA/vBB are 64-bit but vCC (the shift
4747a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * distance) is 32-bit.  Also, Dalvik requires us to mask off the low
4748a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 6 bits of the shift distance.
4749a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4750a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* shl-long vAA, vBB, vCC */
4751a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4752a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r3, r0, #255                @ r3<- BB
4754a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr #8              @ r0<- CC
4755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[BB]
4756a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vCC
4757a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #63                 @ r2<- r2 & 0x3f
4759a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4760a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r1, asl r2              @  r1<- r1 << r2
4762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r3, r2, #32                 @  r3<- 32 - r2
4763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r1, r1, r0, lsr r3          @  r1<- r1 | (r0 << (32-r2))
4764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    ip, r2, #32                 @  ip<- r2 - 32
4765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movpl   r1, r0, asl ip              @  if r2 >= 32, r1<- r0 << (r2-32)
4766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_SHL_LONG_finish
4768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4769a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4770a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHR_LONG: /* 0xa4 */
4772a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHR_LONG.S */
4773a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4774a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Long integer shift.  This is different from the generic 32/64-bit
4775a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * binary operations because vAA/vBB are 64-bit but vCC (the shift
4776a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * distance) is 32-bit.  Also, Dalvik requires us to mask off the low
4777a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 6 bits of the shift distance.
4778a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4779a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* shr-long vAA, vBB, vCC */
4780a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4781a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4782a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r3, r0, #255                @ r3<- BB
4783a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr #8              @ r0<- CC
4784a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[BB]
4785a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vCC
4786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #63                 @ r0<- r0 & 0x3f
4788a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4790a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr r2              @  r0<- r2 >> r2
4791a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r3, r2, #32                 @  r3<- 32 - r2
4792a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, asl r3          @  r0<- r0 | (r1 << (32-r2))
4793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    ip, r2, #32                 @  ip<- r2 - 32
4794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movpl   r0, r1, asr ip              @  if r2 >= 32, r0<-r1 >> (r2-32)
4795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_SHR_LONG_finish
4797a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4799a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_USHR_LONG: /* 0xa5 */
4801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_USHR_LONG.S */
4802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Long integer shift.  This is different from the generic 32/64-bit
4804a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * binary operations because vAA/vBB are 64-bit but vCC (the shift
4805a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * distance) is 32-bit.  Also, Dalvik requires us to mask off the low
4806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 6 bits of the shift distance.
4807a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4808a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* ushr-long vAA, vBB, vCC */
4809a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4810a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4811a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r3, r0, #255                @ r3<- BB
4812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr #8              @ r0<- CC
4813a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[BB]
4814a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r0)                    @ r2<- vCC
4815a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- vBB/vBB+1
4816a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #63                 @ r0<- r0 & 0x3f
4817a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
4818a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4819a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr r2              @  r0<- r2 >> r2
4820a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r3, r2, #32                 @  r3<- 32 - r2
4821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, asl r3          @  r0<- r0 | (r1 << (32-r2))
4822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    ip, r2, #32                 @  ip<- r2 - 32
4823a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movpl   r0, r1, lsr ip              @  if r2 >= 32, r0<-r1 >>> (r2-32)
4824a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4825a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_USHR_LONG_finish
4826a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4827a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4828a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4829a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_FLOAT: /* 0xa6 */
4830968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_ADD_FLOAT.S */
4831968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop.S */
4832a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4833a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating-point operation.  Provide an "instr" line that
4834a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "s2 = s0 op s1".  Because we
4835a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * use the "softfp" ABI, this must be an instruction, not a function call.
4836a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4837a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float, sub-float, mul-float, div-float
4838a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4839a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* floatop vAA, vBB, vCC */
4840a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4842a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4843a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
484438214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
4845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
484638214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vCC
4847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r2]                    @ s0<- vBB
4848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fadds   s2, s0, s1                              @ s2<- op
4851a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
4853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
4854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4857a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_FLOAT: /* 0xa7 */
4860968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_SUB_FLOAT.S */
4861968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop.S */
4862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4863a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating-point operation.  Provide an "instr" line that
4864a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "s2 = s0 op s1".  Because we
4865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * use the "softfp" ABI, this must be an instruction, not a function call.
4866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float, sub-float, mul-float, div-float
4868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* floatop vAA, vBB, vCC */
4870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
487438214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
4875a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
487638214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vCC
4877a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r2]                    @ s0<- vBB
4878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4879a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4880a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsubs   s2, s0, s1                              @ s2<- op
4881a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
4883a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
4884a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4886a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4887a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4888a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4889a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_FLOAT: /* 0xa8 */
4890968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_MUL_FLOAT.S */
4891968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop.S */
4892a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4893a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating-point operation.  Provide an "instr" line that
4894a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "s2 = s0 op s1".  Because we
4895a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * use the "softfp" ABI, this must be an instruction, not a function call.
4896a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4897a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float, sub-float, mul-float, div-float
4898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4899a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* floatop vAA, vBB, vCC */
4900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4901a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4902a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4903a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
490438214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
4905a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
490638214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vCC
4907a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r2]                    @ s0<- vBB
4908a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4909a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4910a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmuls   s2, s0, s1                              @ s2<- op
4911a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4912a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
4913a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
4914a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4915a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4916a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4917a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4918a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4919a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_FLOAT: /* 0xa9 */
4920968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_DIV_FLOAT.S */
4921968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop.S */
4922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4923a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating-point operation.  Provide an "instr" line that
4924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "s2 = s0 op s1".  Because we
4925a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * use the "softfp" ABI, this must be an instruction, not a function call.
4926a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4927a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float, sub-float, mul-float, div-float
4928a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4929a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* floatop vAA, vBB, vCC */
4930a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4931a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4933a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
493438214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
4935a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
493638214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vCC
4937a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r2]                    @ s0<- vBB
4938a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4939a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4940a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fdivs   s2, s0, s1                              @ s2<- op
4941a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4942a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
4943a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
4944a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4945a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4947a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_FLOAT: /* 0xaa */
4950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_FLOAT.S */
4951a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* EABI doesn't define a float remainder function, but libm does */
4952a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop.S */
4953a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4954a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit binary operation.  Provide an "instr" line that
4955a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0 op r1".
4956a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
4957a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
4958a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4959a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
4960a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.  Note that we
4961a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * *don't* check for (INT_MIN / -1) here, because the ARM math lib
4962a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * handles it correctly.
4963a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4964a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4965a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-int, shl-int, shr-int, ushr-int, add-float, sub-float,
4966a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      mul-float, div-float, rem-float
4967a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
4968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
4969a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
4970a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
4971a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
4972a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
4973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vCC
4974a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
4975a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
4976a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
4977a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
4978a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
4979a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4980a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
4981a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
4982a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      fmodf                              @ r0<- op, r0-r3 changed
4983a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
4984a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
4985a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
4986a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 11-14 instructions */
4987a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4988a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
4989a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
4990a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
4991a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_DOUBLE: /* 0xab */
4992968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_ADD_DOUBLE.S */
4993968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide.S */
4994a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
4995a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit double-precision floating point binary operation.
4996a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Provide an "instr" line that specifies an instruction that performs
4997a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
4998a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
4999a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-double, sub-double, mul-double, div-double
5000a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5001a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* doubleop vAA, vBB, vCC */
5002a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
5003a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
5004a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
5005a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
500638214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
5007a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
500838214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vCC
5009a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r2]                    @ d0<- vBB
5010a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5011a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
5012a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    faddd   d2, d0, d1                              @ s2<- op
5013a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5014a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
5015a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
5016a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5017a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5018a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5019a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5020a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5021a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_DOUBLE: /* 0xac */
5022968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_SUB_DOUBLE.S */
5023968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide.S */
5024a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5025a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit double-precision floating point binary operation.
5026a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Provide an "instr" line that specifies an instruction that performs
5027a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
5028a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5029a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-double, sub-double, mul-double, div-double
5030a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5031a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* doubleop vAA, vBB, vCC */
5032a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
5033a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
5034a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
5035a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
503638214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
5037a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
503838214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vCC
5039a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r2]                    @ d0<- vBB
5040a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5041a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
5042a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsubd   d2, d0, d1                              @ s2<- op
5043a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5044a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
5045a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
5046a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5047a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5048a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5049a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5050a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5051a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_DOUBLE: /* 0xad */
5052968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_MUL_DOUBLE.S */
5053968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide.S */
5054a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5055a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit double-precision floating point binary operation.
5056a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Provide an "instr" line that specifies an instruction that performs
5057a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
5058a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5059a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-double, sub-double, mul-double, div-double
5060a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5061a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* doubleop vAA, vBB, vCC */
5062a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
5063a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
5064a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
5065a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
506638214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
5067a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
506838214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vCC
5069a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r2]                    @ d0<- vBB
5070a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5071a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
5072a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmuld   d2, d0, d1                              @ s2<- op
5073a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5074a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
5075a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
5076a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5077a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5078a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5079a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5080a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5081a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_DOUBLE: /* 0xae */
5082968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_DIV_DOUBLE.S */
5083968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide.S */
5084a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5085a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit double-precision floating point binary operation.
5086a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Provide an "instr" line that specifies an instruction that performs
5087a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
5088a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5089a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-double, sub-double, mul-double, div-double
5090a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5091a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* doubleop vAA, vBB, vCC */
5092a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
5093a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
5094a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
5095a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
509638214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
5097a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
509838214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vCC
5099a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r2]                    @ d0<- vBB
5100a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5101a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
5102a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fdivd   d2, d0, d1                              @ s2<- op
5103a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5104a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
5105a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
5106a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5107a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5108a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5109a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5110a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_DOUBLE: /* 0xaf */
5112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_DOUBLE.S */
5113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* EABI doesn't define a double remainder function, but libm does */
5114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide.S */
5115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5116a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit binary operation.  Provide an "instr" line that
5117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * specifies an instruction that performs "result = r0-r1 op r2-r3".
5118a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5120a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5121a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5122a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5123a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5124a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
5125a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      xor-long, add-double, sub-double, mul-double, div-double,
5126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double
5127a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
5129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5130a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop vAA, vBB, vCC */
5131a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r0, 1)                        @ r0<- CCBB
5132a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
5133a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r0, #255                @ r2<- BB
5134a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r0, lsr #8              @ r3<- CC
5135a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
5136a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r2, rFP, r2, lsl #2         @ r2<- &fp[BB]
5137a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r3, lsl #2         @ r3<- &fp[CC]
5138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r2, {r0-r1}                 @ r0/r1<- vBB/vBB+1
5139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r2-r3}                 @ r2/r3<- vCC/vCC+1
5140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5144a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
5145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5146a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      fmod                              @ result<- op, r0-r3 changed
5148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5149a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
5150a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5151a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 14-17 instructions */
5152a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5153a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5154a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5155a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5156a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_INT_2ADDR: /* 0xb0 */
5157a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_ADD_INT_2ADDR.S */
5158a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5161a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5162a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5163a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5168a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5169a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5170a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5171a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5172a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5173a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5174a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5175a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5176a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5177a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5178a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5179a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5180a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5181a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1                              @ r0<- op, r0-r3 changed
5187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5192a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5193a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5194a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5195a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_INT_2ADDR: /* 0xb1 */
5196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SUB_INT_2ADDR.S */
5197a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5198a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5201a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5202a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5203a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5207a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5209a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5210a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5211a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5212a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5213a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5214a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5215a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5216a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5217a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5218a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5219a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5220a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5221a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5223a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5224a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5225a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     r0, r0, r1                              @ r0<- op, r0-r3 changed
5226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5234a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_INT_2ADDR: /* 0xb2 */
5235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MUL_INT_2ADDR.S */
5236a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* must be "mul r0, r1, r0" -- "r0, r0, r1" is illegal */
5237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5238a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5244a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5245a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5246a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5247a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5249a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5255a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5256a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5257a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5259a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5260a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5261a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5262a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5263a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5264a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5265a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mul     r0, r1, r0                              @ r0<- op, r0-r3 changed
5266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5267a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5268a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_INT_2ADDR: /* 0xb3 */
5275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_DIV_INT_2ADDR.S */
5276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5282a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5283a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5286a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5287a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5291a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5293a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5294a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5296a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5297a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
5298a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5299a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5300a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5301a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5302a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5303a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5304a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl     __aeabi_idiv                              @ r0<- op, r0-r3 changed
5305a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5306a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5307a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5308a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5309a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5310a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5311a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5312a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5313a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_INT_2ADDR: /* 0xb4 */
5314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_INT_2ADDR.S */
5315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* idivmod returns quotient in r0 and remainder in r1 */
5316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5321a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5322a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5324a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5325a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5326a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5327a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5328a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5329a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5330a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5331a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5332a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5333a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5334a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5335a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5336a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5337a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
5338a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5339a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5340a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5341a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5342a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5343a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5344a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_idivmod                              @ r1<- op, r0-r3 changed
5345a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r9)               @ vAA<- r1
5347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5348a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5349a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5350a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5353a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AND_INT_2ADDR: /* 0xb5 */
5354a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AND_INT_2ADDR.S */
5355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5358a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5361a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5362a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5364a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5365a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5366a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5369a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5370a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5375a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, r1                              @ r0<- op, r0-r3 changed
5384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_OR_INT_2ADDR: /* 0xb6 */
5393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_OR_INT_2ADDR.S */
5394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5414a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5416a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5418a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1                              @ r0<- op, r0-r3 changed
5423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_XOR_INT_2ADDR: /* 0xb7 */
5432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_XOR_INT_2ADDR.S */
5433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5437a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5439a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5445a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5446a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5453a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r0, r0, r1                              @ r0<- op, r0-r3 changed
5462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHL_INT_2ADDR: /* 0xb8 */
5471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHL_INT_2ADDR.S */
5472a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5474a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5475a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5477a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5479a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5480a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5481a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5482a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5489a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5492a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
5500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asl r1                              @ r0<- op, r0-r3 changed
5501a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHR_INT_2ADDR: /* 0xb9 */
5510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHR_INT_2ADDR.S */
5511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5517a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5526a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5529a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5531a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5537a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
5539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asr r1                              @ r0<- op, r0-r3 changed
5540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5542a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5544a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5545a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5546a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5547a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5548a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_USHR_INT_2ADDR: /* 0xba */
5549a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_USHR_INT_2ADDR.S */
5550a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
5551a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5552a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
5553a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
5554a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
5563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
5564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
5570a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
5571a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
5573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5576a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5577a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
5578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr r1                              @ r0<- op, r0-r3 changed
5579a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
5581a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
5583a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5584a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5585a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5586a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_LONG_2ADDR: /* 0xbb */
5588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_ADD_LONG_2ADDR.S */
5589a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
5590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
5592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
5593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5599a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
5601a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
5602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
5603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5605a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5607a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5609a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5611a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5612a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5614a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5615a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5616a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5617a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5618a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    adds    r0, r0, r2                           @ optional op; may set condition codes
5619a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    adc     r1, r1, r3                              @ result<- op, r0-r3 changed
5620a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5621a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
5622a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5623a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
5624a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5625a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5626a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5627a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5628a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_LONG_2ADDR: /* 0xbc */
5629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SUB_LONG_2ADDR.S */
5630a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
5631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
5633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
5634a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5635a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5636a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
5642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
5643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
5644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5646a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5650a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5651a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5654a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5655a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5656a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5657a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5658a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5659a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    r0, r0, r2                           @ optional op; may set condition codes
5660a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sbc     r1, r1, r3                              @ result<- op, r0-r3 changed
5661a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
5663a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5664a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
5665a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5666a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_LONG_2ADDR: /* 0xbd */
5670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MUL_LONG_2ADDR.S */
5671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Signed 64-bit integer multiply, "/2addr" version.
5673a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5674a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * See OP_MUL_LONG for an explanation.
5675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5676a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * We get a little tight on registers, so to avoid looking up &fp[A]
5677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * again we stuff it into rINST.
5678a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5679a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* mul-long/2addr vA, vB */
5680a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5681a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5682a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5683a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5684a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     rINST, rFP, r9, lsl #2      @ rINST<- &fp[A]
5685a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5686a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   rINST, {r0-r1}              @ r0/r1<- vAA/vAA+1
5687a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mul     ip, r2, r1                  @  ip<- ZxW
5688a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    umull   r9, r10, r2, r0             @  r9/r10 <- ZxX
5689a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mla     r2, r0, r3, ip              @  r2<- YxX + (ZxW)
5690a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST                   @ r0<- &fp[A] (free up rINST)
5691a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5692a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r10, r2, r10                @  r10<- r10 + low(ZxW + (YxX))
5693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5694a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
5695a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_LONG_2ADDR: /* 0xbe */
5700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_DIV_LONG_2ADDR.S */
5701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
5702a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5703a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
5704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
5705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5708a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5710a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5711a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5712a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
5713a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
5714a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
5715a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5716a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5717a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5718a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5719a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5720a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5721a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5722a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5723a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
5725a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5726a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_ldivmod                              @ result<- op, r0-r3 changed
5732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
5734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
5736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5740a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_LONG_2ADDR: /* 0xbf */
5741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_LONG_2ADDR.S */
5742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ldivmod returns quotient in r0/r1 and remainder in r2/r3 */
5743a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
5744a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5745a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
5746a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
5747a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5748a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5749a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5750a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5751a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5752a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5754a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
5755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
5756a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
5757a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5759a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5760a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
5767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5769a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5770a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5772a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
5773a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_ldivmod                              @ result<- op, r0-r3 changed
5774a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5775a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r2,r3}     @ vAA/vAA+1<- r2/r3
5776a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5777a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
5778a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5779a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5780a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5781a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5782a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AND_LONG_2ADDR: /* 0xc0 */
5783a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AND_LONG_2ADDR.S */
5784a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
5785a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
5787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
5788a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5790a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5791a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5792a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
5796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
5797a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
5798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5799a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5804a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5805a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5807a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5808a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5809a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5810a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5811a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5813a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, r2                           @ optional op; may set condition codes
5814a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, r3                              @ result<- op, r0-r3 changed
5815a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5816a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
5817a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5818a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
5819a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5820a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5823a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_OR_LONG_2ADDR: /* 0xc1 */
5824a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_OR_LONG_2ADDR.S */
5825a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
5826a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5827a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
5828a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
5829a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5830a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5831a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5832a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5833a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5834a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5835a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5836a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
5837a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
5838a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
5839a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5840a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5842a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5843a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5844a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5846a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5851a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r2                           @ optional op; may set condition codes
5855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r1, r1, r3                              @ result<- op, r0-r3 changed
5856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5857a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
5858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
5860a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5863a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5864a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_XOR_LONG_2ADDR: /* 0xc2 */
5865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_XOR_LONG_2ADDR.S */
5866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
5867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
5869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
5870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
5871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
5872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
5874a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
5875a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5877a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
5878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
5879a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
5880a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5881a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5883a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
5884a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
5886a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5887a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
5888a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5889a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
5890a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
5891a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
5892a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
5893a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5894a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5895a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r0, r0, r2                           @ optional op; may set condition codes
5896a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r1, r1, r3                              @ result<- op, r0-r3 changed
5897a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
5898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
5899a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
5900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
5901a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5902a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5903a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5904a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5905a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHL_LONG_2ADDR: /* 0xc3 */
5906a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHL_LONG_2ADDR.S */
5907a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5908a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Long integer shift, 2addr version.  vA is 64-bit value/result, vB is
5909a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 32-bit shift distance.
5910a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5911a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* shl-long/2addr vA, vB */
5912a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5913a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5914a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5915a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r3)                    @ r2<- vB
5916a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5917a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #63                 @ r2<- r2 & 0x3f
5918a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5919a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5920a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r1, asl r2              @  r1<- r1 << r2
5921a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r3, r2, #32                 @  r3<- 32 - r2
5922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r1, r1, r0, lsr r3          @  r1<- r1 | (r0 << (32-r2))
5923a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    ip, r2, #32                 @  ip<- r2 - 32
5924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5925a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movpl   r1, r0, asl ip              @  if r2 >= 32, r1<- r0 << (r2-32)
5926a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asl r2              @  r0<- r0 << r2
5927a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_SHL_LONG_2ADDR_finish
5928a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5929a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5930a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5931a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHR_LONG_2ADDR: /* 0xc4 */
5932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHR_LONG_2ADDR.S */
5933a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5934a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Long integer shift, 2addr version.  vA is 64-bit value/result, vB is
5935a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 32-bit shift distance.
5936a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5937a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* shr-long/2addr vA, vB */
5938a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5939a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5940a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5941a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r3)                    @ r2<- vB
5942a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5943a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #63                 @ r2<- r2 & 0x3f
5944a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5945a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr r2              @  r0<- r2 >> r2
5947a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r3, r2, #32                 @  r3<- 32 - r2
5948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, asl r3          @  r0<- r0 | (r1 << (32-r2))
5949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    ip, r2, #32                 @  ip<- r2 - 32
5950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5951a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movpl   r0, r1, asr ip              @  if r2 >= 32, r0<-r1 >> (r2-32)
5952a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r1, asr r2              @  r1<- r1 >> r2
5953a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_SHR_LONG_2ADDR_finish
5954a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5955a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5956a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5957a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_USHR_LONG_2ADDR: /* 0xc5 */
5958a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_USHR_LONG_2ADDR.S */
5959a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5960a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Long integer shift, 2addr version.  vA is 64-bit value/result, vB is
5961a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * 32-bit shift distance.
5962a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5963a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* ushr-long/2addr vA, vB */
5964a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
5965a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5966a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
5967a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r3)                    @ r2<- vB
5968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
5969a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #63                 @ r2<- r2 & 0x3f
5970a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
5971a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5972a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr r2              @  r0<- r2 >> r2
5973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r3, r2, #32                 @  r3<- 32 - r2
5974a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1, asl r3          @  r0<- r0 | (r1 << (32-r2))
5975a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    ip, r2, #32                 @  ip<- r2 - 32
5976a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
5977a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movpl   r0, r1, lsr ip              @  if r2 >= 32, r0<-r1 >>> (r2-32)
5978a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r1, lsr r2              @  r1<- r1 >>> r2
5979a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LOP_USHR_LONG_2ADDR_finish
5980a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
5981a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
5982a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
5983a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_FLOAT_2ADDR: /* 0xc6 */
5984968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_ADD_FLOAT_2ADDR.S */
5985968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop2addr.S */
5986a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
5987a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating point "/2addr" binary operation.  Provide
5988a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
5989a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "s2 = s0 op s1".
5990a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
5991a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float/2addr, sub-float/2addr, mul-float/2addr, div-float/2addr
5992a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
5993a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
5994a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
5995a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
599638214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
5997a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
599838214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vB
5999a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6000a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6001a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r9]                    @ s0<- vA
6002a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6003a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fadds   s2, s0, s1                              @ s2<- op
6004a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6005a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
6006a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6007a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6008a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6009a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6010a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6011a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_FLOAT_2ADDR: /* 0xc7 */
6012968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_SUB_FLOAT_2ADDR.S */
6013968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop2addr.S */
6014a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6015a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating point "/2addr" binary operation.  Provide
6016a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
6017a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "s2 = s0 op s1".
6018a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6019a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float/2addr, sub-float/2addr, mul-float/2addr, div-float/2addr
6020a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6021a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6022a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6023a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
602438214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
6025a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
602638214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vB
6027a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6028a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6029a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r9]                    @ s0<- vA
6030a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6031a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsubs   s2, s0, s1                              @ s2<- op
6032a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6033a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
6034a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6035a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6036a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6037a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6038a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6039a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_FLOAT_2ADDR: /* 0xc8 */
6040968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_MUL_FLOAT_2ADDR.S */
6041968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop2addr.S */
6042a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6043a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating point "/2addr" binary operation.  Provide
6044a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
6045a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "s2 = s0 op s1".
6046a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6047a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float/2addr, sub-float/2addr, mul-float/2addr, div-float/2addr
6048a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6049a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6050a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6051a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
605238214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
6053a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
605438214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vB
6055a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6056a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6057a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r9]                    @ s0<- vA
6058a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6059a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmuls   s2, s0, s1                              @ s2<- op
6060a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6061a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
6062a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6063a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6064a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6065a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6066a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6067a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_FLOAT_2ADDR: /* 0xc9 */
6068968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_DIV_FLOAT_2ADDR.S */
6069968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinop2addr.S */
6070a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6071a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit floating point "/2addr" binary operation.  Provide
6072a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
6073a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "s2 = s0 op s1".
6074a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6075a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-float/2addr, sub-float/2addr, mul-float/2addr, div-float/2addr
6076a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6077a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6078a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6079a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
608038214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
6081a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
608238214bbeeb2980609919978f17b009d896023491Andy McFadden    flds    s1, [r3]                    @ s1<- vB
6083a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6084a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6085a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    flds    s0, [r9]                    @ s0<- vA
6086a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6087a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fdivs   s2, s0, s1                              @ s2<- op
6088a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6089a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsts    s2, [r9]                    @ vAA<- s2
6090a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6091a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6092a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6093a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6094a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6095a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_FLOAT_2ADDR: /* 0xca */
6096a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_FLOAT_2ADDR.S */
6097a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* EABI doesn't define a float remainder function, but libm does */
6098a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binop2addr.S */
6099a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6100a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "/2addr" binary operation.  Provide an "instr" line
6101a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6102a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6103a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6104a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6105a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6106a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6107a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6108a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
6109a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
6110a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
6111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
6112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6116a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r1, r3)                    @ r1<- vB
6118a5069fb7eb2da846ff1fc2c903ebd8ce9fa3647fAndy McFadden    GET_VREG(r0, r9)                    @ r0<- vA
6119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6120a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6121a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6122a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6123a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6124a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6125a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      fmodf                              @ r0<- op, r0-r3 changed
6127a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6130a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6131a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6132a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6133a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6134a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6135a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
6136968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_ADD_DOUBLE_2ADDR.S */
6137968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide2addr.S */
6138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit floating point "/2addr" binary operation.  Provide
6140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
6141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
6142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6144a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      div-double/2addr
6145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6146a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
614938214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
6150a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
615138214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vB
6152a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6153a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6154a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r9]                    @ d0<- vA
6155a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6156a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    faddd   d2, d0, d1                              @ d2<- op
6157a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6158a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
6159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6161a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6162a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6163a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SUB_DOUBLE_2ADDR: /* 0xcc */
6165968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_SUB_DOUBLE_2ADDR.S */
6166968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide2addr.S */
6167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6168a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit floating point "/2addr" binary operation.  Provide
6169a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
6170a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
6171a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6172a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6173a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      div-double/2addr
6174a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6175a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6176a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6177a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
617838214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
6179a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
618038214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vB
6181a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r9]                    @ d0<- vA
6184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fsubd   d2, d0, d1                              @ d2<- op
6186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
6188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6192a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6193a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_DOUBLE_2ADDR: /* 0xcd */
6194968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_MUL_DOUBLE_2ADDR.S */
6195968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide2addr.S */
6196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6197a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit floating point "/2addr" binary operation.  Provide
6198a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
6199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
6200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6201a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6202a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      div-double/2addr
6203a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
620738214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
6208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
620938214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vB
6210a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6211a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6212a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r9]                    @ d0<- vA
6213a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6214a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fmuld   d2, d0, d1                              @ d2<- op
6215a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6216a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
6217a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6218a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6219a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6220a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6221a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_DOUBLE_2ADDR: /* 0xce */
6223968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/OP_DIV_DOUBLE_2ADDR.S */
6224968d32c2b6160c19c2308793dca6d747cbfea8feAndy McFadden/* File: arm-vfp/fbinopWide2addr.S */
6225a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit floating point "/2addr" binary operation.  Provide
6227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * an "instr" line that specifies an instruction that performs
6228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * "d2 = d0 op d1".
6229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      div-double/2addr
6232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6234a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #12          @ r3<- B
6235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
623638214bbeeb2980609919978f17b009d896023491Andy McFadden    VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vB
6237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15                 @ r9<- A
623838214bbeeb2980609919978f17b009d896023491Andy McFadden    fldd    d1, [r3]                    @ d1<- vB
6239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vA
6240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fldd    d0, [r9]                    @ d0<- vA
6242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fdivd   d2, d0, d1                              @ d2<- op
6244a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6245a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    fstd    d2, [r9]                    @ vAA<- d2
6246a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6247a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6249a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_DOUBLE_2ADDR: /* 0xcf */
6252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_DOUBLE_2ADDR.S */
6253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* EABI doesn't define a double remainder function, but libm does */
6254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopWide2addr.S */
6255a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6256a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 64-bit "/2addr" binary operation.  Provide an "instr" line
6257a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0-r1 op r2-r3".
6258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6259a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6260a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6261a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6262a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6263a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6264a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
6265a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      and-long/2addr, or-long/2addr, xor-long/2addr, add-double/2addr,
6266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      sub-double/2addr, mul-double/2addr, div-double/2addr,
6267a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-double/2addr
6268a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/2addr vA, vB */
6270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
6272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r1, rFP, r1, lsl #2         @ r1<- &fp[B]
6274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[A]
6275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r1, {r2-r3}                 @ r2/r3<- vBB/vBB+1
6276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
6277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orrs    ip, r2, r3                  @ second arg (r2-r3) is zero?
6279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(1)               @ advance rPC, load rINST
6282a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6283a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      fmod                              @ result<- op, r0-r3 changed
6285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6286a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r9, {r0,r1}     @ vAA/vAA+1<- r0/r1
6287a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 12-15 instructions */
6289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6291a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6293a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_INT_LIT16: /* 0xd0 */
6294a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_ADD_INT_LIT16.S */
6295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6296a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6297a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6298a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6299a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6300a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6301a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6302a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6303a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6304a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6305a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6306a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6307a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6308a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6309a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6310a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6311a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6312a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6313a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1                              @ r0<- op, r0-r3 changed
6321a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6322a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6324a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6325a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6326a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6327a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6328a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6329a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_RSUB_INT: /* 0xd1 */
6330a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_RSUB_INT.S */
6331a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* this op is "rsub-int", but can be thought of as "rsub-int/lit16" */
6332a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6333a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6334a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6335a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6336a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6337a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6338a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6339a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6340a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6341a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6342a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6343a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6344a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6345a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6348a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6349a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6350a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6353a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6354a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r0, r0, r1                              @ r0<- op, r0-r3 changed
6358a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6361a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6362a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6364a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6365a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6366a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_INT_LIT16: /* 0xd2 */
6367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MUL_INT_LIT16.S */
6368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* must be "mul r0, r1, r0" -- "r0, r0, r1" is illegal */
6369a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6370a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6375a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mul     r0, r1, r0                              @ r0<- op, r0-r3 changed
6395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_INT_LIT16: /* 0xd3 */
6404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_DIV_INT_LIT16.S */
6405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6414a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6416a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6418a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
6425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl     __aeabi_idiv                              @ r0<- op, r0-r3 changed
6431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6437a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6439a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_INT_LIT16: /* 0xd4 */
6440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_INT_LIT16.S */
6441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* idivmod returns quotient in r0 and remainder in r1 */
6442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6445a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6446a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
6462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_idivmod                              @ r1<- op, r0-r3 changed
6468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r9)               @ vAA<- r1
6470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6472a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6474a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6475a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AND_INT_LIT16: /* 0xd5 */
6477a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AND_INT_LIT16.S */
6478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6479a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6480a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6481a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6482a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6489a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6492a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6501a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, r1                              @ r0<- op, r0-r3 changed
6504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_OR_INT_LIT16: /* 0xd6 */
6513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_OR_INT_LIT16.S */
6514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6517a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6526a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6529a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6537a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1                              @ r0<- op, r0-r3 changed
6540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6542a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6544a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6545a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6546a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6547a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6548a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_XOR_INT_LIT16: /* 0xd7 */
6549a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_XOR_INT_LIT16.S */
6550a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit16.S */
6551a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6552a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit16" binary operation.  Provide an "instr" line
6553a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6554a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit16 vA, vB, #+CCCC */
6564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r1, 1)                      @ r1<- ssssCCCC (sign-extended)
6565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
6566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- A+
6567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vB
6568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r9, r9, #15
6569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ is second operand zero?
6571a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r0, r0, r1                              @ r0<- op, r0-r3 changed
6576a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6577a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6579a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-13 instructions */
6580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6581a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6583a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6584a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_ADD_INT_LIT8: /* 0xd8 */
6585a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_ADD_INT_LIT8.S */
6586a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6589a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6599a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6601a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6605a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6607a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6609a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6611a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6612a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r0, r0, r1                              @ r0<- op, r0-r3 changed
6614a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6615a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6616a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6617a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6618a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6619a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6620a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6621a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6622a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_RSUB_INT_LIT8: /* 0xd9 */
6623a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_RSUB_INT_LIT8.S */
6624a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6625a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6626a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6627a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6628a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6630a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6634a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6635a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6636a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6646a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6650a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6651a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r0, r0, r1                              @ r0<- op, r0-r3 changed
6652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6654a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6655a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6656a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6657a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6658a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6659a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6660a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_MUL_INT_LIT8: /* 0xda */
6661a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_MUL_INT_LIT8.S */
6662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* must be "mul r0, r1, r0" -- "r0, r0, r1" is illegal */
6663a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6664a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6665a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6666a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6673a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6674a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6676a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6678a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6679a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6680a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6681a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6682a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6683a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6684a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6685a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6686a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6687a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6688a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6689a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6690a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mul     r0, r1, r0                              @ r0<- op, r0-r3 changed
6691a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6692a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6694a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6695a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_DIV_INT_LIT8: /* 0xdb */
6700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_DIV_INT_LIT8.S */
6701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6702a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6703a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6708a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6710a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6711a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6712a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6713a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6714a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6715a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6716a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6717a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6718a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6719a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6720a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6721a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
6722a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6723a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6725a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6726a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl     __aeabi_idiv                              @ r0<- op, r0-r3 changed
6729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_REM_INT_LIT8: /* 0xdc */
6738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_REM_INT_LIT8.S */
6739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* idivmod returns quotient in r0 and remainder in r1 */
6740a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6743a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6744a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6745a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6746a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6747a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6748a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6749a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6750a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6751a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6752a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6754a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6756a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6757a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6759a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6760a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 1
6761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __aeabi_idivmod                              @ r1<- op, r0-r3 changed
6768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6769a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r1, r9)               @ vAA<- r1
6770a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6772a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6773a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6774a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6775a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6776a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_AND_INT_LIT8: /* 0xdd */
6777a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_AND_INT_LIT8.S */
6778a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6779a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6780a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6781a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6782a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6783a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6784a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6785a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6788a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6790a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6791a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6792a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6797a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6799a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6804a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6805a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, r1                              @ r0<- op, r0-r3 changed
6806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6807a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6808a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6809a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6810a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6811a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6813a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6814a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_OR_INT_LIT8: /* 0xde */
6815a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_OR_INT_LIT8.S */
6816a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6817a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6818a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6819a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6820a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6823a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6824a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6825a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6826a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6827a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6828a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6829a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6830a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6831a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6832a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6833a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6834a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6835a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6836a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6837a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6838a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6839a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6840a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6842a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6843a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    orr     r0, r0, r1                              @ r0<- op, r0-r3 changed
6844a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6846a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6851a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_XOR_INT_LIT8: /* 0xdf */
6853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_XOR_INT_LIT8.S */
6854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6857a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6860a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6863a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6864a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6874a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6875a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6877a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6879a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6880a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                               @ optional op; may set condition codes
6881a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    eor     r0, r0, r1                              @ r0<- op, r0-r3 changed
6882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6883a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6884a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6886a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6887a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6888a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6889a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6890a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHL_INT_LIT8: /* 0xe0 */
6891a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHL_INT_LIT8.S */
6892a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6893a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6894a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6895a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6896a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6897a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6899a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6901a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6902a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6903a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6904a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6905a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6906a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6907a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6908a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6909a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6910a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6911a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6912a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6913a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6914a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6915a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6916a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6917a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6918a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
6919a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asl r1                              @ r0<- op, r0-r3 changed
6920a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6921a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6923a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6925a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6926a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6927a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6928a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_SHR_INT_LIT8: /* 0xe1 */
6929a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_SHR_INT_LIT8.S */
6930a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6931a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6933a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6934a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6935a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6936a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6937a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6938a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6939a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6940a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6941a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6942a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6943a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6944a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6945a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6947a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6951a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6952a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6953a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6954a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6955a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6956a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
6957a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, asr r1                              @ r0<- op, r0-r3 changed
6958a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6959a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6960a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6961a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
6962a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6963a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6964a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
6965a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
6966a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_USHR_INT_LIT8: /* 0xe2 */
6967a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_USHR_INT_LIT8.S */
6968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/binopLit8.S */
6969a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
6970a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Generic 32-bit "lit8" binary operation.  Provide an "instr" line
6971a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * that specifies an instruction that performs "result = r0 op r1".
6972a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * This could be an ARM instruction or a function call.  (If the result
6973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * comes back in a register other than r0, you can override "result".)
6974a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6975a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * If "chkzero" is set to 1, we perform a divide-by-zero check on
6976a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * vCC (r1).  Useful for integer division and modulus.
6977a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
6978a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6979a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6980a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *      shl-int/lit8, shr-int/lit8, ushr-int/lit8
6981a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
6982a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* binop/lit8 vAA, vBB, #+CC */
6983a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_S(r3, 1)                      @ r3<- ssssCCBB (sign-extended for CC)
6984a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
6985a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r3, #255                @ r2<- BB
6986a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- vBB
6987a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r1, r3, asr #8              @ r1<- ssssssCC (sign extended)
6988a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if 0
6989a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @cmp     r1, #0                      @ is second operand zero?
6990a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errDivideByZero
6991a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
6992a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
6993a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
6994a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r1, r1, #31                           @ optional op; may set condition codes
6995a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0, lsr r1                              @ r0<- op, r0-r3 changed
6996a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
6997a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r9)               @ vAA<- r0
6998a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
6999a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* 10-12 instructions */
7000a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7001a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7002a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7003a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7004c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_IGET_VOLATILE: /* 0xe3 */
7005c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_IGET_VOLATILE.S */
7006c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_IGET.S */
7007c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7008c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * General 32-bit instance field get.
7009c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7010c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
7011c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7012c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vA, vB, field@CCCC */
7013c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
70149f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
7015c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
7016c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
7017c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
7018c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
7019c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
7020c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IGET_VOLATILE_finish          @ no, already resolved
70219f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
7022c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    EXPORT_PC()                         @ resolve() could throw
7023c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
7024c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
7025c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0
7026c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IGET_VOLATILE_finish
7027c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    b       common_exceptionThrown
7028a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7029a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7030a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7031a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7032c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_IPUT_VOLATILE: /* 0xe4 */
7033c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_IPUT_VOLATILE.S */
7034c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_IPUT.S */
7035c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7036c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * General 32-bit instance field put.
7037c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7038919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput, iput-boolean, iput-byte, iput-char, iput-short
7039c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7040c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vA, vB, field@CCCC */
7041c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
70429f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
7043c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
7044c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
7045c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
7046c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
7047c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
7048c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IPUT_VOLATILE_finish          @ no, already resolved
70499f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
7050c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    EXPORT_PC()                         @ resolve() could throw
7051c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
7052c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
7053c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ success?
7054c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IPUT_VOLATILE_finish          @ yes, finish up
7055c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    b       common_exceptionThrown
7056a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7057a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7058a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7059a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7060c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_SGET_VOLATILE: /* 0xe5 */
7061c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_SGET_VOLATILE.S */
7062c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_SGET.S */
7063c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7064c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * General 32-bit SGET handler.
7065c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7066c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
7067c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7068c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vAA, field@BBBB */
70699f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
7070c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
70719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
70729a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
7073c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
7074c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    beq     .LOP_SGET_VOLATILE_resolve         @ yes, do resolve
7075c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.LOP_SGET_VOLATILE_finish: @ field ptr in r0
7076c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
70770890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    SMP_DMB                            @ acquiring load
7078c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
7079c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7080c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
7081c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7082c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7083a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7084a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7085a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7086a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7087c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_SPUT_VOLATILE: /* 0xe6 */
7088c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_SPUT_VOLATILE.S */
7089c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_SPUT.S */
7090c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7091c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * General 32-bit SPUT handler.
7092c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7093919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput, sput-boolean, sput-byte, sput-char, sput-short
7094c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7095c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vAA, field@BBBB */
70969f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
7097c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
70989a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
70999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
7100c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
7101c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    beq     .LOP_SPUT_VOLATILE_resolve         @ yes, do resolve
7102c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.LOP_SPUT_VOLATILE_finish:   @ field ptr in r0
7103c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
7104c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7105c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_VREG(r1, r2)                    @ r1<- fp[AA]
7106c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
71074185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    SMP_DMB_ST                        @ releasing store
7108c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    str     r1, [r0, #offStaticField_value] @ field<- vAA
71094185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    SMP_DMB
7110c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7115c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
7116c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_IGET_OBJECT_VOLATILE.S */
7117c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_IGET.S */
7118c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7119c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * General 32-bit instance field get.
7120c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7121c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
7122c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7123c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vA, vB, field@CCCC */
7124c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
71259f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
7126c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
7127c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
7128c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
7129c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
7130c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
7131c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IGET_OBJECT_VOLATILE_finish          @ no, already resolved
71329f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
7133c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    EXPORT_PC()                         @ resolve() could throw
7134c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
7135c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
7136c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0
7137c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IGET_OBJECT_VOLATILE_finish
7138c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    b       common_exceptionThrown
7139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
71435387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden.L_OP_IGET_WIDE_VOLATILE: /* 0xe8 */
71445387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_IGET_WIDE_VOLATILE.S */
71455387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_IGET_WIDE.S */
71465387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    /*
71475387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden     * Wide 32-bit instance field get.
71485387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden     */
71495387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    /* iget-wide vA, vB, field@CCCC */
71505387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
71519f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
71525387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
71535387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pResFields
71545387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
71555387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
71565387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
71575387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    bne     .LOP_IGET_WIDE_VOLATILE_finish          @ no, already resolved
71589f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method] @ r2<- current method
71595387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    EXPORT_PC()                         @ resolve() could throw
71605387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
71615387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
71625387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    cmp     r0, #0
71635387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    bne     .LOP_IGET_WIDE_VOLATILE_finish
71645387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    b       common_exceptionThrown
7165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7168a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
71695387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden.L_OP_IPUT_WIDE_VOLATILE: /* 0xe9 */
71705387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_IPUT_WIDE_VOLATILE.S */
71715387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_IPUT_WIDE.S */
71725387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    /* iput-wide vA, vB, field@CCCC */
71735387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
71749f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
71755387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
71765387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pResFields
71775387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
71785387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
71795387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
71805387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    bne     .LOP_IPUT_WIDE_VOLATILE_finish          @ no, already resolved
71819f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method] @ r2<- current method
71825387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    EXPORT_PC()                         @ resolve() could throw
71835387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
71845387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
71855387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    cmp     r0, #0                      @ success?
71865387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    bne     .LOP_IPUT_WIDE_VOLATILE_finish          @ yes, finish up
71875387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    b       common_exceptionThrown
7188a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7189a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
71925387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden.L_OP_SGET_WIDE_VOLATILE: /* 0xea */
71935387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_SGET_WIDE_VOLATILE.S */
71945387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_SGET_WIDE.S */
71955387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    /*
71965387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden     * 64-bit SGET handler.
71975387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden     */
71985387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    /* sget-wide vAA, field@BBBB */
71999f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
72005387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
72019a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
72029a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
72035387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
72045387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    beq     .LOP_SGET_WIDE_VOLATILE_resolve         @ yes, do resolve
72055387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden.LOP_SGET_WIDE_VOLATILE_finish:
7206861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
7207861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .if 1
7208861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    add     r0, r0, #offStaticField_value @ r0<- pointer to data
72096e10b9aaa72425a4825a25f0043533d0c6fdbba4Andy McFadden    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
7210861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .else
7211861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
7212861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .endif
7213861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
72145387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7215861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
72165387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
72175387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7218a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7219a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7220a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7221a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
72225387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden.L_OP_SPUT_WIDE_VOLATILE: /* 0xeb */
72235387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_SPUT_WIDE_VOLATILE.S */
72245387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden/* File: armv5te/OP_SPUT_WIDE.S */
72255387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    /*
72265387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden     * 64-bit SPUT handler.
72275387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden     */
72285387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    /* sput-wide vAA, field@BBBB */
72299f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_methodClassDex]  @ r0<- DvmDex
72305387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
72319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r0, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
72325387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    mov     r9, rINST, lsr #8           @ r9<- AA
72339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r2, [r10, r1, lsl #2]        @ r2<- resolved StaticField ptr
72345387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
7235861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    cmp     r2, #0                      @ is resolved entry null?
72365387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    beq     .LOP_SPUT_WIDE_VOLATILE_resolve         @ yes, do resolve
7237861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden.LOP_SPUT_WIDE_VOLATILE_finish: @ field ptr in r2, AA in r9
72385387824f19033ed51a945fbc8c2b574998404b3dAndy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7239861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    ldmia   r9, {r0-r1}                 @ r0/r1<- vAA/vAA+1
7240861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    GET_INST_OPCODE(r10)                @ extract opcode from rINST
7241861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .if 1
7242861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    add     r2, r2, #offStaticField_value @ r2<- pointer to data
72434185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    bl      dvmQuasiAtomicSwap64Sync    @ stores r0/r1 into addr r2
7244861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .else
7245861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
7246861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    .endif
7247861b33855aff080278ea5125e4372a2d4bf8aef5Andy McFadden    GOTO_OPCODE(r10)                    @ jump to next instruction
7248a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7249a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7250a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7251a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
725296516932f1557d8f48a8b2dbbb885af01a11ef6eAndy McFadden.L_OP_BREAKPOINT: /* 0xec */
725396516932f1557d8f48a8b2dbbb885af01a11ef6eAndy McFadden/* File: armv5te/OP_BREAKPOINT.S */
72549a3147c7412f4794434b4c2604aa2ba784867774buzbee    /*
72559a3147c7412f4794434b4c2604aa2ba784867774buzbee     * Breakpoint handler.
72569a3147c7412f4794434b4c2604aa2ba784867774buzbee     *
72579a3147c7412f4794434b4c2604aa2ba784867774buzbee     * Restart this instruction with the original opcode.  By
72589a3147c7412f4794434b4c2604aa2ba784867774buzbee     * the time we get here, the breakpoint will have already been
72599a3147c7412f4794434b4c2604aa2ba784867774buzbee     * handled.
72609a3147c7412f4794434b4c2604aa2ba784867774buzbee     */
72619a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r0, rPC
72629a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      dvmGetOriginalOpcode        @ (rPC)
72639a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH(rINST, 0)                     @ reload OP_BREAKPOINT + rest of inst
726400ceb87d1c57ccee59966be4deef1292a049285cbuzbee    ldr     r1, [rSELF, #offThread_mainHandlerTable]
72659a3147c7412f4794434b4c2604aa2ba784867774buzbee    and     rINST, #0xff00
72669a3147c7412f4794434b4c2604aa2ba784867774buzbee    orr     rINST, rINST, r0
726700ceb87d1c57ccee59966be4deef1292a049285cbuzbee    GOTO_OPCODE_BASE(r1, r0)
7268a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7269a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7270a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7271a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_THROW_VERIFICATION_ERROR: /* 0xed */
7272a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_THROW_VERIFICATION_ERROR.S */
7273a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle a throw-verification-error instruction.  This throws an
7275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * exception for an error discovered during verification.  The
7276a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * exception is indicated by AA, with some detail provided by BBBB.
7277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op AA, ref@BBBB */
72799f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_method]    @ r0<- self->method
7280a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r2, 1)                        @ r2<- BBBB
7281a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ export the PC
7282a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #8           @ r1<- AA
7283a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmThrowVerificationError   @ always throws
7284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown      @ handle exception
7285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7286a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7287a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_EXECUTE_INLINE: /* 0xee */
7289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_EXECUTE_INLINE.S */
7290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7291a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Execute a "native inline" instruction.
7292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7293b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * We need to call an InlineOp4Func:
7294b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     *  bool (func)(u4 arg0, u4 arg1, u4 arg2, u4 arg3, JValue* pResult)
7295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7296b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * The first four args are in r0-r3, pointer to return value storage
7297b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * is on the stack.  The function's return value is a flag that tells
7298b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * us if an exception was thrown.
72999a3147c7412f4794434b4c2604aa2ba784867774buzbee     *
73009a3147c7412f4794434b4c2604aa2ba784867774buzbee     * TUNING: could maintain two tables, pointer in Thread and
73019a3147c7412f4794434b4c2604aa2ba784867774buzbee     * swap if profiler/debuggger active.
7302a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7303a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* [opt] execute-inline vAA, {vC, vD, vE, vF}, inline@BBBB */
7304389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    r2, [rSELF, #offThread_subMode]
7305a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 1)                       @ r10<- BBBB
7306a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ can throw
73079a3147c7412f4794434b4c2604aa2ba784867774buzbee    ands    r2, #kSubModeDebugProfile   @ Any going on?
73089a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     .LOP_EXECUTE_INLINE_debugmode       @ yes - take slow path
73099a3147c7412f4794434b4c2604aa2ba784867774buzbee.LOP_EXECUTE_INLINE_resume:
73109a3147c7412f4794434b4c2604aa2ba784867774buzbee    add     r1, rSELF, #offThread_retval  @ r1<- &self->retval
7311b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    sub     sp, sp, #8                  @ make room for arg, +64 bit align
7312a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
73139f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [sp]                    @ push &self->retval
7314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      .LOP_EXECUTE_INLINE_continue        @ make call; will return after
7315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     sp, sp, #8                  @ pop stack
7316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ test boolean result of inline
7317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_exceptionThrown      @ returned false, handle exception
7318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
7319a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7320a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7321a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7322a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7323a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7324b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden.L_OP_EXECUTE_INLINE_RANGE: /* 0xef */
7325b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden/* File: armv5te/OP_EXECUTE_INLINE_RANGE.S */
7326b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    /*
7327b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * Execute a "native inline" instruction, using "/range" semantics.
7328b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * Same idea as execute-inline, but we get the args differently.
7329b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     *
7330b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * We need to call an InlineOp4Func:
7331b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     *  bool (func)(u4 arg0, u4 arg1, u4 arg2, u4 arg3, JValue* pResult)
7332b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     *
7333b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * The first four args are in r0-r3, pointer to return value storage
7334b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * is on the stack.  The function's return value is a flag that tells
7335b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     * us if an exception was thrown.
7336b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden     */
7337b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    /* [opt] execute-inline/range {vCCCC..v(CCCC+AA-1)}, inline@BBBB */
7338389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    r2, [rSELF, #offThread_subMode]
7339b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    FETCH(r10, 1)                       @ r10<- BBBB
7340b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    EXPORT_PC()                         @ can throw
73419a3147c7412f4794434b4c2604aa2ba784867774buzbee    ands    r2, #kSubModeDebugProfile   @ Any going on?
73429a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     .LOP_EXECUTE_INLINE_RANGE_debugmode       @ yes - take slow path
73439a3147c7412f4794434b4c2604aa2ba784867774buzbee.LOP_EXECUTE_INLINE_RANGE_resume:
73449a3147c7412f4794434b4c2604aa2ba784867774buzbee    add     r1, rSELF, #offThread_retval  @ r1<- &self->retval
7345b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    sub     sp, sp, #8                  @ make room for arg, +64 bit align
7346b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- AA
73479f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [sp]                    @ push &self->retval
7348b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    bl      .LOP_EXECUTE_INLINE_RANGE_continue        @ make call; will return after
7349b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    add     sp, sp, #8                  @ pop stack
7350b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    cmp     r0, #0                      @ test boolean result of inline
7351b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    beq     common_exceptionThrown      @ returned false, handle exception
7352b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
7353b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7354b0a0541b59d1126ff77c88de742b4a74579fe296Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
73580346e9dcddccd449c731e42ef83708ff6d8f0976Andy McFadden.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
73590346e9dcddccd449c731e42ef83708ff6d8f0976Andy McFadden/* File: armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S */
7360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
73616af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden     * Invoke Object.<init> on an object.  In practice we know that
73626af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden     * Object's nullary constructor doesn't do anything, so we just
73639a3147c7412f4794434b4c2604aa2ba784867774buzbee     * skip it unless a debugger is active.
73646af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden     */
736524bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden    FETCH(r1, 2)                  @ r1<- CCCC
73666af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden    GET_VREG(r0, r1)                    @ r0<- "this" ptr
73676af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden    cmp     r0, #0                      @ check for NULL
73686af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden    beq     common_errNullObject        @ export PC and throw NPE
73696af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden    ldr     r1, [r0, #offObject_clazz]  @ r1<- obj->clazz
73706af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden    ldr     r2, [r1, #offClassObject_accessFlags] @ r2<- clazz->accessFlags
73716af2ddd107842c3737c04c37343cac9be17f4209Andy McFadden    tst     r2, #CLASS_ISFINALIZABLE    @ is this class finalizable?
73729a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     .LOP_INVOKE_OBJECT_INIT_RANGE_setFinal        @ yes, go
73739a3147c7412f4794434b4c2604aa2ba784867774buzbee.LOP_INVOKE_OBJECT_INIT_RANGE_finish:
7374389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    r1, [rSELF, #offThread_subMode]
73759a3147c7412f4794434b4c2604aa2ba784867774buzbee    ands    r1, #kSubModeDebuggerActive @ debugger active?
73769a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     .LOP_INVOKE_OBJECT_INIT_RANGE_debugger        @ Yes - skip optimization
73779a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST(2+1)       @ advance to next instr, load rINST
7378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
7379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ execute it
7380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7383291758c5c4902900c6f86794ba8ab9cad9b26197Andy McFadden.L_OP_RETURN_VOID_BARRIER: /* 0xf1 */
7384291758c5c4902900c6f86794ba8ab9cad9b26197Andy McFadden/* File: armv5te/OP_RETURN_VOID_BARRIER.S */
73851df319e3674d993a07bc0ff1f56a5915410b5903Andy McFadden    SMP_DMB_ST
7386291758c5c4902900c6f86794ba8ab9cad9b26197Andy McFadden    b       common_returnFromMethod
7387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7388a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7389a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7390a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_QUICK: /* 0xf2 */
7391a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_QUICK.S */
7392a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* For: iget-quick, iget-object-quick */
7393a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, offset@CCCC */
7394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
7395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r2)                    @ r3<- object we're operating on
7396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field byte offset
7397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r3, #0                      @ check object for null
7398a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- A(+)
7399a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ object was null
7400a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1]                @ r0<- obj.field (always 32 bits)
7401a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7402a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15
7403a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r2)                    @ fp[A]<- r0
7405a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7408a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_WIDE_QUICK: /* 0xf3 */
7410a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_WIDE_QUICK.S */
7411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* iget-wide-quick vA, vB, offset@CCCC */
7412a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
7413a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r2)                    @ r3<- object we're operating on
7414b48a4d53bc3349b5c99f8b87a396e7374e2d335cDave Butcher    FETCH(ip, 1)                        @ ip<- field byte offset
7415a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r3, #0                      @ check object for null
7416a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- A(+)
7417a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ object was null
7418b48a4d53bc3349b5c99f8b87a396e7374e2d335cDave Butcher    ldrd    r0, [r3, ip]                @ r0<- obj.field (64 bits, aligned)
7419a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15
7420a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7421a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r2, lsl #2         @ r3<- &fp[A]
7422a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
7424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7425a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7427a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IGET_OBJECT_QUICK: /* 0xf4 */
7429a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_OBJECT_QUICK.S */
7430a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IGET_QUICK.S */
7431a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* For: iget-quick, iget-object-quick */
7432a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, offset@CCCC */
7433a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
7434a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r2)                    @ r3<- object we're operating on
7435a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field byte offset
7436a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r3, #0                      @ check object for null
7437a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- A(+)
7438a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ object was null
7439a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, r1]                @ r0<- obj.field (always 32 bits)
7440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15
7442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SET_VREG(r0, r2)                    @ fp[A]<- r0
7444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7445a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7446a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_QUICK: /* 0xf5 */
7450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_QUICK.S */
7451919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee    /* For: iput-quick */
7452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, offset@CCCC */
7453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
7454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r2)                    @ r3<- fp[B], the object pointer
7455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field byte offset
7456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r3, #0                      @ check object for null
7457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- A(+)
7458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ object was null
7459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15
7460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- fp[A]
7461a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7462a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r0, [r3, r1]                @ obj.field (always 32 bits)<- r0
7463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7465a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7466a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7467a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7468a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_WIDE_QUICK: /* 0xf6 */
7469a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_WIDE_QUICK.S */
7470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* iput-wide-quick vA, vB, offset@CCCC */
7471a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rINST, lsr #8           @ r0<- A(+)
7472a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, rINST, lsr #12          @ r1<- B
7473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r0, r0, #15
7474a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r2, r1)                    @ r2<- fp[B], the object pointer
7475a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r0, lsl #2         @ r3<- &fp[A]
7476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ check object for null
7477a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmia   r3, {r0-r1}                 @ r0/r1<- fp[A]
7478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ object was null
7479a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r3, 1)                        @ r3<- field byte offset
7480a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7481a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    strd    r0, [r2, r3]                @ obj.field (64 bits, aligned)<- r0/r1
7482a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
7488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_IPUT_OBJECT_QUICK.S */
7489919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee    /* For: iput-object-quick */
7490a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vA, vB, offset@CCCC */
7491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #12          @ r2<- B
7492a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r3, r2)                    @ r3<- fp[B], the object pointer
7493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- field byte offset
7494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r3, #0                      @ check object for null
7495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, rINST, lsr #8           @ r2<- A(+)
7496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ object was null
7497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r2, r2, #15
7498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_VREG(r0, r2)                    @ r0<- fp[A]
74999f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
7500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7501a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r0, [r3, r1]                @ obj.field (always 32 bits)<- r0
7502919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee    cmp     r0, #0
7503d82097f6b409c5cd48568e54eb701604c3cceb18buzbee    strneb  r2, [r2, r3, lsr #GC_CARD_SHIFT] @ mark card based on obj head
7504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7505a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7506a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
7510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_VIRTUAL_QUICK.S */
7511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle an optimized virtual method call.
7513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: [opt] invoke-virtual-quick, invoke-virtual-quick/range
7515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
7517a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
7518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r3, 2)                        @ r3<- FEDC or CCCC
7519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
7520a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!0)
7521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r3, r3, #15                 @ r3<- C (or stays CCCC)
7522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
75239a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r3)                    @ r9<- vC ("this" ptr)
75249a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ is "this" null?
7525a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ null "this", throw exception
75269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r2, [r9, #offObject_clazz]  @ r2<- thisPtr->clazz
7527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offClassObject_vtable]    @ r2<- thisPtr->clazz->vtable
7528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ invoke must export
7529a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r3<- vtable[BBBB]
75309a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      common_invokeMethodNoRange @ (r0=method, r9="this")
7531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7533a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_VIRTUAL_QUICK_RANGE: /* 0xf9 */
7535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_VIRTUAL_QUICK_RANGE.S */
7536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_VIRTUAL_QUICK.S */
7537a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle an optimized virtual method call.
7539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7540a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: [opt] invoke-virtual-quick, invoke-virtual-quick/range
7541a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7542a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
7543a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
7544a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r3, 2)                        @ r3<- FEDC or CCCC
7545a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
7546a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!1)
7547a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r3, r3, #15                 @ r3<- C (or stays CCCC)
7548a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
75499a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r3)                    @ r9<- vC ("this" ptr)
75509a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ is "this" null?
7551a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ null "this", throw exception
75529a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r2, [r9, #offObject_clazz]  @ r2<- thisPtr->clazz
7553a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offClassObject_vtable]    @ r2<- thisPtr->clazz->vtable
7554a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ invoke must export
7555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r3<- vtable[BBBB]
75569a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      common_invokeMethodRange @ (r0=method, r9="this")
7557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_SUPER_QUICK: /* 0xfa */
7562a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_SUPER_QUICK.S */
7563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle an optimized "super" method call.
7565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: [opt] invoke-super-quick, invoke-super-quick/range
7567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
7569a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
7570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
75719f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
7572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!0)
7573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
7574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
7575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
7576a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offMethod_clazz]  @ r2<- method->clazz
7577a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
7578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offClassObject_super]     @ r2<- method->clazz->super
75799a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r10)                   @ r9<- "this"
7580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offClassObject_vtable]    @ r2<- ...clazz->super->vtable
75819a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null "this" ref?
7582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- super->vtable[BBBB]
7583a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ "this" is null, throw exception
75849a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      common_invokeMethodNoRange @ (r0=method, r9="this")
7585a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7586a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
7589a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_SUPER_QUICK_RANGE.S */
7590a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/OP_INVOKE_SUPER_QUICK.S */
7591a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7592a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Handle an optimized "super" method call.
7593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * for: [opt] invoke-super-quick, invoke-super-quick/range
7595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
7597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
7598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r10, 2)                       @ r10<- GFED or CCCC
75999f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
7600a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     (!1)
7601a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    and     r10, r10, #15               @ r10<- D (or stays CCCC)
7602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
7603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 1)                        @ r1<- BBBB
7604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offMethod_clazz]  @ r2<- method->clazz
7605a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ must export for invoke
7606a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offClassObject_super]     @ r2<- method->clazz->super
76079a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r9, r10)                   @ r9<- "this"
7608a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offClassObject_vtable]    @ r2<- ...clazz->super->vtable
76099a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0                      @ null "this" ref?
7610a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- super->vtable[BBBB]
7611a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_errNullObject        @ "this" is null, throw exception
76129a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      common_invokeMethodRange @ (r0=method, r9="this")
7613a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7614a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7615a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7616a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7617c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
7618c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_IPUT_OBJECT_VOLATILE.S */
7619919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee/* File: armv5te/OP_IPUT_OBJECT.S */
7620c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7621919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * 32-bit instance field put.
7622c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7623919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: iput-object, iput-object-volatile
7624c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7625c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vA, vB, field@CCCC */
7626c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    mov     r0, rINST, lsr #12          @ r0<- B
76279f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r3, [rSELF, #offThread_methodClassDex]    @ r3<- DvmDex
7628c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref CCCC
7629c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
7630c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
7631c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
7632c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
7633c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ no, already resolved
76349f601a917c8878204482c37aec7005054b6776fabuzbee8:  ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
7635c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    EXPORT_PC()                         @ resolve() could throw
7636c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
7637c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
7638c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ success?
7639c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ yes, finish up
7640c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    b       common_exceptionThrown
7641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7642a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7643a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7645c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
7646c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_SGET_OBJECT_VOLATILE.S */
7647c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_SGET.S */
7648c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7649c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * General 32-bit SGET handler.
7650c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7651c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
7652c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7653c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vAA, field@BBBB */
76549f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
7655c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
76569a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
76579a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]       @ r0<- resolved StaticField ptr
7658c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
7659c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    beq     .LOP_SGET_OBJECT_VOLATILE_resolve         @ yes, do resolve
7660c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.LOP_SGET_OBJECT_VOLATILE_finish: @ field ptr in r0
7661c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
76620890e5bf0b2a502ca1030e9773fabc16ef1b5981Andy McFadden    SMP_DMB                            @ acquiring load
7663c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    mov     r2, rINST, lsr #8           @ r2<- AA
7664c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7665c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    SET_VREG(r1, r2)                    @ fp[AA]<- r1
7666c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7667c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
7668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7669a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7672c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
7673c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden/* File: armv5te/OP_SPUT_OBJECT_VOLATILE.S */
7674919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee/* File: armv5te/OP_SPUT_OBJECT.S */
7675c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /*
7676919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * 32-bit SPUT handler for objects
7677c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     *
7678919eb063ce4542d3698e10e20aba9a2dfbdd0f82buzbee     * for: sput-object, sput-object-volatile
7679c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden     */
7680c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    /* op vAA, field@BBBB */
76819f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r2, [rSELF, #offThread_methodClassDex]    @ r2<- DvmDex
7682c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    FETCH(r1, 1)                        @ r1<- field ref BBBB
76839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields
76849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [r10, r1, lsl #2]        @ r0<- resolved StaticField ptr
7685c35a2ef53d0cccd6f924eeba36633220ec67c32eAndy McFadden    cmp     r0, #0                      @ is resolved entry null?
76869a3147c7412f4794434b4c2604aa2ba784867774buzbee    beq     .LOP_SPUT_OBJECT_VOLATILE_resolve         @ yes, do resolve
76879a3147c7412f4794434b4c2604aa2ba784867774buzbee.LOP_SPUT_OBJECT_VOLATILE_finish:   @ field ptr in r0
76889a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r2, rINST, lsr #8           @ r2<- AA
76899a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
76909a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_VREG(r1, r2)                    @ r1<- fp[AA]
76919a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
76929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r9, [r0, #offField_clazz]   @ r9<- field->clazz
76939a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
76944185972e211b0c84b9fe7d90c56b28cc15e474fabuzbee    SMP_DMB_ST                        @ releasing store
76959a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       .LOP_SPUT_OBJECT_VOLATILE_end
7696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* ------------------------------ */
7699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7700ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_OP_UNUSED_FF: /* 0xff */
7701ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* File: armv5te/OP_UNUSED_FF.S */
7702ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* File: armv5te/unused.S */
7703ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_abort
7704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .balign 64
7707ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .size   dvmAsmInstructionStart, .-dvmAsmInstructionStart
7708ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .global dvmAsmInstructionEnd
7709ab35b50311951feea3782151dd5422ee944685c2Elliott HughesdvmAsmInstructionEnd:
7710ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7711ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/*
7712ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * ===========================================================================
7713ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes *  Sister implementations
7714ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * ===========================================================================
7715ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes */
7716ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .global dvmAsmSisterStart
7717ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .type   dvmAsmSisterStart, %function
7718ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .text
7719ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .balign 4
7720ab35b50311951feea3782151dd5422ee944685c2Elliott HughesdvmAsmSisterStart:
7721ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7722ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CONST_STRING */
7723a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7725ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the String has not yet been resolved.
7726ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1: BBBB (String ref)
7727ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9: target register
7728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7729ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CONST_STRING_resolve:
7730ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()
7731ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rSELF, #offThread_method] @ r0<- self->method
7732ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r0, #offMethod_clazz]  @ r0<- method->clazz
7733ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveString            @ r0<- String reference
7734ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ failed?
7735ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yup, handle the exception
7736ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7737ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7738ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vAA<- r0
7739ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
7740ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7741ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CONST_STRING_JUMBO */
7742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7743a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7744ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the String has not yet been resolved.
7745ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1: BBBBBBBB (String ref)
7746ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9: target register
7747a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7748ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CONST_STRING_JUMBO_resolve:
7749ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()
7750ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rSELF, #offThread_method] @ r0<- self->method
7751ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r0, #offMethod_clazz]  @ r0<- method->clazz
7752ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveString            @ r0<- String reference
7753ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ failed?
7754ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yup, handle the exception
7755ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
7756ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7757ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vAA<- r0
7758ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
7759ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7760ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CONST_CLASS */
7761a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7763ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the Class has not yet been resolved.
7764ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1: BBBB (Class ref)
7765ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9: target register
7766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7767ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CONST_CLASS_resolve:
7768ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()
7769ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rSELF, #offThread_method] @ r0<- self->method
7770ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #1                      @ r2<- true
7771ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r0, #offMethod_clazz]  @ r0<- method->clazz
7772ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveClass             @ r0<- Class reference
7773ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ failed?
7774ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yup, handle the exception
7775ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7776ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7777ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vAA<- r0
7778ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
7779ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7780ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CHECK_CAST */
7781a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
778271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    /*
7783ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Trivial test failed, need to perform full check.  This is common.
7784ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds obj->clazz
7785ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1 holds desired class resolved from BBBB
7786ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
778771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     */
7788ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CHECK_CAST_fullcheck:
7789ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r10, r1                     @ avoid ClassObject getting clobbered
7790ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmInstanceofNonTrivial     @ r0<- boolean result
7791ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ failed?
7792ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_CHECK_CAST_okay            @ no, success
7793ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7794ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ A cast has failed.  We need to throw a ClassCastException.
7795ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ about to throw
7796ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r9, #offObject_clazz]  @ r0<- obj->clazz (actual class)
7797ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r10                     @ r1<- desired class
7798ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmThrowClassCastException
7799ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown
7800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7802ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Resolution required.  This is the least-likely path.
7803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7804ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r2 holds BBBB
7805ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
7806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7807ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CHECK_CAST_resolve:
7808ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw
7809ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
7810ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r2                      @ r1<- BBBB
7811a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, #0                      @ r2<- false
7812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
7813ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveClass             @ r0<- resolved ClassObject ptr
7814a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ got null?
7815a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_exceptionThrown      @ yes, handle exception
7816ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r0                      @ r1<- class resolved from BBB
7817ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r9, #offObject_clazz]  @ r0<- obj->clazz
7818ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_CHECK_CAST_resolved        @ pick up where we left off
7819ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7820ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INSTANCE_OF */
7821a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7822a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7823ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Trivial test failed, need to perform full check.  This is common.
7824ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds obj->clazz
7825ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1 holds class resolved from BBBB
7826ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds A
7827a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7828ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INSTANCE_OF_fullcheck:
7829ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmInstanceofNonTrivial     @ r0<- boolean result
7830ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ fall through to OP_INSTANCE_OF_store
7831a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7832a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7833ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r0 holds boolean result
7834ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r9 holds A
7835a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7836ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INSTANCE_OF_store:
7837ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7838ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vA<- r0
7839ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7840ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
7841a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7842a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7843ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Trivial test succeeded, save and bail.
7844ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds A
7845a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7846ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INSTANCE_OF_trivial:
7847ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, #1                      @ indicate success
7848ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ could b OP_INSTANCE_OF_store, but copying is faster and cheaper
7849ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7850ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vA<- r0
7851ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7852ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
7853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7855ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Resolution required.  This is the least-likely path.
7856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7857ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r3 holds BBBB
7858ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds A
7859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7860ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INSTANCE_OF_resolve:
7861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()                         @ resolve() could throw
7862ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rSELF, #offThread_method]    @ r0<- self->method
7863ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r3                      @ r1<- BBBB
7864ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #1                      @ r2<- true
7865ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r0, #offMethod_clazz]  @ r0<- method->clazz
7866ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveClass             @ r0<- resolved ClassObject ptr
7867ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
7868ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yes, handle exception
7869ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r0                      @ r1<- class resolved from BBB
7870ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r3, rINST, lsr #12          @ r3<- B
7871ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r3)                    @ r0<- vB (object)
7872ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
7873ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_INSTANCE_OF_resolved        @ pick up where we left off
7874a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7875ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_NEW_INSTANCE */
7876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7877ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .balign 32                          @ minimize cache lines
7878ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_NEW_INSTANCE_finish: @ r0=new object
7879ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r3, rINST, lsr #8           @ r3<- AA
7880ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ failed?
7881ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
7882a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7883ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * The JIT needs the class to be fully resolved before it can
7884ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * include this instruction in a trace.
7885a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7886ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrh    r1, [rSELF, #offThread_subMode]
7887ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yes, handle the exception
7888ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ands    r1, #kSubModeJitTraceBuild  @ under construction?
7889ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_NEW_INSTANCE_jitCheck
7890ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#else
7891ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yes, handle the exception
7892ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
7893ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_NEW_INSTANCE_end:
7894ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7895ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7896ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r3)                    @ vAA<- r0
7897ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
7898a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7899ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
7900a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7901ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Check to see if we need to stop the trace building early.
7902ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r0: new object
7903ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r3: vAA
790471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     */
7905ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_NEW_INSTANCE_jitCheck:
7906ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r10]                   @ reload resolved class
7907ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r1, #0                      @ okay?
7908ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_NEW_INSTANCE_end             @ yes, finish
7909ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r0                      @ preserve new object
7910ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r10, r3                     @ preserve vAA
7911ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, rSELF
7912ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rPC
7913ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmJitEndTraceSelect        @ (self, pc)
7914ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7915ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7916ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r9, r10)                   @ vAA<- new object
7917ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
7918ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
791971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
792071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    /*
7921ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Class initialization required.
7922a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
7923ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds class object
7924a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7925ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_NEW_INSTANCE_needinit:
7926ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r0                      @ save r0
7927ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmInitClass                @ initialize class
7928ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ check boolean result
7929ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r9                      @ restore r0
7930ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_NEW_INSTANCE_initialized     @ success, continue
7931ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown      @ failed, deal with init exception
7932a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7933a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7934ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Resolution required.  This is the least-likely path.
793571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     *
7936ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1 holds BBBB
7937a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7938ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_NEW_INSTANCE_resolve:
7939ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
7940ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #0                      @ r2<- false
7941ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
7942ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveClass             @ r0<- resolved ClassObject ptr
7943ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
7944ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_NEW_INSTANCE_resolved        @ no, continue
7945ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown      @ yes, handle exception
7946a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7947ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_NEW_ARRAY */
7948a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7949a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7950a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7951ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Resolve class.  (This is an uncommon case.)
795271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     *
7953ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1 holds array length
7954ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r2 holds class ref CCCC
7955a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7956ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_NEW_ARRAY_resolve:
7957ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
7958ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r1                      @ r9<- length (save)
7959ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r2                      @ r1<- CCCC
7960ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #0                      @ r2<- false
7961ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
7962ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveClass             @ r0<- call(clazz, ref)
7963ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
7964ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r9                      @ r1<- length (restore)
7965ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yes, handle exception
7966ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ fall through to OP_NEW_ARRAY_finish
7967a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7968a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7969ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Finish allocation.
797071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     *
7971ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds class
7972ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1 holds array length
7973a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7974ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_NEW_ARRAY_finish:
7975ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #ALLOC_DONT_TRACK       @ don't track in local refs table
7976ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmAllocArrayByClass        @ r0<- call(clazz, length, flags)
7977ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ failed?
7978ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
7979ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ yes, handle the exception
7980ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
7981ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
798271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
7983ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ vA<- r0
798471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    GOTO_OPCODE(ip)                     @ jump to next instruction
7985a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
7986ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_FILLED_NEW_ARRAY */
7987ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
7988a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
7989ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * On entry:
7990ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds array class
7991ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 holds AA or BA
7992a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
7993ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_FILLED_NEW_ARRAY_continue:
7994ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offClassObject_descriptor] @ r3<- arrayClass->descriptor
7995ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #ALLOC_DONT_TRACK       @ r2<- alloc flags
7996ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrb    rINST, [r3, #1]             @ rINST<- descriptor[1]
7997ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     0
7998ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r10                     @ r1<- AA (length)
799924bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden    .else
8000ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r10, lsr #4             @ r1<- B (length)
800124bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden    .endif
8002ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     rINST, #'I'                 @ array of ints?
8003ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmpne   rINST, #'L'                 @ array of objects?
8004ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmpne   rINST, #'['                 @ array of arrays?
8005ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r1                      @ save length in r9
8006ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_FILLED_NEW_ARRAY_notimpl         @ no, not handled yet
8007ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmAllocArrayByClass        @ r0<- call(arClass, length, flags)
8008ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ null return?
8009ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ alloc failed, handle exception
8010a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8011ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH(r1, 2)                        @ r1<- FEDC or CCCC
8012ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r0, [rSELF, #offThread_retval]      @ retval.l <- new array
8013ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     rINST, [rSELF, #offThread_retval+4] @ retval.h <- type
8014ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r0, r0, #offArrayObject_contents @ r0<- newArray->contents
8015ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    subs    r9, r9, #1                  @ length--, check for neg
8016ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(3)               @ advance to next instr, load rINST
8017ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bmi     2f                          @ was zero, bail
8018a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8019ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ copy values from registers into the array
8020ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ r0=array, r1=CCCC/FEDC, r9=length (from AA or B), r10=AA/BA
8021ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     0
8022ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r2, rFP, r1, lsl #2         @ r2<- &fp[CCCC]
8023ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes1:  ldr     r3, [r2], #4                @ r3<- *r2++
8024ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    subs    r9, r9, #1                  @ count--
8025ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r3, [r0], #4                @ *contents++ = vX
8026ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bpl     1b
8027ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ continue at 2
8028ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .else
8029ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #4                      @ length was initially 5?
8030ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r10, #15                @ r2<- A
8031ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     1f                          @ <= 4 args, branch
8032ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r3, r2)                    @ r3<- vA
8033ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    sub     r9, r9, #1                  @ count--
8034ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r3, [r0, #16]               @ contents[4] = vA
8035ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes1:  and     r2, r1, #15                 @ r2<- F/E/D/C
8036ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r3, r2)                    @ r3<- vF/vE/vD/vC
8037ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r1, lsr #4              @ r1<- next reg in low 4
8038ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    subs    r9, r9, #1                  @ count--
8039ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r3, [r0], #4                @ *contents++ = vX
8040ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bpl     1b
8041ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ continue at 2
8042ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .endif
8043a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8044ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes2:
8045ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rSELF, #offThread_retval]     @ r0<- object
8046ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [rSELF, #offThread_retval+4]   @ r1<- type
8047ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
8048ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                      @ ip<- opcode from rINST
8049ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r1, #'I'                         @ Is int array?
8050ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strneb  r2, [r2, r0, lsr #GC_CARD_SHIFT] @ Mark card based on object head
8051ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                          @ execute it
8052a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
805371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    /*
8054ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Throw an exception indicating that we have not implemented this
8055ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * mode of filled-new-array.
805671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     */
8057ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_FILLED_NEW_ARRAY_notimpl:
8058ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, .L_strFilledNewArrayNotImpl_OP_FILLED_NEW_ARRAY
80595dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel3:  add     r0, pc
8060ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmThrowInternalError
8061ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown
806271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8063a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
8064ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Ideally we'd only define this once, but depending on layout we can
8065ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * exceed the range of the load above.
8066a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
8067a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8068ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_strFilledNewArrayNotImpl_OP_FILLED_NEW_ARRAY:
80695dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrFilledNewArrayNotImpl,3b)
8070a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8071ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_FILLED_NEW_ARRAY_RANGE */
8072a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8073a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
8074ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * On entry:
8075ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds array class
8076ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 holds AA or BA
8077a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
8078ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_FILLED_NEW_ARRAY_RANGE_continue:
8079ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offClassObject_descriptor] @ r3<- arrayClass->descriptor
8080ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #ALLOC_DONT_TRACK       @ r2<- alloc flags
8081ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrb    rINST, [r3, #1]             @ rINST<- descriptor[1]
8082ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     1
8083ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r10                     @ r1<- AA (length)
8084ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .else
8085ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r10, lsr #4             @ r1<- B (length)
8086ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .endif
8087ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     rINST, #'I'                 @ array of ints?
8088ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmpne   rINST, #'L'                 @ array of objects?
8089ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmpne   rINST, #'['                 @ array of arrays?
8090ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r1                      @ save length in r9
8091ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_FILLED_NEW_ARRAY_RANGE_notimpl         @ no, not handled yet
8092ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmAllocArrayByClass        @ r0<- call(arClass, length, flags)
8093ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ null return?
8094ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ alloc failed, handle exception
8095a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8096ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH(r1, 2)                        @ r1<- FEDC or CCCC
8097ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r0, [rSELF, #offThread_retval]      @ retval.l <- new array
8098ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     rINST, [rSELF, #offThread_retval+4] @ retval.h <- type
8099ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r0, r0, #offArrayObject_contents @ r0<- newArray->contents
8100ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    subs    r9, r9, #1                  @ length--, check for neg
8101ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(3)               @ advance to next instr, load rINST
8102ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bmi     2f                          @ was zero, bail
8103ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8104ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ copy values from registers into the array
8105ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ r0=array, r1=CCCC/FEDC, r9=length (from AA or B), r10=AA/BA
8106ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     1
8107ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r2, rFP, r1, lsl #2         @ r2<- &fp[CCCC]
8108ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes1:  ldr     r3, [r2], #4                @ r3<- *r2++
8109ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    subs    r9, r9, #1                  @ count--
8110ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r3, [r0], #4                @ *contents++ = vX
8111ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bpl     1b
8112ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ continue at 2
811324bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden    .else
8114ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #4                      @ length was initially 5?
8115ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r10, #15                @ r2<- A
8116ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     1f                          @ <= 4 args, branch
8117ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r3, r2)                    @ r3<- vA
8118ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    sub     r9, r9, #1                  @ count--
8119ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r3, [r0, #16]               @ contents[4] = vA
8120ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes1:  and     r2, r1, #15                 @ r2<- F/E/D/C
8121ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r3, r2)                    @ r3<- vF/vE/vD/vC
8122ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r1, lsr #4              @ r1<- next reg in low 4
8123ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    subs    r9, r9, #1                  @ count--
8124ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r3, [r0], #4                @ *contents++ = vX
8125ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bpl     1b
8126ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ continue at 2
812724bd4c50bb3ea13be4f049710967961f0546fb2cAndy McFadden    .endif
8128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8129ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes2:
8130ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rSELF, #offThread_retval]     @ r0<- object
8131ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [rSELF, #offThread_retval+4]   @ r1<- type
81329a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
8133ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                      @ ip<- opcode from rINST
8134ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r1, #'I'                         @ Is int array?
8135ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strneb  r2, [r2, r0, lsr #GC_CARD_SHIFT] @ Mark card based on object head
8136ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                          @ execute it
8137a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
8139ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Throw an exception indicating that we have not implemented this
8140ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * mode of filled-new-array.
8141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
8142ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_FILLED_NEW_ARRAY_RANGE_notimpl:
8143ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, .L_strFilledNewArrayNotImpl_OP_FILLED_NEW_ARRAY_RANGE
81445dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel3:  add     r0, pc
8145ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmThrowInternalError
8146ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown
8147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
8149ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Ideally we'd only define this once, but depending on layout we can
8150ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * exceed the range of the load above.
8151a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
8152ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8153ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_strFilledNewArrayNotImpl_OP_FILLED_NEW_ARRAY_RANGE:
81545dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrFilledNewArrayNotImpl,3b)
8155ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8156ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CMPL_FLOAT */
8157ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CMPL_FLOAT_finish:
8158ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vAA<- r0
8159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
8160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8161ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CMPG_FLOAT */
8162ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CMPG_FLOAT_finish:
8163ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vAA<- r0
8164ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8166ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CMPL_DOUBLE */
8167ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CMPL_DOUBLE_finish:
8168ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vAA<- r0
8169ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8170ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8171ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CMPG_DOUBLE */
8172ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CMPG_DOUBLE_finish:
8173ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r9)                    @ vAA<- r0
8174ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8175ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8176ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_CMP_LONG */
8177ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8178ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CMP_LONG_less:
8179ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mvn     r1, #0                      @ r1<- -1
8180ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ Want to cond code the next mov so we can avoid branch, but don't see it;
8181ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ instead, we just replicate the tail end.
8182ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8183ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r1, r9)                    @ vAA<- r1
8184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
8186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8187ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CMP_LONG_greater:
8188ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, #1                      @ r1<- 1
8189ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ fall through to _finish
8190a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8191ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_CMP_LONG_finish:
8192ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8193ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r1, r9)                    @ vAA<- r1
8194a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8195a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
8196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8197ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_AGET_WIDE */
8198ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8199ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_AGET_WIDE_finish:
8200ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8201ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrd    r2, [r0, #offArrayObject_contents]  @ r2/r3<- vBB[vCC]
8202ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r9, rFP, r9, lsl #2         @ r9<- &fp[AA]
8203ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8204ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
8205ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8206ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8207ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_APUT_WIDE */
8208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8209ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_APUT_WIDE_finish:
8210ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8211ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmia   r9, {r2-r3}                 @ r2/r3<- vAA/vAA+1
8212ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8213ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strd    r2, [r0, #offArrayObject_contents]  @ r2/r3<- vBB[vCC]
8214ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8215ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8216ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_APUT_OBJECT */
8217a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
8218ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * On entry:
8219ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  rINST = vBB (arrayObj)
8220ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 = vAA (obj)
8221ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = offset into array (vBB + vCC * width)
8222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
8223ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_APUT_OBJECT_finish:
8224ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ storing null reference?
8225ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     .LOP_APUT_OBJECT_skip_check      @ yes, skip type checks
8226ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r9, #offObject_clazz]  @ r0<- obj->clazz
8227ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [rINST, #offObject_clazz]  @ r1<- arrayObj->clazz
8228ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmCanPutArrayElement       @ test object type vs. array type
8229ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ okay?
8230ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     .LOP_APUT_OBJECT_throw           @ no
8231ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST                   @ r1<- arrayObj
8232ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8233ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_cardTable]     @ get biased CT base
8234ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, #offArrayObject_contents   @ r0<- pointer to slot
8235ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8236ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r9, [r10]                   @ vBB[vCC]<- vAA
8237ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strb    r2, [r2, r1, lsr #GC_CARD_SHIFT] @ mark card using object head
8238ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8239ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_APUT_OBJECT_skip_check:
8240ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8241ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8242ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r9, [r10, #offArrayObject_contents] @ vBB[vCC]<- vAA
8243ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8244ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_APUT_OBJECT_throw:
8245ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ The types don't match.  We need to throw an ArrayStoreException.
8246ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r9, #offObject_clazz]
8247ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [rINST, #offObject_clazz]
8248ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()
8249ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmThrowArrayStoreExceptionIncompatibleElement
8250ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown
8251ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8252ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET */
8253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
8255ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8256ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8257ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
8259ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_finish:
8260ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
8261ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8262ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8263ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8264ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
8265ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                             @ acquiring load
8266ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8267ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8268ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8269ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8270ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
8271ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8272ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8273ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_WIDE */
8274a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
8275a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
8276ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8277ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8278ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
8280ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_WIDE_finish:
8281ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8282ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8283ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8284ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     0
8285ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r0, r9, r3                  @ r0<- address of field
8286ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
8287ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .else
8288ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
8289ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .endif
8290ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8291ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8292ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8293ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r3, rFP, r2, lsl #2         @ r3<- &fp[A]
8294ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8295ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
8296ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8297ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8298ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_OBJECT */
829971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
830071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    /*
8301ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8302ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8303ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
830471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     */
8305ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_OBJECT_finish:
8306ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
8307ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8308ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8309ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8310ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
8311ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                             @ acquiring load
8312ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8313ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8314ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8315ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8316ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
8317ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
8318ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes
8319ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_BOOLEAN */
832071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
832171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    /*
8322ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8323ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8324ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
832571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao     */
8326ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_BOOLEAN_finish:
8327ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak1
8328ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8329ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8330ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8331ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
8332ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                             @ acquiring load
8333ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8334ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8335ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8336ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8337ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
8338ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
833971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8340ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_BYTE */
834171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8342ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8343ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8344ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8345ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8346ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8347ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_BYTE_finish:
8348ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak2
8349ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8350ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8351ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8352ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
8353ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                             @ acquiring load
8354ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8355ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8356ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8357ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8358ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
8359ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
836071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8361ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_CHAR */
836271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8363ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8364ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8365ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8366ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8367ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8368ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_CHAR_finish:
8369ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak3
8370ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8371ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8372ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8373ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
8374ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                             @ acquiring load
8375ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8376ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8377ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8378ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8379ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
8380ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
838171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8382ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_SHORT */
838371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8384ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8385ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8386ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8387ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8388ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8389ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_SHORT_finish:
8390ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak4
8391ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8392ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8393ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8394ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
8395ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                             @ acquiring load
8396ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8397ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8398ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8399ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8400ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
8401ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
840271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8403ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT */
840471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8405ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8406ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8407ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8408ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8409ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8410ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_finish:
8411ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
8412ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
8413ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8414ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
8415ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8416ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
8417ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8418ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8419ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8420ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                         @ releasing store
8421ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
8422ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op
8423ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
842471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8425ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_WIDE */
842671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8427ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8428ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8429ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8430ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8431ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8432ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_WIDE_finish:
8433ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
8434ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8435ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
8436ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8437ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r2, rFP, r2, lsl #2         @ r3<- &fp[A]
8438ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8439ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8440ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
8441ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(r10)                @ extract opcode from rINST
8442ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     0
8443ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r2, r9, r3                  @ r2<- target address
8444ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmQuasiAtomicSwap64Sync    @ stores r0/r1 into addr r2
8445ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .else
8446ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
8447ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .endif
8448ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(r10)                    @ jump to next instruction
844971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8450ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_OBJECT */
845171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8452ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8453ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8454ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8455ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8456ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8457ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_OBJECT_finish:
8458ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
8459ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
8460ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8461ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
8462ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8463ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
8464ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
8465ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8466ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8467ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8468ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                         @ releasing store
8469ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r0, [r9, r3]                @ obj.field (32 bits)<- r0
8470ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op
8471ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ stored a null reference?
8472ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strneb  r2, [r2, r9, lsr #GC_CARD_SHIFT]  @ mark card if not
8473ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
847471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8475ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_BOOLEAN */
847671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8477ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8478ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8479ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8480ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8481ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8482ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_BOOLEAN_finish:
8483ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak1
8484ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
8485ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8486ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
8487ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8488ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
8489ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8490ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8491ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8492ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                         @ releasing store
8493ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
8494ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op
8495ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
849671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8497ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_BYTE */
849871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8499ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8500ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8501ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8502ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8503ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8504ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_BYTE_finish:
8505ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak2
8506ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
8507ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8508ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
8509ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8510ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
8511ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8512ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8513ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8514ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                         @ releasing store
8515ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
8516ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op
8517ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
851871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8519ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_CHAR */
852071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8521ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8522ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8523ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8524ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8525ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8526ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_CHAR_finish:
8527ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak3
8528ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
8529ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8530ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
8531ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8532ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
8533ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8534ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8535ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8536ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                         @ releasing store
8537ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
8538ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op
8539ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
854071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8541ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_SHORT */
854271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8543ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8544ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
8545ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
8546ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
8547ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8548ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_SHORT_finish:
8549ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak4
8550ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
8551ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
8552ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
8553ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
8554ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
8555ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
8556ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
8557ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
8558ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op                         @ releasing store
8559ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
8560ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op
8561ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
856271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8563ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET */
856471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8565ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8566ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8567ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8568ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8569ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8570ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_resolve:
8571ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8572ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8573ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8574ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8575ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8576ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8577ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8578ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8579ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8580ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8581ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8582ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8583ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8584ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8585ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8586ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8587ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_finish
858871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8589ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_WIDE */
859071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8591ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8592ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8593ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8594ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8595ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *
8596ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Returns StaticField pointer in r0.
8597ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8598ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_WIDE_resolve:
8599ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8600ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8601ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r1<- &dvmDex->pResFields[field]
8602ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8603ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8604ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8605ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8606ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8607ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8608ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8609ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8610ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8611ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8612ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8613ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8614ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8615ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_WIDE_finish          @ resume
861671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8617ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_OBJECT */
861871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8619ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8620ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8621ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8622ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8623ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8624ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_OBJECT_resolve:
8625ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8626ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8627ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8628ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8629ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8630ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8631ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8632ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8633ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8634ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8635ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8636ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8637ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8638ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8639ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8640ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8641ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_OBJECT_finish
864271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8643ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_BOOLEAN */
864471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8645ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8646ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8647ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8648ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8649ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8650ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_BOOLEAN_resolve:
8651ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8652ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8653ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8654ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8655ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8656ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8657ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8658ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8659ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8660ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8661ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8662ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8663ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8664ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8665ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8666ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8667ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_BOOLEAN_finish
866871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8669ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_BYTE */
867071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8671ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8672ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8673ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8674ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8675ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8676ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_BYTE_resolve:
8677ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8678ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8679ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8680ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8681ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8682ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8683ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8684ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8685ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8686ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8687ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8688ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8689ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8690ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8691ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8692ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8693ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_BYTE_finish
869471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8695ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_CHAR */
869671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8697ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8698ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8699ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8700ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8701ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8702ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_CHAR_resolve:
8703ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8704ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8705ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8706ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8707ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8708ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8709ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8710ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8711ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8712ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8713ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8714ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8715ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8716ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8717ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8718ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8719ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_CHAR_finish
872071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8721ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_SHORT */
872271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8723ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8724ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8725ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8726ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8727ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8728ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_SHORT_resolve:
8729ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8730ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8731ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8732ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8733ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8734ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8735ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8736ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8737ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8738ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8739ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8740ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8741ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8742ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8743ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8744ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8745ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_SHORT_finish
874671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8747ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT */
874871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8749ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8750ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8751ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8752ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8753ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8754ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_resolve:
8755ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8756ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8757ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8758ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8759ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8760ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8761ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8762ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8763ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8764ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8765ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8766ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8767ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8768ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8769ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8770ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8771ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_finish          @ resume
877271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8773ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_WIDE */
877471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8775ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8776ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8777ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8778ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9:  &fp[AA]
8779ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8780ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *
8781ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Returns StaticField pointer in r2.
8782ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8783ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_WIDE_resolve:
8784ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8785ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8786ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8787ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8788ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8789ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8790ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8791ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8792ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, r0                      @ copy to r2
8793ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8794ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8795ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8796ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8797ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8798ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8799ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8800ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8801ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_WIDE_finish          @ resume
880271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8803ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_OBJECT */
880471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
880571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8806ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_OBJECT_end:
8807ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r1, [r0, #offStaticField_value]  @ field<- vAA
8808ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ no-op
8809ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r1, #0                      @ stored a null object?
8810ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strneb  r2, [r2, r9, lsr #GC_CARD_SHIFT]  @ mark card based on obj head
8811ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
881271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8813ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /* Continuation if the field has not yet been resolved.
8814ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r1:  BBBB field ref
8815ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r10: dvmDex->pResFields
8816ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8817ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_OBJECT_resolve:
8818ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8819ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8820ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8821ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8822ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8823ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8824ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8825ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8826ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8827ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8828ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8829ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8830ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8831ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8832ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8833ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8834ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_OBJECT_finish          @ resume
883571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
883671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8837ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_BOOLEAN */
883871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8839ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8840ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8841ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8842ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8843ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8844ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_BOOLEAN_resolve:
8845ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8846ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8847ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8848ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8849ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8850ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8851ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8852ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8853ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8854ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8855ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8856ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8857ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8858ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8859ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8860ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8861ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_BOOLEAN_finish          @ resume
886271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8863ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_BYTE */
886471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8865ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8866ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8867ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8868ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8869ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8870ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_BYTE_resolve:
8871ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8872ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8873ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8874ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8875ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8876ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8877ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8878ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8879ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8880ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8881ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8882ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8883ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8884ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8885ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8886ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8887ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_BYTE_finish          @ resume
888871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8889ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_CHAR */
889071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8891ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8892ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8893ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8894ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8895ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8896ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_CHAR_resolve:
8897ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8898ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8899ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8900ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8901ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8902ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8903ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8904ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8905ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8906ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8907ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8908ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8909ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8910ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8911ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8912ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8913ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_CHAR_finish          @ resume
891471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8915ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_SHORT */
891671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8917ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8918ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
8919ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
8920ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
8921ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8922ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_SHORT_resolve:
8923ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
8924ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8925ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
8926ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8927ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
8928ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
8929ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
8930ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
8931ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
8932ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
8933ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8934ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
8935ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
8936ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8937ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
8938ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
8939ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_SHORT_finish          @ resume
894071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8941ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_VIRTUAL */
894271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8943ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8944ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * At this point:
8945ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = resolved base method
8946ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = C or CCCC (index of first arg, which is the "this" ptr)
8947ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8948ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_VIRTUAL_continue:
8949ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r9, r10)                   @ r9<- "this" ptr
8950ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrh    r2, [r0, #offMethod_methodIndex]    @ r2<- baseMethod->methodIndex
8951ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ is "this" null?
8952ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ null "this", throw exception
8953ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r9, #offObject_clazz]  @ r3<- thisPtr->clazz
8954ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r3, #offClassObject_vtable]    @ r3<- thisPtr->clazz->vtable
8955ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
8956ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_invokeMethodNoRange @ (r0=method, r9="this")
895771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8958ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_SUPER */
895971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8960ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8961ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * At this point:
8962ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = resolved base method
8963ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = method->clazz
8964ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8965ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_SUPER_continue:
8966ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r10, #offClassObject_super]    @ r1<- method->clazz->super
8967ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrh    r2, [r0, #offMethod_methodIndex]    @ r2<- baseMethod->methodIndex
8968ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r1, #offClassObject_vtableCount]   @ r3<- super->vtableCount
8969ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ must export for invoke
8970ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r2, r3                      @ compare (methodIndex, vtableCount)
8971ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bcs     .LOP_INVOKE_SUPER_nsm             @ method not present in superclass
8972ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r1, #offClassObject_vtable]    @ r1<- ...clazz->super->vtable
8973ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r1, r2, lsl #2]        @ r3<- vtable[methodIndex]
8974ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_invokeMethodNoRange @ continue on
897571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8976ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_SUPER_resolve:
8977ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r10                     @ r0<- method->clazz
8978ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #METHOD_VIRTUAL         @ resolver method type
8979ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
8980ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
8981ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_INVOKE_SUPER_continue        @ no, continue
8982ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown      @ yes, handle exception
898371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8984ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8985ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Throw a NoSuchMethodError with the method name as the message.
8986ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = resolved base method
8987ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8988ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_SUPER_nsm:
8989ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r0, #offMethod_name]   @ r1<- method name
8990ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_errNoSuchMethod
899171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8992ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_DIRECT */
899371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
8994ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
8995ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * On entry:
8996ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1 = reference (BBBB or CCCC)
8997ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = "this" register
8998ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
8999ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_DIRECT_resolve:
9000ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
9001ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
9002ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #METHOD_DIRECT          @ resolver method type
9003ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
9004ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
9005ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_INVOKE_DIRECT_finish          @ no, continue
9006ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown      @ yes, handle exception
900771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9008ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_STATIC */
900971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
901071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9011ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_STATIC_resolve:
9012ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
9013ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
9014ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #METHOD_STATIC          @ resolver method type
9015ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
9016ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
9017ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9018ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9019ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Check to see if we're actively building a trace.  If so,
9020ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * we need to keep this instruction out of it.
9021ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r10: &resolved_methodToCall
9022ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9023ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrh    r2, [rSELF, #offThread_subMode]
9024ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown            @ null, handle exception
9025ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ands    r2, #kSubModeJitTraceBuild        @ trace under construction?
9026ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_invokeMethodNoRange     @ no (r0=method, r9="this")
9027ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r10]                         @ reload resolved method
9028ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r1, #0                            @ finished resolving?
9029ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     common_invokeMethodNoRange     @ yes (r0=method, r9="this")
9030ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r10, r0                           @ preserve method
9031ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, rSELF
9032ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rPC
9033ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmJitEndTraceSelect              @ (self, pc)
9034ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r10
9035ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_invokeMethodNoRange     @ whew, finally!
9036ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#else
9037ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     common_invokeMethodNoRange     @ (r0=method, r9="this")
9038ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown            @ yes, handle exception
9039ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
904071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9041ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_VIRTUAL_RANGE */
904271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9043ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9044ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * At this point:
9045ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = resolved base method
9046ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = C or CCCC (index of first arg, which is the "this" ptr)
9047ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9048ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_VIRTUAL_RANGE_continue:
9049ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r9, r10)                   @ r9<- "this" ptr
9050ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrh    r2, [r0, #offMethod_methodIndex]    @ r2<- baseMethod->methodIndex
9051ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ is "this" null?
9052ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ null "this", throw exception
9053ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r9, #offObject_clazz]  @ r3<- thisPtr->clazz
9054ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r3, #offClassObject_vtable]    @ r3<- thisPtr->clazz->vtable
9055ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
9056ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_invokeMethodRange @ (r0=method, r9="this")
905771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9058ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_SUPER_RANGE */
905971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9060ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9061ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * At this point:
9062ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = resolved base method
9063ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = method->clazz
9064ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9065ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_SUPER_RANGE_continue:
9066ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r10, #offClassObject_super]    @ r1<- method->clazz->super
9067ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrh    r2, [r0, #offMethod_methodIndex]    @ r2<- baseMethod->methodIndex
9068ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r1, #offClassObject_vtableCount]   @ r3<- super->vtableCount
9069ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ must export for invoke
9070ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r2, r3                      @ compare (methodIndex, vtableCount)
9071ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bcs     .LOP_INVOKE_SUPER_RANGE_nsm             @ method not present in superclass
9072ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r1, #offClassObject_vtable]    @ r1<- ...clazz->super->vtable
9073ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r1, r2, lsl #2]        @ r3<- vtable[methodIndex]
9074ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_invokeMethodRange @ continue on
907571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9076ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_SUPER_RANGE_resolve:
9077ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r10                     @ r0<- method->clazz
9078ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #METHOD_VIRTUAL         @ resolver method type
9079ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
9080ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
9081ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_INVOKE_SUPER_RANGE_continue        @ no, continue
9082ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown      @ yes, handle exception
908371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9084ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9085ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Throw a NoSuchMethodError with the method name as the message.
9086ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = resolved base method
9087ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9088ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_SUPER_RANGE_nsm:
9089ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r0, #offMethod_name]   @ r1<- method name
9090ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_errNoSuchMethod
909171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9092ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_DIRECT_RANGE */
909371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9094ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9095ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * On entry:
9096ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1 = reference (BBBB or CCCC)
9097ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = "this" register
9098ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9099ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_DIRECT_RANGE_resolve:
9100ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
9101ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
9102ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #METHOD_DIRECT          @ resolver method type
9103ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
9104ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
9105ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     .LOP_INVOKE_DIRECT_RANGE_finish          @ no, continue
9106ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown      @ yes, handle exception
910771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9108ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_STATIC_RANGE */
910971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
911071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9111ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_STATIC_RANGE_resolve:
9112ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rSELF, #offThread_method] @ r3<- self->method
9113ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r3, #offMethod_clazz]  @ r0<- method->clazz
9114ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #METHOD_STATIC          @ resolver method type
9115ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveMethod            @ r0<- call(clazz, ref, flags)
9116ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ got null?
9117ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9118ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9119ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Check to see if we're actively building a trace.  If so,
9120ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * we need to keep this instruction out of it.
9121ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r10: &resolved_methodToCall
9122ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9123ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrh    r2, [rSELF, #offThread_subMode]
9124ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown            @ null, handle exception
9125ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ands    r2, #kSubModeJitTraceBuild        @ trace under construction?
9126ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_invokeMethodRange     @ no (r0=method, r9="this")
9127ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [r10]                         @ reload resolved method
9128ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r1, #0                            @ finished resolving?
9129ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     common_invokeMethodRange     @ yes (r0=method, r9="this")
9130ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r10, r0                           @ preserve method
9131ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, rSELF
9132ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rPC
9133ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmJitEndTraceSelect              @ (self, pc)
9134ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r10
9135ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_invokeMethodRange     @ whew, finally!
9136ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#else
9137ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     common_invokeMethodRange     @ (r0=method, r9="this")
9138ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       common_exceptionThrown            @ yes, handle exception
9139ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
914071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9141ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_FLOAT_TO_LONG */
9142ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/*
9143ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * Convert the float in r0 to a long in r0/r1.
9144ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes *
9145ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * We have to clip values to long min/max per the specification.  The
9146ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * expected common case is a "reasonable" value that converts directly
9147ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * to modest integer.  The EABI convert function isn't doing this for us.
9148ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes */
9149ab35b50311951feea3782151dd5422ee944685c2Elliott Hughesf2l_doconv:
9150ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmfd   sp!, {r4, lr}
9151ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, #0x5f000000             @ (float)maxlong
9152ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r4, r0
9153ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_fcmpge              @ is arg >= maxlong?
9154ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ nonzero == yes
9155ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mvnne   r0, #0                      @ return maxlong (7fffffff)
9156ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mvnne   r1, #0x80000000
9157ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmnefd sp!, {r4, pc}
915871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9159ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r4                      @ recover arg
9160ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, #0xdf000000             @ (float)minlong
9161ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_fcmple              @ is arg <= minlong?
9162ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ nonzero == yes
9163ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    movne   r0, #0                      @ return minlong (80000000)
9164ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    movne   r1, #0x80000000
9165ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmnefd sp!, {r4, pc}
916671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9167ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r4                      @ recover arg
9168ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r4
9169ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_fcmpeq              @ is arg == self?
9170ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ zero == no
9171ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    moveq   r1, #0                      @ return zero for NaN
9172ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmeqfd sp!, {r4, pc}
917371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9174ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r4                      @ recover arg
9175ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_f2lz                @ convert float to long
9176ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmfd   sp!, {r4, pc}
917771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9178ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_DOUBLE_TO_LONG */
9179ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/*
9180ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * Convert the double in r0/r1 to a long in r0/r1.
9181ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes *
9182ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * We have to clip values to long min/max per the specification.  The
9183ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * expected common case is a "reasonable" value that converts directly
9184ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes * to modest integer.  The EABI convert function isn't doing this for us.
9185ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes */
9186ab35b50311951feea3782151dd5422ee944685c2Elliott Hughesd2l_doconv:
9187ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmfd   sp!, {r4, r5, lr}           @ save regs
9188ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r3, #0x43000000             @ maxlong, as a double (high word)
9189ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r3, #0x00e00000             @  0x43e00000
9190ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #0                      @ maxlong, as a double (low word)
9191ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    sub     sp, sp, #4                  @ align for EABI
9192ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r4, r0                      @ save a copy of r0
9193ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r5, r1                      @  and r1
9194ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_dcmpge              @ is arg >= maxlong?
9195ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ nonzero == yes
9196ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mvnne   r0, #0                      @ return maxlong (7fffffffffffffff)
9197ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mvnne   r1, #0x80000000
9198ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     1f
919971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9200ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r4                      @ recover arg
9201ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r5
9202ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r3, #0xc3000000             @ minlong, as a double (high word)
9203ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r3, #0x00e00000             @  0xc3e00000
9204ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, #0                      @ minlong, as a double (low word)
9205ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_dcmple              @ is arg <= minlong?
9206ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ nonzero == yes
9207ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    movne   r0, #0                      @ return minlong (8000000000000000)
9208ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    movne   r1, #0x80000000
9209ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     1f
921071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9211ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r4                      @ recover arg
9212ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r5
9213ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, r4                      @ compare against self
9214ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r3, r5
9215ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_dcmpeq              @ is arg == self?
9216ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ zero == no
9217ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    moveq   r1, #0                      @ return zero for NaN
9218ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     1f
921971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9220ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r4                      @ recover arg
9221ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r5
9222ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      __aeabi_d2lz                @ convert double to long
922371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9224ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes1:
9225ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     sp, sp, #4
9226ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmfd   sp!, {r4, r5, pc}
922771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9228ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_MUL_LONG */
922971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9230ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_MUL_LONG_finish:
9231ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9232ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
9233ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
923471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9235ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SHL_LONG */
923671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9237ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SHL_LONG_finish:
9238ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r0, asl r2              @  r0<- r0 << r2
9239ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9240ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
9241ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
924271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9243ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SHR_LONG */
924471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9245ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SHR_LONG_finish:
9246ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r1, asr r2              @  r1<- r1 >> r2
9247ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9248ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
9249ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
925071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9251ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_USHR_LONG */
925271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9253ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_USHR_LONG_finish:
9254ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, r1, lsr r2              @  r1<- r1 >>> r2
9255ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9256ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
9257ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
925871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9259ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SHL_LONG_2ADDR */
926071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9261ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SHL_LONG_2ADDR_finish:
9262ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9263ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
9264ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
926571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9266ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SHR_LONG_2ADDR */
926771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9268ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SHR_LONG_2ADDR_finish:
9269ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9270ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
9271ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
927271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9273ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_USHR_LONG_2ADDR */
927471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9275ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_USHR_LONG_2ADDR_finish:
9276ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9277ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
9278ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
927971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9280ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_VOLATILE */
928171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9282ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9283ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
9284ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
9285ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
9286ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9287ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_VOLATILE_finish:
9288ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
9289ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
9290ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
9291ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
9292ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
9293ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SMP_DMB                            @ acquiring load
9294ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
9295ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
9296ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
9297ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9298ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
9299ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
930071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9301ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_VOLATILE */
930271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9303ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9304ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
9305ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
9306ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
9307ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9308ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_VOLATILE_finish:
9309ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
9310ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
9311ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
9312ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
9313ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
9314ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
9315ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
9316ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
9317ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9318ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SMP_DMB_ST                        @ releasing store
9319ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
9320ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SMP_DMB
9321ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
932271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9323ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_VOLATILE */
932471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9325ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9326ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
9327ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
9328ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
9329ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9330ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_VOLATILE_resolve:
9331ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
9332ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9333ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
9334ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9335ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
9336ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
9337ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
9338ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
9339ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
9340ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9341ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9342ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
9343ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
9344ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9345ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
9346ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9347ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_VOLATILE_finish
934871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9349ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_VOLATILE */
935071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9351ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9352ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
9353ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
9354ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
9355ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9356ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_VOLATILE_resolve:
9357ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
9358ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9359ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
9360ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9361ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
9362ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
9363ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
9364ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
9365ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
9366ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9367ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9368ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
9369ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
9370ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9371ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
9372ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9373ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_VOLATILE_finish          @ resume
937471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9375ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_OBJECT_VOLATILE */
937671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9377ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9378ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
9379ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
9380ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
9381ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9382ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_OBJECT_VOLATILE_finish:
9383ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
9384ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
9385ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
9386ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
9387ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
9388ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SMP_DMB                            @ acquiring load
9389ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
9390ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
9391ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
9392ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9393ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SET_VREG(r0, r2)                    @ fp[A]<- r0
9394ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
939571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9396ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IGET_WIDE_VOLATILE */
939771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9398ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9399ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
9400ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
9401ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
9402ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9403ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IGET_WIDE_VOLATILE_finish:
9404ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
9405ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
9406ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
9407ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     1
9408ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r0, r9, r3                  @ r0<- address of field
9409ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
9410ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .else
9411ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
9412ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .endif
9413ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
9414ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
9415ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
9416ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r3, rFP, r2, lsl #2         @ r3<- &fp[A]
9417ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9418ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
9419ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
942071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9421ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_WIDE_VOLATILE */
942271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9423ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9424ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
9425ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
9426ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
9427ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9428ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_WIDE_VOLATILE_finish:
9429ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, rINST, lsr #8           @ r2<- A+
9430ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
9431ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r2, r2, #15                 @ r2<- A
9432ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
9433ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r2, rFP, r2, lsl #2         @ r3<- &fp[A]
9434ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
9435ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
9436ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
9437ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(r10)                @ extract opcode from rINST
9438ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .if     1
9439ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r2, r9, r3                  @ r2<- target address
9440ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmQuasiAtomicSwap64Sync    @ stores r0/r1 into addr r2
9441ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .else
9442ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
9443ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .endif
9444ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(r10)                    @ jump to next instruction
944571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9446ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_WIDE_VOLATILE */
944771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9448ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9449ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
9450ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
9451ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
9452ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *
9453ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Returns StaticField pointer in r0.
9454ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9455ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_WIDE_VOLATILE_resolve:
9456ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
9457ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9458ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r1<- &dvmDex->pResFields[field]
9459ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9460ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
9461ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
9462ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
9463ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
9464ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
9465ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9466ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9467ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
9468ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
9469ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9470ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
9471ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9472ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_WIDE_VOLATILE_finish          @ resume
947371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9474ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_WIDE_VOLATILE */
947571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9476ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9477ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
9478ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
9479ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9:  &fp[AA]
9480ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
9481ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *
9482ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Returns StaticField pointer in r2.
9483ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9484ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_WIDE_VOLATILE_resolve:
9485ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
9486ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9487ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
9488ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9489ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
9490ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
9491ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
9492ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
9493ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r2, r0                      @ copy to r2
9494ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
9495ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9496ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9497ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
9498ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
9499ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9500ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
9501ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9502ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_WIDE_VOLATILE_finish          @ resume
950371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9504ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_EXECUTE_INLINE */
950571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9506ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9507ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Extract args, call function.
9508ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = #of args (0-4)
9509ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = call index
9510ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  lr = return addr, above  [DO NOT bl out of here w/o preserving LR]
9511ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *
9512ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Other ideas:
9513ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * - Use a jump table from the main piece to jump directly into the
9514ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *   AND/LDR pairs.  Costs a data load, saves a branch.
9515ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * - Have five separate pieces that do the loading, so we can work the
9516ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *   interleave a little better.  Increases code size.
9517ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9518ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_EXECUTE_INLINE_continue:
9519ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    rsb     r0, r0, #4                  @ r0<- 4-r0
9520ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH(rINST, 2)                     @ rINST<- FEDC
9521ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     pc, pc, r0, lsl #3          @ computed goto, 2 instrs each
9522ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_abort                @ (skipped due to ARM prefetch)
9523ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes4:  and     ip, rINST, #0xf000          @ isolate F
9524ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [rFP, ip, lsr #10]      @ r3<- vF (shift right 12, left 2)
9525ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes3:  and     ip, rINST, #0x0f00          @ isolate E
9526ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rFP, ip, lsr #6]       @ r2<- vE
9527ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes2:  and     ip, rINST, #0x00f0          @ isolate D
9528ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [rFP, ip, lsr #2]       @ r1<- vD
9529ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes1:  and     ip, rINST, #0x000f          @ isolate C
9530ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rFP, ip, lsl #2]       @ r0<- vC
9531ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes0:
9532ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     rINST, .LOP_EXECUTE_INLINE_table    @ table of InlineOperation
95335dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel5:  add     rINST, pc
9534ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     pc, [rINST, r10, lsl #4]    @ sizeof=16, "func" is first entry
9535ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ (not reached)
953671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9537ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9538ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * We're debugging or profiling.
9539ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r10: opIndex
9540ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9541ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_EXECUTE_INLINE_debugmode:
9542ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r10
9543ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveInlineNative
9544ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ did it resolve?
9545ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     .LOP_EXECUTE_INLINE_resume          @ no, just move on
9546ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r0                      @ remember method
9547ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rSELF
9548ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmFastMethodTraceEnter     @ (method, self)
9549ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r1, rSELF, #offThread_retval@ r1<- &self->retval
9550ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    sub     sp, sp, #8                  @ make room for arg, +64 bit align
9551ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, rINST, lsr #12          @ r0<- B
9552ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r1, [sp]                    @ push &self->retval
9553ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      .LOP_EXECUTE_INLINE_continue        @ make call; will return after
9554ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     rINST, r0                   @ save result of inline
9555ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     sp, sp, #8                  @ pop stack
9556ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r9                      @ r0<- method
9557ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rSELF
9558ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmFastNativeMethodTraceExit @ (method, self)
9559ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     rINST, #0                   @ test boolean result of inline
9560ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ returned false, handle exception
9561ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
9562ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9563ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
956471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
956571eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
956671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
956771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9568ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_EXECUTE_INLINE_table:
95695dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(gDvmInlineOpsTable,5b)
957071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9571ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_EXECUTE_INLINE_RANGE */
957271eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9573ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9574ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Extract args, call function.
9575ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 = #of args (0-4)
9576ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10 = call index
9577ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  lr = return addr, above  [DO NOT bl out of here w/o preserving LR]
9578ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9579ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_EXECUTE_INLINE_RANGE_continue:
9580ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    rsb     r0, r0, #4                  @ r0<- 4-r0
9581ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH(r9, 2)                        @ r9<- CCCC
9582ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     pc, pc, r0, lsl #3          @ computed goto, 2 instrs each
9583ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_abort                @ (skipped due to ARM prefetch)
9584ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes4:  add     ip, r9, #3                  @ base+3
9585ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r3, ip)                    @ r3<- vBase[3]
9586ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes3:  add     ip, r9, #2                  @ base+2
9587ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r2, ip)                    @ r2<- vBase[2]
9588ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes2:  add     ip, r9, #1                  @ base+1
9589ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r1, ip)                    @ r1<- vBase[1]
9590ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes1:  add     ip, r9, #0                  @ (nop)
9591ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, ip)                    @ r0<- vBase[0]
9592ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes0:
9593ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r9, .LOP_EXECUTE_INLINE_RANGE_table       @ table of InlineOperation
95945dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel5:  add     r9, pc
9595ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     pc, [r9, r10, lsl #4]       @ sizeof=16, "func" is first entry
9596ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @ (not reached)
959771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
959871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9599ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9600ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * We're debugging or profiling.
9601ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r10: opIndex
9602ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9603ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_EXECUTE_INLINE_RANGE_debugmode:
9604ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, r10
9605ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveInlineNative
9606ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ did it resolve?
9607ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     .LOP_EXECUTE_INLINE_RANGE_resume          @ no, just move on
9608ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r0                      @ remember method
9609ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rSELF
9610ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmFastMethodTraceEnter     @ (method, self)
9611ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r1, rSELF, #offThread_retval@ r1<- &self->retval
9612ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    sub     sp, sp, #8                  @ make room for arg, +64 bit align
9613ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, rINST, lsr #8           @ r0<- B
9614ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     rINST, r9                   @ rINST<- method
9615ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r1, [sp]                    @ push &self->retval
9616ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      .LOP_EXECUTE_INLINE_RANGE_continue        @ make call; will return after
9617ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r9, r0                      @ save result of inline
9618ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     sp, sp, #8                  @ pop stack
9619ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r0, rINST                   @ r0<- method
9620ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rSELF
9621ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmFastNativeMethodTraceExit  @ (method, self)
9622ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ test boolean result of inline
9623ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ returned false, handle exception
9624ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
9625ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9626ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
962771eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
962871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
962971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
963071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9631ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_EXECUTE_INLINE_RANGE_table:
96325dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(gDvmInlineOpsTable,5b)
963371eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
963471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9635ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_INVOKE_OBJECT_INIT_RANGE */
963671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9637ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_OBJECT_INIT_RANGE_setFinal:
9638ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ can throw
9639ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmSetFinalizable           @ call dvmSetFinalizable(obj)
9640ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [rSELF, #offThread_exception] @ r0<- self->exception
9641ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ exception pending?
9642ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bne     common_exceptionThrown      @ yes, handle it
9643ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_INVOKE_OBJECT_INIT_RANGE_finish
964471eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9645ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9646ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * A debugger is attached, so we need to go ahead and do
9647ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * this.  For simplicity, we'll just jump directly to the
9648ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * corresponding handler.  Note that we can't use
9649ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * rIBASE here because it may be in single-step mode.
9650ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Load the primary table base directly.
9651ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9652ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_INVOKE_OBJECT_INIT_RANGE_debugger:
9653ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r1, [rSELF, #offThread_mainHandlerTable]
9654ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     ip, #OP_INVOKE_DIRECT_RANGE
9655ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE_BASE(r1,ip)             @ execute it
965671eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9657ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_IPUT_OBJECT_VOLATILE */
965871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao
9659ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9660ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Currently:
9661ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r0 holds resolved field
9662ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r9 holds object
9663ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9664ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_IPUT_OBJECT_VOLATILE_finish:
9665ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    @bl      common_squeak0
9666ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    mov     r1, rINST, lsr #8           @ r1<- A+
9667ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
9668ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    and     r1, r1, #15                 @ r1<- A
9669ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r9, #0                      @ check object for null
9670ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_VREG(r0, r1)                    @ r0<- fp[A]
9671ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_cardTable]  @ r2<- card table base
9672ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_errNullObject        @ object was null
9673ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
9674ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
9675ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SMP_DMB_ST                        @ releasing store
9676ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r0, [r9, r3]                @ obj.field (32 bits)<- r0
9677ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SMP_DMB
9678ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ stored a null reference?
9679ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strneb  r2, [r2, r9, lsr #GC_CARD_SHIFT]  @ mark card if not
9680ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
9681a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9682ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SGET_OBJECT_VOLATILE */
9683a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9684ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9685ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * Continuation if the field has not yet been resolved.
9686ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r1:  BBBB field ref
9687ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     *  r10: dvmDex->pResFields
9688ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9689ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SGET_OBJECT_VOLATILE_resolve:
9690ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
9691ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9692ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
9693ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9694ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
9695ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
9696ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
9697ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
9698ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
9699ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9700ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9701ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
9702ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
9703ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9704ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
9705ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9706ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SGET_OBJECT_VOLATILE_finish
9707a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9708ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes/* continuation for OP_SPUT_OBJECT_VOLATILE */
9709a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9710a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9711ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_OBJECT_VOLATILE_end:
9712ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    str     r1, [r0, #offStaticField_value]  @ field<- vAA
9713ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    SMP_DMB
9714ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r1, #0                      @ stored a null object?
9715ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    strneb  r2, [r2, r9, lsr #GC_CARD_SHIFT]  @ mark card based on obj head
9716ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    GOTO_OPCODE(ip)                     @ jump to next instruction
9717a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9718ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /* Continuation if the field has not yet been resolved.
9719ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r1:  BBBB field ref
9720ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * r10: dvmDex->pResFields
9721ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9722ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.LOP_SPUT_OBJECT_VOLATILE_resolve:
9723ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r2, [rSELF, #offThread_method]    @ r2<- current method
9724ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9725ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    add     r10, r10, r1, lsl #2        @ r10<- &dvmDex->pResFields[field]
9726ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9727ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    EXPORT_PC()                         @ resolve() could throw, so export now
9728ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
9729ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
9730ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    cmp     r0, #0                      @ success?
9731ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    beq     common_exceptionThrown      @ no, handle exception
9732ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#if defined(WITH_JIT)
9733ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    /*
9734ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * If the JIT is actively building a trace we need to make sure
9735ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     * that the field is fully resolved before including this instruction.
9736ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes     */
9737ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    bl      common_verifyField
9738ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes#endif
9739ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    b       .LOP_SPUT_OBJECT_VOLATILE_finish          @ resume
9740a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9741a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9742ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .size   dvmAsmSisterStart, .-dvmAsmSisterStart
9743ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .global dvmAsmSisterEnd
9744ab35b50311951feea3782151dd5422ee944685c2Elliott HughesdvmAsmSisterEnd:
9745a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
974697b22b8d41742fa84812f46d1125e9735420782abuzbee
9747ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .global dvmAsmAltInstructionStart
9748ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .type   dvmAsmAltInstructionStart, %function
9749ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    .text
9750a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9751ab35b50311951feea3782151dd5422ee944685c2Elliott HughesdvmAsmAltInstructionStart = .L_ALT_OP_NOP
9752a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9753a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9754ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NOP: /* 0x00 */
97553d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9756a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
97579a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9758a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
97599a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
97609a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
97619a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
97629a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9763a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
97649a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9765ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (0 * 64)
97669a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
97679a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
97689a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
97699a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9770a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
97719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
97729a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
97739a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9774a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9775a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9776a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9777ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE: /* 0x01 */
97783d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9779a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
97809a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9781a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
97829a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
97839a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
97849a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
97859a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9786a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
97879a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9788ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (1 * 64)
97899a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
97909a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
97919a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
97929a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9793a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
97949a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
97959a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
97969a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9797a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9798a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9799a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9800ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_FROM16: /* 0x02 */
98013d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9802a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
98039a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9804a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
98059a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
98069a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
98079a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
98089a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9809a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
98109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9811ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (2 * 64)
98129a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
98139a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
98149a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
98159a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9816a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
98179a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
98189a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
98199a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9820a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9821a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9822a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9823ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_16: /* 0x03 */
98243d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9825a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
98269a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9827a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
98289a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
98299a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
98309a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
98319a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9832a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
98339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9834ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (3 * 64)
98359a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
98369a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
98379a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
98389a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9839a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
98409a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
98419a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
98429a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9843a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9844a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9845a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9846ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_WIDE: /* 0x04 */
98473d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9848a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
98499a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9850a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
98519a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
98529a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
98539a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
98549a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9855a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
98569a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9857ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (4 * 64)
98589a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
98599a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
98609a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
98619a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9862a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
98639a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
98649a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
98659a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9866a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9867a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9868a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9869ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_WIDE_FROM16: /* 0x05 */
98703d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9871a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
98729a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9873a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
98749a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
98759a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
98769a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
98779a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9878a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
98799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9880ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (5 * 64)
98819a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
98829a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
98839a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
98849a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9885a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
98869a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
98879a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
98889a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9889a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9890a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9891a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9892ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_WIDE_16: /* 0x06 */
98933d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9894a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
98959a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9896a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
98979a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
98989a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
98999a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
99009a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9901a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
99029a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9903ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (6 * 64)
99049a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
99059a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
99069a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
99079a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9908a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
99099a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
99109a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
99119a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9912a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9913a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9914a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9915ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_OBJECT: /* 0x07 */
99163d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9917a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
99189a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9919a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
99209a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
99219a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
99229a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
99239a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9924a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
99259a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9926ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (7 * 64)
99279a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
99289a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
99299a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
99309a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9931a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
99329a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
99339a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
99349a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9935a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9936a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9937a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9938ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_OBJECT_FROM16: /* 0x08 */
99393d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9940a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
99419a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9942a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
99439a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
99449a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
99459a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
99469a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9947a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
99489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9949ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (8 * 64)
99509a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
99519a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
99529a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
99539a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9954a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
99559a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
99569a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
99579a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9958a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9959a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9960a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9961ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_OBJECT_16: /* 0x09 */
99623d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9963a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
99649a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9965a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
99669a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
99679a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
99689a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
99699a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9970a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
99719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9972ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (9 * 64)
99739a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
99749a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
99759a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
99769a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
9977a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
99789a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
99799a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
99809a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
9981a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
9982a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
9983a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
9984ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_RESULT: /* 0x0a */
99853d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
9986a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
99879a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
9988a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
99899a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
99909a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
99919a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
99929a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
9993a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
99949a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
9995ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (10 * 64)
99969a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
99979a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
99989a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
99999a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10000a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
100019a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
100029a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
100039a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10004a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10005a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10006a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10007ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_RESULT_WIDE: /* 0x0b */
100083d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10009a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
100109a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10011a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
100129a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
100139a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
100149a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
100159a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10016a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
100179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10018ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (11 * 64)
100199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
100209a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
100219a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
100229a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10023a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
100249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
100259a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
100269a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10027a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10028a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10029a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10030ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_RESULT_OBJECT: /* 0x0c */
100313d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10032a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
100339a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10034a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
100359a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
100369a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
100379a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
100389a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10039a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
100409a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10041ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (12 * 64)
100429a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
100439a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
100449a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
100459a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10046a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
100479a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
100489a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
100499a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10050a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10051a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10052a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10053ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MOVE_EXCEPTION: /* 0x0d */
100543d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10055a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
100569a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10057a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
100589a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
100599a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
100609a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
100619a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10062a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
100639a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10064ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (13 * 64)
100659a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
100669a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
100679a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
100689a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10069a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
100709a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
100719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
100729a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10073a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10074a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10075a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10076ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_RETURN_VOID: /* 0x0e */
100773d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10078a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
100799a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10080a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
100819a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
100829a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
100839a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
100849a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10085a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
100869a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10087ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (14 * 64)
100889a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
100899a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
100909a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
100919a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10092a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
100939a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
100949a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
100959a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10096a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10097a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10098a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10099ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_RETURN: /* 0x0f */
101003d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10101a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
101029a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10103a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
101049a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
101059a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
101069a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
101079a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10108a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
101099a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10110ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (15 * 64)
101119a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
101129a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
101139a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
101149a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10115a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
101169a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
101179a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
101189a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10119a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10120a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10121a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10122ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_RETURN_WIDE: /* 0x10 */
101233d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10124a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
101259a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10126a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
101279a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
101289a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
101299a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
101309a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10131a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
101329a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10133ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (16 * 64)
101349a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
101359a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
101369a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
101379a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10138a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
101399a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
101409a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
101419a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10142a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10143a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10144a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10145ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_RETURN_OBJECT: /* 0x11 */
101463d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10147a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
101489a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10149a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
101509a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
101519a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
101529a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
101539a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10154a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
101559a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10156ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (17 * 64)
101579a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
101589a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
101599a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
101609a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10161a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
101629a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
101639a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
101649a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10165a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10166a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10167a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10168ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_4: /* 0x12 */
101693d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10170a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
101719a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10172a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
101739a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
101749a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
101759a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
101769a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10177a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
101789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10179ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (18 * 64)
101809a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
101819a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
101829a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
101839a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10184a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
101859a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
101869a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
101879a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10188a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10189a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10190a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10191ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_16: /* 0x13 */
101923d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10193a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
101949a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10195a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
101969a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
101979a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
101989a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
101999a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10200a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
102019a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10202ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (19 * 64)
102039a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
102049a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
102059a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
102069a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10207a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
102089a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
102099a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
102109a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10211a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10212a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10213a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10214ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST: /* 0x14 */
102153d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10216a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
102179a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10218a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
102199a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
102209a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
102219a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
102229a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10223a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
102249a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10225ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (20 * 64)
102269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
102279a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
102289a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
102299a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10230a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
102319a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
102329a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
102339a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10234a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10235a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10236a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10237ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_HIGH16: /* 0x15 */
102383d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10239a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
102409a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10241a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
102429a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
102439a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
102449a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
102459a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10246a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
102479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10248ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (21 * 64)
102499a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
102509a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
102519a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
102529a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10253a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
102549a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
102559a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
102569a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10257a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10258a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10259a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10260ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_WIDE_16: /* 0x16 */
102613d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10262a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
102639a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10264a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
102659a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
102669a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
102679a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
102689a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10269a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
102709a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10271ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (22 * 64)
102729a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
102739a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
102749a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
102759a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10276a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
102779a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
102789a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
102799a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10280a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10281a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10282a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10283ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_WIDE_32: /* 0x17 */
102843d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10285a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
102869a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10287a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
102889a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
102899a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
102909a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
102919a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10292a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
102939a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10294ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (23 * 64)
102959a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
102969a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
102979a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
102989a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10299a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
103009a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
103019a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
103029a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10303a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10304a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10305a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10306ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_WIDE: /* 0x18 */
103073d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10308a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
103099a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10310a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
103119a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
103129a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
103139a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
103149a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10315a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
103169a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10317ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (24 * 64)
103189a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
103199a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
103209a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
103219a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10322a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
103239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
103249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
103259a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10326a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10327a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10328a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10329ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_WIDE_HIGH16: /* 0x19 */
103303d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10331a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
103329a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10333a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
103349a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
103359a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
103369a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
103379a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10338a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
103399a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10340ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (25 * 64)
103419a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
103429a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
103439a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
103449a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10345a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
103469a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
103479a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
103489a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10349a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10350a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10351a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10352ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_STRING: /* 0x1a */
103533d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10354a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
103559a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10356a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
103579a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
103589a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
103599a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
103609a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10361a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
103629a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10363ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (26 * 64)
103649a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
103659a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
103669a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
103679a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10368a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
103699a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
103709a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
103719a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10372a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10373a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10374a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10375ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_STRING_JUMBO: /* 0x1b */
103763d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10377a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
103789a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10379a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
103809a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
103819a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
103829a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
103839a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10384a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
103859a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10386ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (27 * 64)
103879a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
103889a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
103899a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
103909a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10391a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
103929a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
103939a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
103949a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10395a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10396a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10397a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10398ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CONST_CLASS: /* 0x1c */
103993d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10400a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
104019a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10402a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
104039a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
104049a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
104059a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
104069a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10407a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
104089a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10409ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (28 * 64)
104109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
104119a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
104129a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
104139a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10414a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
104159a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
104169a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
104179a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10418a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10419a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10420a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10421ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MONITOR_ENTER: /* 0x1d */
104223d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10423a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
104249a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10425a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
104269a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
104279a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
104289a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
104299a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10430a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
104319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10432ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (29 * 64)
104339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
104349a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
104359a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
104369a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10437a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
104389a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
104399a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
104409a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10441a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10442a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10443a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10444ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MONITOR_EXIT: /* 0x1e */
104453d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10446a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
104479a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10448a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
104499a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
104509a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
104519a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
104529a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10453a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
104549a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10455ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (30 * 64)
104569a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
104579a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
104589a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
104599a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10460a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
104619a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
104629a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
104639a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10464a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10465a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10466a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10467ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CHECK_CAST: /* 0x1f */
104683d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10469a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
104709a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10471a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
104729a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
104739a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
104749a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
104759a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10476a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
104779a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10478ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (31 * 64)
104799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
104809a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
104819a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
104829a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10483a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
104849a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
104859a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
104869a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10487a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10488a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10489a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10490ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INSTANCE_OF: /* 0x20 */
104913d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10492a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
104939a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10494a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
104959a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
104969a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
104979a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
104989a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10499a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
105009a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10501ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (32 * 64)
105029a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
105039a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
105049a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
105059a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10506a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
105079a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
105089a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
105099a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10510a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10511a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10512a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10513ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ARRAY_LENGTH: /* 0x21 */
105143d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10515a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
105169a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10517a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
105189a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
105199a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
105209a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
105219a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10522a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
105239a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10524ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (33 * 64)
105259a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
105269a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
105279a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
105289a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10529a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
105309a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
105319a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
105329a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10533a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10534a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10535a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10536ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NEW_INSTANCE: /* 0x22 */
105373d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10538a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
105399a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10540a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
105419a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
105429a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
105439a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
105449a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10545a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
105469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10547ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (34 * 64)
105489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
105499a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
105509a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
105519a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10552a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
105539a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
105549a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
105559a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10556a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10557a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10558a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10559ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NEW_ARRAY: /* 0x23 */
105603d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10561a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
105629a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10563a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
105649a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
105659a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
105669a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
105679a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10568a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
105699a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10570ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (35 * 64)
105719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
105729a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
105739a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
105749a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10575a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
105769a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
105779a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
105789a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10579a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10580a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10581a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10582ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_FILLED_NEW_ARRAY: /* 0x24 */
105833d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10584a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
105859a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10586a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
105879a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
105889a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
105899a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
105909a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10591a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
105929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10593ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (36 * 64)
105949a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
105959a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
105969a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
105979a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10598a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
105999a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
106009a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
106019a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10602a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10603a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10604a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10605ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_FILLED_NEW_ARRAY_RANGE: /* 0x25 */
106063d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10607a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
106089a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10609a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
106109a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
106119a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
106129a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
106139a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10614a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
106159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10616ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (37 * 64)
106179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
106189a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
106199a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
106209a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10621a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
106229a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
106239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
106249a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10625a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10626a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10627a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10628ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_FILL_ARRAY_DATA: /* 0x26 */
106293d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10630a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
106319a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10632a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
106339a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
106349a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
106359a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
106369a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10637a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
106389a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10639ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (38 * 64)
106409a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
106419a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
106429a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
106439a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10644a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
106459a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
106469a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
106479a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10648a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10649a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10650a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10651ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_THROW: /* 0x27 */
106523d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10653a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
106549a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10655a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
106569a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
106579a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
106589a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
106599a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10660a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
106619a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10662ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (39 * 64)
106639a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
106649a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
106659a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
106669a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10667a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
106689a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
106699a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
106709a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10671a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10672a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10673a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10674ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_GOTO: /* 0x28 */
106753d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10676a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
106779a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10678a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
106799a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
106809a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
106819a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
106829a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10683a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
106849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10685ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (40 * 64)
106869a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
106879a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
106889a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
106899a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10690a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
106919a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
106929a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
106939a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10694a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10695a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10696a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10697ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_GOTO_16: /* 0x29 */
106983d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10699a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
107009a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10701a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
107029a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
107039a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
107049a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
107059a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10706a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
107079a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10708ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (41 * 64)
107099a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
107109a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
107119a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
107129a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10713a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
107149a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
107159a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
107169a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10717a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10718a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10719a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10720ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_GOTO_32: /* 0x2a */
107213d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10722a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
107239a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10724a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
107259a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
107269a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
107279a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
107289a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10729a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
107309a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10731ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (42 * 64)
107329a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
107339a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
107349a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
107359a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10736a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
107379a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
107389a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
107399a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10740a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10741a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10742a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10743ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_PACKED_SWITCH: /* 0x2b */
107443d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10745a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
107469a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10747a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
107489a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
107499a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
107509a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
107519a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10752a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
107539a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10754ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (43 * 64)
107559a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
107569a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
107579a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
107589a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10759a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
107609a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
107619a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
107629a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10763a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10764a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10765a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10766ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPARSE_SWITCH: /* 0x2c */
107673d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10768a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
107699a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10770a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
107719a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
107729a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
107739a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
107749a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10775a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
107769a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10777ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (44 * 64)
107789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
107799a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
107809a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
107819a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10782a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
107839a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
107849a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
107859a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10786a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10787a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10788a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10789ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CMPL_FLOAT: /* 0x2d */
107903d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10791a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
107929a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10793a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
107949a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
107959a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
107969a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
107979a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10798a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
107999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10800ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (45 * 64)
108019a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
108029a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
108039a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
108049a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10805a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
108069a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
108079a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
108089a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10809a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10810a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10811a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10812ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CMPG_FLOAT: /* 0x2e */
108133d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10814a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
108159a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10816a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
108179a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
108189a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
108199a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
108209a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10821a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
108229a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10823ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (46 * 64)
108249a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
108259a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
108269a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
108279a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10828a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
108299a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
108309a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
108319a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10832a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10833a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10834a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10835ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CMPL_DOUBLE: /* 0x2f */
108363d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10837a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
108389a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10839a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
108409a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
108419a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
108429a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
108439a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10844a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
108459a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10846ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (47 * 64)
108479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
108489a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
108499a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
108509a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10851a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
108529a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
108539a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
108549a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10855a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10856a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10857a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10858ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CMPG_DOUBLE: /* 0x30 */
108593d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10860a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
108619a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10862a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
108639a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
108649a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
108659a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
108669a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10867a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
108689a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10869ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (48 * 64)
108709a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
108719a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
108729a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
108739a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10874a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
108759a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
108769a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
108779a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10878a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10879a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10880a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10881ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_CMP_LONG: /* 0x31 */
108823d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10883a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
108849a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10885a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
108869a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
108879a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
108889a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
108899a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10890a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
108919a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10892ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (49 * 64)
108939a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
108949a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
108959a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
108969a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10897a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
108989a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
108999a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
109009a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10901a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10902a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10903a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10904ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_EQ: /* 0x32 */
109053d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10906a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
109079a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10908a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
109099a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
109109a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
109119a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
109129a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10913a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
109149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10915ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (50 * 64)
109169a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
109179a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
109189a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
109199a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10920a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
109219a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
109229a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
109239a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10924a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10925a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10926a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10927ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_NE: /* 0x33 */
109283d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10929a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
109309a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10931a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
109329a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
109339a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
109349a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
109359a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10936a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
109379a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10938ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (51 * 64)
109399a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
109409a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
109419a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
109429a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10943a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
109449a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
109459a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
109469a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10947a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10948a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10949a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10950ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_LT: /* 0x34 */
109513d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10952a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
109539a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10954a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
109559a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
109569a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
109579a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
109589a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10959a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
109609a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10961ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (52 * 64)
109629a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
109639a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
109649a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
109659a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10966a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
109679a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
109689a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
109699a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10970a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10971a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10972a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10973ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_GE: /* 0x35 */
109743d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10975a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
109769a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
10977a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
109789a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
109799a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
109809a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
109819a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
10982a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
109839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
10984ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (53 * 64)
109859a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
109869a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
109879a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
109889a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
10989a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
109909a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
109919a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
109929a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
10993a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
10994a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
10995a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
10996ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_GT: /* 0x36 */
109973d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
10998a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
109999a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11000a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
110019a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
110029a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
110039a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
110049a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11005a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
110069a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11007ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (54 * 64)
110089a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
110099a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
110109a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
110119a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11012a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
110139a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
110149a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
110159a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11016a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11017a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11018a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11019ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_LE: /* 0x37 */
110203d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11021a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
110229a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11023a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
110249a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
110259a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
110269a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
110279a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11028a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
110299a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11030ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (55 * 64)
110319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
110329a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
110339a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
110349a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11035a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
110369a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
110379a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
110389a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11039a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11040a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11041a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11042ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_EQZ: /* 0x38 */
110433d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11044a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
110459a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11046a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
110479a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
110489a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
110499a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
110509a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11051a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
110529a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11053ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (56 * 64)
110549a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
110559a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
110569a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
110579a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11058a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
110599a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
110609a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
110619a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11062a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11063a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11064a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11065ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_NEZ: /* 0x39 */
110663d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11067a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
110689a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11069a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
110709a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
110719a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
110729a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
110739a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11074a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
110759a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11076ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (57 * 64)
110779a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
110789a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
110799a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
110809a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11081a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
110829a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
110839a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
110849a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11085a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11086a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11087a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11088ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_LTZ: /* 0x3a */
110893d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11090a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
110919a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11092a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
110939a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
110949a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
110959a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
110969a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11097a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
110989a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11099ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (58 * 64)
111009a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
111019a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
111029a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
111039a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11104a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
111059a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
111069a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
111079a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11108a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11109a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11110a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11111ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_GEZ: /* 0x3b */
111123d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11113a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
111149a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11115a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
111169a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
111179a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
111189a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
111199a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11120a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
111219a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11122ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (59 * 64)
111239a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
111249a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
111259a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
111269a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11127a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
111289a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
111299a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
111309a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11131a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11132a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11133a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11134ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_GTZ: /* 0x3c */
111353d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11136a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
111379a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11138a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
111399a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
111409a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
111419a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
111429a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11143a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
111449a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11145ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (60 * 64)
111469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
111479a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
111489a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
111499a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11150a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
111519a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
111529a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
111539a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11154a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11155a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11156a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11157ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IF_LEZ: /* 0x3d */
111583d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11159a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
111609a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11161a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
111629a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
111639a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
111649a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
111659a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11166a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
111679a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11168ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (61 * 64)
111699a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
111709a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
111719a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
111729a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11173a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
111749a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
111759a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
111769a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11177a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11178a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11179a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11180ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_3E: /* 0x3e */
111813d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11182a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
111839a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11184a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
111859a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
111869a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
111879a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
111889a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11189a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
111909a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11191ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (62 * 64)
111929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
111939a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
111949a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
111959a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11196a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
111979a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
111989a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
111999a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11200a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11201a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11202a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11203ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_3F: /* 0x3f */
112043d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11205a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
112069a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11207a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
112089a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
112099a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
112109a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
112119a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11212a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
112139a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11214ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (63 * 64)
112159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
112169a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
112179a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
112189a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11219a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
112209a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
112219a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
112229a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11223a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11224a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11225a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11226ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_40: /* 0x40 */
112273d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11228a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
112299a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11230a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
112319a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
112329a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
112339a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
112349a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11235a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
112369a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11237ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (64 * 64)
112389a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
112399a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
112409a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
112419a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11242a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
112439a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
112449a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
112459a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11246a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11247a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11248a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11249ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_41: /* 0x41 */
112503d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11251a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
112529a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11253a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
112549a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
112559a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
112569a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
112579a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11258a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
112599a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11260ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (65 * 64)
112619a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
112629a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
112639a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
112649a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11265a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
112669a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
112679a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
112689a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11269a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11270a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11271a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11272ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_42: /* 0x42 */
112733d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11274a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
112759a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11276a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
112779a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
112789a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
112799a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
112809a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11281a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
112829a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11283ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (66 * 64)
112849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
112859a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
112869a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
112879a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11288a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
112899a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
112909a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
112919a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11292a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11293a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11294a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11295ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_43: /* 0x43 */
112963d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11297a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
112989a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11299a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
113009a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
113019a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
113029a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
113039a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11304a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
113059a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11306ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (67 * 64)
113079a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
113089a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
113099a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
113109a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11311a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
113129a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
113139a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
113149a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11315a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11316a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11317a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11318ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AGET: /* 0x44 */
113193d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11320a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
113219a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11322a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
113239a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
113249a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
113259a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
113269a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11327a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
113289a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11329ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (68 * 64)
113309a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
113319a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
113329a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
113339a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11334a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
113359a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
113369a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
113379a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11338a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11339a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11340a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11341ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AGET_WIDE: /* 0x45 */
113423d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11343a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
113449a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11345a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
113469a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
113479a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
113489a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
113499a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11350a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
113519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11352ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (69 * 64)
113539a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
113549a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
113559a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
113569a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11357a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
113589a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
113599a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
113609a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11361a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11362a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11363a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11364ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AGET_OBJECT: /* 0x46 */
113653d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11366a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
113679a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11368a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
113699a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
113709a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
113719a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
113729a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11373a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
113749a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11375ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (70 * 64)
113769a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
113779a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
113789a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
113799a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11380a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
113819a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
113829a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
113839a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11384a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11385a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11386a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11387ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AGET_BOOLEAN: /* 0x47 */
113883d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11389a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
113909a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11391a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
113929a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
113939a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
113949a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
113959a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11396a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
113979a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11398ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (71 * 64)
113999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
114009a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
114019a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
114029a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11403a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
114049a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
114059a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
114069a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11407a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11408a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11409a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11410ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AGET_BYTE: /* 0x48 */
114113d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11412a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
114139a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11414a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
114159a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
114169a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
114179a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
114189a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11419a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
114209a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11421ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (72 * 64)
114229a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
114239a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
114249a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
114259a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11426a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
114279a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
114289a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
114299a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11430a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11431a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11432a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11433ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AGET_CHAR: /* 0x49 */
114343d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11435a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
114369a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11437a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
114389a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
114399a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
114409a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
114419a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11442a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
114439a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11444ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (73 * 64)
114459a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
114469a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
114479a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
114489a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11449a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
114509a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
114519a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
114529a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11453a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11454a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11455a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11456ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AGET_SHORT: /* 0x4a */
114573d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11458a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
114599a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11460a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
114619a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
114629a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
114639a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
114649a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11465a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
114669a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11467ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (74 * 64)
114689a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
114699a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
114709a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
114719a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11472a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
114739a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
114749a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
114759a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11476a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11477a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11478a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11479ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_APUT: /* 0x4b */
114803d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11481a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
114829a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11483a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
114849a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
114859a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
114869a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
114879a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11488a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
114899a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11490ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (75 * 64)
114919a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
114929a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
114939a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
114949a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11495a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
114969a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
114979a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
114989a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11499a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11500a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11501a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11502ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_APUT_WIDE: /* 0x4c */
115033d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11504a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
115059a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11506a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
115079a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
115089a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
115099a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
115109a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11511a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
115129a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11513ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (76 * 64)
115149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
115159a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
115169a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
115179a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11518a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
115199a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
115209a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
115219a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11522a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11523a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11524a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11525ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_APUT_OBJECT: /* 0x4d */
115263d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11527a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
115289a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11529a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
115309a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
115319a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
115329a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
115339a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11534a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
115359a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11536ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (77 * 64)
115379a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
115389a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
115399a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
115409a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11541a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
115429a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
115439a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
115449a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11545a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11546a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11547a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11548ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_APUT_BOOLEAN: /* 0x4e */
115493d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11550a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
115519a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11552a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
115539a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
115549a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
115559a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
115569a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11557a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
115589a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11559ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (78 * 64)
115609a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
115619a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
115629a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
115639a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11564a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
115659a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
115669a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
115679a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11568a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11569a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11570a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11571ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_APUT_BYTE: /* 0x4f */
115723d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11573a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
115749a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11575a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
115769a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
115779a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
115789a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
115799a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11580a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
115819a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11582ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (79 * 64)
115839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
115849a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
115859a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
115869a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11587a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
115889a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
115899a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
115909a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11591a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11592a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11593a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11594ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_APUT_CHAR: /* 0x50 */
115953d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11596a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
115979a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11598a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
115999a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
116009a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
116019a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
116029a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11603a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
116049a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11605ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (80 * 64)
116069a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
116079a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
116089a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
116099a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11610a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
116119a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
116129a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
116139a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11614a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11615a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11616a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11617ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_APUT_SHORT: /* 0x51 */
116183d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11619a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
116209a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11621a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
116229a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
116239a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
116249a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
116259a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11626a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
116279a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11628ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (81 * 64)
116299a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
116309a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
116319a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
116329a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11633a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
116349a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
116359a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
116369a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11637a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11638a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11639a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11640ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET: /* 0x52 */
116413d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11642a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
116439a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11644a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
116459a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
116469a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
116479a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
116489a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11649a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
116509a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11651ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (82 * 64)
116529a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
116539a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
116549a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
116559a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11656a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
116579a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
116589a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
116599a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11660a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11661a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11662a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11663ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_WIDE: /* 0x53 */
116643d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11665a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
116669a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11667a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
116689a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
116699a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
116709a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
116719a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11672a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
116739a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11674ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (83 * 64)
116759a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
116769a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
116779a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
116789a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11679a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
116809a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
116819a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
116829a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11683a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11684a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11685a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11686ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_OBJECT: /* 0x54 */
116873d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11688a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
116899a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11690a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
116919a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
116929a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
116939a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
116949a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11695a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
116969a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11697ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (84 * 64)
116989a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
116999a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
117009a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
117019a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11702a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
117039a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
117049a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
117059a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11706a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11707a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11708a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11709ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_BOOLEAN: /* 0x55 */
117103d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11711a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
117129a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11713a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
117149a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
117159a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
117169a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
117179a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11718a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
117199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11720ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (85 * 64)
117219a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
117229a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
117239a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
117249a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11725a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
117269a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
117279a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
117289a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11729a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11730a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11731a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11732ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_BYTE: /* 0x56 */
117333d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11734a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
117359a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11736a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
117379a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
117389a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
117399a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
117409a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11741a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
117429a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11743ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (86 * 64)
117449a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
117459a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
117469a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
117479a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11748a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
117499a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
117509a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
117519a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11752a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11753a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11754a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11755ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_CHAR: /* 0x57 */
117563d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11757a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
117589a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11759a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
117609a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
117619a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
117629a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
117639a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11764a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
117659a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11766ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (87 * 64)
117679a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
117689a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
117699a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
117709a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11771a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
117729a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
117739a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
117749a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11775a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11776a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11777a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11778ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_SHORT: /* 0x58 */
117793d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11780a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
117819a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11782a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
117839a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
117849a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
117859a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
117869a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11787a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
117889a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11789ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (88 * 64)
117909a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
117919a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
117929a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
117939a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11794a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
117959a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
117969a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
117979a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11798a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11799a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11800a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11801ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT: /* 0x59 */
118023d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11803a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
118049a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11805a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
118069a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
118079a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
118089a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
118099a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11810a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
118119a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11812ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (89 * 64)
118139a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
118149a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
118159a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
118169a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11817a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
118189a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
118199a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
118209a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11821a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11822a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11823a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11824ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_WIDE: /* 0x5a */
118253d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11826a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
118279a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11828a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
118299a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
118309a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
118319a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
118329a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11833a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
118349a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11835ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (90 * 64)
118369a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
118379a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
118389a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
118399a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11840a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
118419a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
118429a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
118439a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11844a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11845a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11846a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11847ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_OBJECT: /* 0x5b */
118483d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11849a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
118509a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11851a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
118529a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
118539a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
118549a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
118559a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11856a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
118579a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11858ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (91 * 64)
118599a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
118609a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
118619a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
118629a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11863a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
118649a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
118659a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
118669a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11867a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11868a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11869a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11870ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_BOOLEAN: /* 0x5c */
118713d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11872a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
118739a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11874a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
118759a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
118769a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
118779a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
118789a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11879a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
118809a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11881ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (92 * 64)
118829a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
118839a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
118849a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
118859a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11886a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
118879a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
118889a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
118899a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11890a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11891a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11892a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11893ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_BYTE: /* 0x5d */
118943d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11895a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
118969a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11897a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
118989a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
118999a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
119009a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
119019a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11902a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
119039a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11904ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (93 * 64)
119059a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
119069a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
119079a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
119089a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11909a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
119109a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
119119a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
119129a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11913a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11914a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11915a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11916ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_CHAR: /* 0x5e */
119173d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11918a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
119199a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11920a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
119219a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
119229a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
119239a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
119249a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11925a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
119269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11927ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (94 * 64)
119289a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
119299a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
119309a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
119319a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11932a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
119339a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
119349a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
119359a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11936a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11937a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11938a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11939ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_SHORT: /* 0x5f */
119403d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11941a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
119429a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11943a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
119449a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
119459a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
119469a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
119479a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11948a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
119499a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11950ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (95 * 64)
119519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
119529a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
119539a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
119549a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11955a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
119569a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
119579a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
119589a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11959a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11960a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11961a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11962ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET: /* 0x60 */
119633d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11964a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
119659a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11966a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
119679a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
119689a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
119699a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
119709a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11971a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
119729a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11973ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (96 * 64)
119749a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
119759a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
119769a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
119779a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
11978a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
119799a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
119809a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
119819a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
11982a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
11983a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
11984a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
11985ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_WIDE: /* 0x61 */
119863d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
11987a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
119889a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
11989a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
119909a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
119919a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
119929a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
119939a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
11994a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
119959a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
11996ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (97 * 64)
119979a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
119989a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
119999a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
120009a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12001a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
120029a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
120039a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
120049a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12005a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12006a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12007a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12008ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_OBJECT: /* 0x62 */
120093d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12010a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
120119a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12012a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
120139a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
120149a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
120159a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
120169a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12017a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
120189a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12019ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (98 * 64)
120209a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
120219a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
120229a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
120239a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12024a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
120259a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
120269a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
120279a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12028a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12029a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12030a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12031ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_BOOLEAN: /* 0x63 */
120323d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12033a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
120349a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12035a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
120369a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
120379a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
120389a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
120399a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12040a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
120419a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12042ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (99 * 64)
120439a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
120449a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
120459a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
120469a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12047a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
120489a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
120499a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
120509a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12051a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12052a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12053a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12054ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_BYTE: /* 0x64 */
120553d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12056a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
120579a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12058a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
120599a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
120609a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
120619a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
120629a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12063a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
120649a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12065ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (100 * 64)
120669a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
120679a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
120689a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
120699a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12070a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
120719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
120729a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
120739a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12074a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12075a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12076a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12077ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_CHAR: /* 0x65 */
120783d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12079a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
120809a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12081a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
120829a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
120839a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
120849a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
120859a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12086a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
120879a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12088ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (101 * 64)
120899a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
120909a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
120919a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
120929a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12093a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
120949a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
120959a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
120969a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12097a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12098a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12099a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12100ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_SHORT: /* 0x66 */
121013d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12102a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
121039a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12104a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
121059a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
121069a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
121079a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
121089a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12109a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
121109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12111ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (102 * 64)
121129a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
121139a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
121149a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
121159a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12116a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
121179a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
121189a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
121199a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12120a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12121a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12122a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12123ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT: /* 0x67 */
121243d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12125a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
121269a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12127a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
121289a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
121299a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
121309a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
121319a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12132a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
121339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12134ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (103 * 64)
121359a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
121369a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
121379a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
121389a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12139a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
121409a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
121419a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
121429a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12143a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12144a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12145a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12146ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_WIDE: /* 0x68 */
121473d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12148a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
121499a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12150a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
121519a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
121529a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
121539a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
121549a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12155a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
121569a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12157ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (104 * 64)
121589a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
121599a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
121609a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
121619a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12162a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
121639a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
121649a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
121659a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12166a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12167a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12168a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12169ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_OBJECT: /* 0x69 */
121703d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12171a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
121729a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12173a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
121749a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
121759a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
121769a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
121779a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12178a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
121799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12180ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (105 * 64)
121819a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
121829a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
121839a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
121849a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12185a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
121869a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
121879a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
121889a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12189a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12190a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12191a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12192ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_BOOLEAN: /* 0x6a */
121933d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12194a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
121959a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12196a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
121979a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
121989a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
121999a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
122009a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12201a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
122029a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12203ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (106 * 64)
122049a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
122059a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
122069a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
122079a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12208a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
122099a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
122109a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
122119a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12212a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12213a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12214a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12215ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_BYTE: /* 0x6b */
122163d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12217a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
122189a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12219a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
122209a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
122219a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
122229a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
122239a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12224a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
122259a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12226ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (107 * 64)
122279a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
122289a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
122299a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
122309a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12231a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
122329a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
122339a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
122349a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12235a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12236a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12237a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12238ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_CHAR: /* 0x6c */
122393d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12240a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
122419a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12242a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
122439a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
122449a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
122459a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
122469a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12247a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
122489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12249ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (108 * 64)
122509a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
122519a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
122529a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
122539a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12254a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
122559a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
122569a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
122579a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12258a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12259a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12260a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12261ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_SHORT: /* 0x6d */
122623d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12263a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
122649a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12265a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
122669a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
122679a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
122689a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
122699a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12270a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
122719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12272ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (109 * 64)
122739a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
122749a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
122759a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
122769a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12277a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
122789a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
122799a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
122809a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12281a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12282a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12283a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12284ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_VIRTUAL: /* 0x6e */
122853d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12286a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
122879a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12288a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
122899a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
122909a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
122919a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
122929a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12293a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
122949a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12295ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (110 * 64)
122969a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
122979a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
122989a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
122999a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12300a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
123019a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
123029a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
123039a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12304a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12305a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12306a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12307ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_SUPER: /* 0x6f */
123083d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12309a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
123109a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12311a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
123129a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
123139a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
123149a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
123159a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12316a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
123179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12318ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (111 * 64)
123199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
123209a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
123219a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
123229a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12323a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
123249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
123259a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
123269a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12327a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12328a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12329a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12330ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_DIRECT: /* 0x70 */
123313d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12332a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
123339a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12334a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
123359a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
123369a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
123379a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
123389a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12339a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
123409a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12341ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (112 * 64)
123429a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
123439a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
123449a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
123459a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12346a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
123479a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
123489a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
123499a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12350a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12351a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12352a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12353ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_STATIC: /* 0x71 */
123543d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12355a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
123569a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12357a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
123589a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
123599a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
123609a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
123619a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12362a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
123639a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12364ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (113 * 64)
123659a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
123669a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
123679a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
123689a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12369a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
123709a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
123719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
123729a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12373a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12374a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12375a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12376ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_INTERFACE: /* 0x72 */
123773d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12378a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
123799a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12380a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
123819a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
123829a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
123839a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
123849a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12385a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
123869a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12387ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (114 * 64)
123889a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
123899a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
123909a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
123919a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12392a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
123939a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
123949a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
123959a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12396a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12397a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12398a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12399ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_73: /* 0x73 */
124003d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12401a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
124029a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12403a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
124049a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
124059a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
124069a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
124079a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12408a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
124099a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12410ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (115 * 64)
124119a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
124129a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
124139a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
124149a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12415a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
124169a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
124179a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
124189a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12419a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12420a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12421a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12422ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
124233d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12424a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
124259a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12426a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
124279a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
124289a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
124299a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
124309a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12431a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
124329a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12433ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (116 * 64)
124349a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
124359a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
124369a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
124379a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12438a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
124399a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
124409a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
124419a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12442a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12443a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12444a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12445ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_SUPER_RANGE: /* 0x75 */
124463d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12447a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
124489a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12449a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
124509a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
124519a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
124529a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
124539a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12454a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
124559a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12456ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (117 * 64)
124579a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
124589a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
124599a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
124609a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12461a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
124629a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
124639a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
124649a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12465a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12466a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12467a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12468ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_DIRECT_RANGE: /* 0x76 */
124693d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12470a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
124719a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12472a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
124739a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
124749a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
124759a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
124769a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12477a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
124789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12479ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (118 * 64)
124809a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
124819a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
124829a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
124839a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12484a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
124859a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
124869a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
124879a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12488a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12489a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12490a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12491ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_STATIC_RANGE: /* 0x77 */
124923d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12493a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
124949a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12495a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
124969a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
124979a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
124989a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
124999a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12500a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
125019a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12502ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (119 * 64)
125039a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
125049a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
125059a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
125069a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12507a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
125089a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
125099a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
125109a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12511a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12512a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12513a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12514ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */
125153d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12516a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
125179a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12518a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
125199a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
125209a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
125219a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
125229a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12523a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
125249a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12525ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (120 * 64)
125269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
125279a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
125289a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
125299a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12530a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
125319a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
125329a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
125339a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12534a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12535a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12536a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12537ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_79: /* 0x79 */
125383d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12539a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
125409a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12541a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
125429a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
125439a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
125449a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
125459a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12546a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
125479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12548ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (121 * 64)
125499a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
125509a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
125519a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
125529a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12553a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
125549a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
125559a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
125569a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12557a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12558a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12559a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12560ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_7A: /* 0x7a */
125613d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12562a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
125639a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12564a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
125659a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
125669a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
125679a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
125689a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12569a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
125709a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12571ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (122 * 64)
125729a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
125739a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
125749a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
125759a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12576a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
125779a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
125789a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
125799a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12580a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12581a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12582a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12583ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NEG_INT: /* 0x7b */
125843d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12585a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
125869a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12587a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
125889a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
125899a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
125909a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
125919a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12592a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
125939a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12594ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (123 * 64)
125959a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
125969a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
125979a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
125989a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12599a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
126009a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
126019a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
126029a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12603a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12604a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12605a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12606ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NOT_INT: /* 0x7c */
126073d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12608a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
126099a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12610a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
126119a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
126129a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
126139a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
126149a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12615a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
126169a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12617ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (124 * 64)
126189a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
126199a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
126209a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
126219a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12622a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
126239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
126249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
126259a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12626a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12627a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12628a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12629ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NEG_LONG: /* 0x7d */
126303d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12631a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
126329a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12633a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
126349a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
126359a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
126369a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
126379a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12638a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
126399a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12640ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (125 * 64)
126419a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
126429a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
126439a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
126449a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12645a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
126469a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
126479a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
126489a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12649a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12650a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12651a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12652ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NOT_LONG: /* 0x7e */
126533d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12654a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
126559a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12656a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
126579a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
126589a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
126599a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
126609a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12661a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
126629a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12663ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (126 * 64)
126649a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
126659a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
126669a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
126679a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12668a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
126699a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
126709a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
126719a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12672a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12673a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12674a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12675ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NEG_FLOAT: /* 0x7f */
126763d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12677a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
126789a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12679a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
126809a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
126819a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
126829a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
126839a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12684a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
126859a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12686ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (127 * 64)
126879a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
126889a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
126899a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
126909a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12691a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
126929a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
126939a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
126949a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12695a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12696a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12697a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12698ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_NEG_DOUBLE: /* 0x80 */
126993d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12700a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
127019a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12702a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
127039a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
127049a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
127059a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
127069a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12707a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
127089a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12709ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (128 * 64)
127109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
127119a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
127129a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
127139a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12714a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
127159a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
127169a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
127179a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12718a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12719a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12720a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12721ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INT_TO_LONG: /* 0x81 */
127223d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12723a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
127249a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12725a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
127269a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
127279a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
127289a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
127299a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12730a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
127319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12732ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (129 * 64)
127339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
127349a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
127359a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
127369a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12737a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
127389a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
127399a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
127409a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12741a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12742a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12743a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12744ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INT_TO_FLOAT: /* 0x82 */
127453d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12746a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
127479a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12748a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
127499a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
127509a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
127519a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
127529a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12753a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
127549a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12755ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (130 * 64)
127569a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
127579a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
127589a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
127599a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12760a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
127619a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
127629a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
127639a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12764a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12765a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12766a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12767ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INT_TO_DOUBLE: /* 0x83 */
127683d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12769a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
127709a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12771a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
127729a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
127739a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
127749a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
127759a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12776a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
127779a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12778ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (131 * 64)
127799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
127809a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
127819a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
127829a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12783a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
127849a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
127859a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
127869a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12787a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12788a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12789a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12790ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_LONG_TO_INT: /* 0x84 */
127913d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12792a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
127939a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12794a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
127959a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
127969a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
127979a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
127989a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12799a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
128009a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12801ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (132 * 64)
128029a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
128039a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
128049a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
128059a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12806a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
128079a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
128089a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
128099a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12810a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12811a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12812a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12813ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_LONG_TO_FLOAT: /* 0x85 */
128143d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12815a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
128169a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12817a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
128189a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
128199a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
128209a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
128219a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12822a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
128239a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12824ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (133 * 64)
128259a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
128269a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
128279a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
128289a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12829a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
128309a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
128319a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
128329a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12833a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12834a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12835a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12836ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_LONG_TO_DOUBLE: /* 0x86 */
128373d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12838a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
128399a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12840a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
128419a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
128429a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
128439a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
128449a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12845a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
128469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12847ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (134 * 64)
128489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
128499a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
128509a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
128519a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12852a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
128539a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
128549a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
128559a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12856a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12857a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12858a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12859ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_FLOAT_TO_INT: /* 0x87 */
128603d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12861a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
128629a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12863a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
128649a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
128659a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
128669a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
128679a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12868a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
128699a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12870ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (135 * 64)
128719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
128729a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
128739a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
128749a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12875a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
128769a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
128779a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
128789a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12879a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12880a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12881a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12882ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_FLOAT_TO_LONG: /* 0x88 */
128833d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12884a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
128859a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12886a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
128879a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
128889a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
128899a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
128909a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12891a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
128929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12893ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (136 * 64)
128949a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
128959a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
128969a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
128979a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12898a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
128999a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
129009a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
129019a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12902a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12903a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12904a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12905ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_FLOAT_TO_DOUBLE: /* 0x89 */
129063d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12907a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
129089a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12909a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
129109a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
129119a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
129129a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
129139a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12914a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
129159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12916ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (137 * 64)
129179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
129189a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
129199a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
129209a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12921a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
129229a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
129239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
129249a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12925a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12926a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12927a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12928ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DOUBLE_TO_INT: /* 0x8a */
129293d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12930a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
129319a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12932a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
129339a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
129349a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
129359a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
129369a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12937a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
129389a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12939ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (138 * 64)
129409a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
129419a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
129429a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
129439a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12944a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
129459a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
129469a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
129479a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12948a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12949a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12950a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12951ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DOUBLE_TO_LONG: /* 0x8b */
129523d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12953a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
129549a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12955a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
129569a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
129579a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
129589a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
129599a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12960a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
129619a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12962ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (139 * 64)
129639a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
129649a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
129659a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
129669a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12967a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
129689a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
129699a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
129709a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12971a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12972a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12973a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12974ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DOUBLE_TO_FLOAT: /* 0x8c */
129753d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12976a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
129779a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
12978a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
129799a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
129809a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
129819a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
129829a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
12983a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
129849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
12985ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (140 * 64)
129869a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
129879a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
129889a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
129899a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
12990a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
129919a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
129929a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
129939a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
12994a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
12995a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
12996a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
12997ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INT_TO_BYTE: /* 0x8d */
129983d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
12999a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
130009a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13001a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
130029a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
130039a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
130049a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
130059a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13006a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
130079a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13008ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (141 * 64)
130099a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
130109a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
130119a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
130129a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13013a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
130149a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
130159a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
130169a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13017a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13018a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13019a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13020ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INT_TO_CHAR: /* 0x8e */
130213d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13022a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
130239a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13024a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
130259a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
130269a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
130279a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
130289a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13029a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
130309a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13031ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (142 * 64)
130329a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
130339a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
130349a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
130359a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13036a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
130379a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
130389a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
130399a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13040a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13041a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13042a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13043ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INT_TO_SHORT: /* 0x8f */
130443d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13045a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
130469a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13047a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
130489a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
130499a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
130509a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
130519a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13052a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
130539a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13054ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (143 * 64)
130559a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
130569a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
130579a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
130589a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13059a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
130609a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
130619a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
130629a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13063a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13064a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13065a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13066ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_INT: /* 0x90 */
130673d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13068a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
130699a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13070a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
130719a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
130729a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
130739a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
130749a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13075a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
130769a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13077ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (144 * 64)
130789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
130799a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
130809a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
130819a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13082a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
130839a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
130849a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
130859a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13086a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13087a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13088a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13089ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_INT: /* 0x91 */
130903d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13091a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
130929a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13093a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
130949a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
130959a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
130969a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
130979a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13098a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
130999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13100ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (145 * 64)
131019a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
131029a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
131039a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
131049a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13105a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
131069a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
131079a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
131089a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13109a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13110a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13111a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13112ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_INT: /* 0x92 */
131133d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13114a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
131159a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13116a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
131179a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
131189a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
131199a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
131209a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13121a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
131229a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13123ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (146 * 64)
131249a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
131259a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
131269a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
131279a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13128a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
131299a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
131309a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
131319a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13132a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13133a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13134a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13135ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_INT: /* 0x93 */
131363d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13137a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
131389a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13139a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
131409a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
131419a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
131429a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
131439a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13144a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
131459a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13146ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (147 * 64)
131479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
131489a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
131499a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
131509a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13151a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
131529a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
131539a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
131549a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13155a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13156a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13157a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13158ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_INT: /* 0x94 */
131593d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13160a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
131619a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13162a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
131639a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
131649a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
131659a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
131669a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13167a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
131689a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13169ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (148 * 64)
131709a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
131719a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
131729a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
131739a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13174a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
131759a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
131769a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
131779a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13178a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13179a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13180a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13181ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AND_INT: /* 0x95 */
131823d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13183a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
131849a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13185a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
131869a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
131879a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
131889a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
131899a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13190a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
131919a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13192ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (149 * 64)
131939a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
131949a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
131959a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
131969a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13197a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
131989a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
131999a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
132009a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13201a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13202a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13203a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13204ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_OR_INT: /* 0x96 */
132053d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13206a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
132079a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13208a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
132099a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
132109a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
132119a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
132129a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13213a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
132149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13215ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (150 * 64)
132169a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
132179a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
132189a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
132199a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13220a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
132219a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
132229a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
132239a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13224a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13225a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13226a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13227ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_XOR_INT: /* 0x97 */
132283d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13229a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
132309a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13231a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
132329a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
132339a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
132349a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
132359a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13236a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
132379a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13238ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (151 * 64)
132399a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
132409a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
132419a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
132429a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13243a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
132449a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
132459a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
132469a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13247a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13248a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13249a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13250ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHL_INT: /* 0x98 */
132513d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13252a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
132539a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13254a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
132559a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
132569a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
132579a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
132589a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13259a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
132609a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13261ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (152 * 64)
132629a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
132639a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
132649a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
132659a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13266a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
132679a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
132689a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
132699a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13270a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13271a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13272a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13273ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHR_INT: /* 0x99 */
132743d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13275a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
132769a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13277a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
132789a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
132799a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
132809a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
132819a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13282a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
132839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13284ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (153 * 64)
132859a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
132869a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
132879a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
132889a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13289a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
132909a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
132919a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
132929a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13293a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13294a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13295a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13296ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_USHR_INT: /* 0x9a */
132973d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13298a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
132999a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13300a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
133019a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
133029a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
133039a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
133049a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13305a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
133069a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13307ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (154 * 64)
133089a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
133099a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
133109a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
133119a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13312a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
133139a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
133149a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
133159a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13316a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13317a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13318a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13319ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_LONG: /* 0x9b */
133203d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13321a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
133229a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13323a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
133249a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
133259a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
133269a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
133279a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13328a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
133299a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13330ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (155 * 64)
133319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
133329a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
133339a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
133349a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13335a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
133369a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
133379a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
133389a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13339a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13340a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13341a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13342ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_LONG: /* 0x9c */
133433d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13344a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
133459a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13346a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
133479a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
133489a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
133499a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
133509a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13351a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
133529a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13353ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (156 * 64)
133549a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
133559a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
133569a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
133579a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13358a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
133599a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
133609a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
133619a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13362a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13363a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13364a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13365ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_LONG: /* 0x9d */
133663d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13367a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
133689a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13369a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
133709a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
133719a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
133729a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
133739a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13374a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
133759a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13376ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (157 * 64)
133779a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
133789a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
133799a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
133809a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13381a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
133829a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
133839a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
133849a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13385a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13386a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13387a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13388ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_LONG: /* 0x9e */
133893d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13390a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
133919a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13392a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
133939a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
133949a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
133959a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
133969a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13397a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
133989a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13399ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (158 * 64)
134009a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
134019a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
134029a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
134039a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13404a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
134059a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
134069a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
134079a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13408a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13409a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13410a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13411ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_LONG: /* 0x9f */
134123d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13413a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
134149a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13415a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
134169a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
134179a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
134189a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
134199a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13420a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
134219a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13422ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (159 * 64)
134239a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
134249a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
134259a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
134269a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13427a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
134289a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
134299a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
134309a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13431a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13432a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13433a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13434ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AND_LONG: /* 0xa0 */
134353d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13436a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
134379a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13438a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
134399a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
134409a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
134419a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
134429a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13443a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
134449a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13445ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (160 * 64)
134469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
134479a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
134489a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
134499a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13450a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
134519a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
134529a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
134539a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13454a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13455a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13456a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13457ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_OR_LONG: /* 0xa1 */
134583d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13459a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
134609a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13461a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
134629a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
134639a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
134649a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
134659a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13466a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
134679a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13468ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (161 * 64)
134699a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
134709a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
134719a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
134729a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13473a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
134749a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
134759a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
134769a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13477a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13478a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13479a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13480ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_XOR_LONG: /* 0xa2 */
134813d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13482a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
134839a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13484a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
134859a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
134869a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
134879a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
134889a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13489a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
134909a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13491ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (162 * 64)
134929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
134939a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
134949a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
134959a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13496a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
134979a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
134989a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
134999a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13500a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13501a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13502a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13503ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHL_LONG: /* 0xa3 */
135043d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13505a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
135069a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13507a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
135089a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
135099a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
135109a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
135119a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13512a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
135139a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13514ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (163 * 64)
135159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
135169a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
135179a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
135189a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13519a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
135209a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
135219a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
135229a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13523a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13524a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13525a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13526ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHR_LONG: /* 0xa4 */
135273d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13528a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
135299a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13530a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
135319a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
135329a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
135339a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
135349a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13535a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
135369a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13537ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (164 * 64)
135389a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
135399a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
135409a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
135419a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13542a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
135439a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
135449a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
135459a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13546a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13547a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13548a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13549ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_USHR_LONG: /* 0xa5 */
135503d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13551a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
135529a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13553a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
135549a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
135559a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
135569a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
135579a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13558a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
135599a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13560ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (165 * 64)
135619a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
135629a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
135639a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
135649a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13565a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
135669a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
135679a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
135689a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13569a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13570a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13571a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13572ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_FLOAT: /* 0xa6 */
135733d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13574a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
135759a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13576a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
135779a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
135789a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
135799a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
135809a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13581a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
135829a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13583ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (166 * 64)
135849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
135859a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
135869a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
135879a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13588a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
135899a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
135909a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
135919a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13592a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13593a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13594a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13595ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_FLOAT: /* 0xa7 */
135963d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13597a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
135989a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13599a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
136009a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
136019a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
136029a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
136039a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13604a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
136059a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13606ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (167 * 64)
136079a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
136089a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
136099a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
136109a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13611a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
136129a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
136139a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
136149a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13615a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13616a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13617a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13618ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_FLOAT: /* 0xa8 */
136193d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13620a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
136219a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13622a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
136239a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
136249a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
136259a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
136269a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13627a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
136289a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13629ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (168 * 64)
136309a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
136319a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
136329a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
136339a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13634a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
136359a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
136369a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
136379a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13638a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13639a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13640a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13641ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_FLOAT: /* 0xa9 */
136423d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13643a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
136449a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13645a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
136469a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
136479a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
136489a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
136499a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13650a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
136519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13652ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (169 * 64)
136539a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
136549a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
136559a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
136569a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13657a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
136589a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
136599a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
136609a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13661a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13662a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13663a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13664ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_FLOAT: /* 0xaa */
136653d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13666a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
136679a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13668a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
136699a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
136709a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
136719a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
136729a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13673a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
136749a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13675ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (170 * 64)
136769a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
136779a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
136789a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
136799a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13680a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
136819a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
136829a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
136839a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13684a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13685a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13686a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13687ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_DOUBLE: /* 0xab */
136883d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13689a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
136909a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13691a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
136929a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
136939a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
136949a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
136959a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13696a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
136979a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13698ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (171 * 64)
136999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
137009a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
137019a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
137029a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13703a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
137049a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
137059a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
137069a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13707a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13708a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13709a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13710ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_DOUBLE: /* 0xac */
137113d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13712a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
137139a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13714a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
137159a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
137169a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
137179a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
137189a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13719a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
137209a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13721ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (172 * 64)
137229a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
137239a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
137249a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
137259a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13726a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
137279a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
137289a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
137299a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13730a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13731a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13732a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13733ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_DOUBLE: /* 0xad */
137343d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13735a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
137369a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13737a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
137389a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
137399a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
137409a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
137419a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13742a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
137439a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13744ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (173 * 64)
137459a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
137469a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
137479a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
137489a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13749a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
137509a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
137519a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
137529a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13753a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13754a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13755a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13756ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_DOUBLE: /* 0xae */
137573d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13758a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
137599a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13760a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
137619a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
137629a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
137639a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
137649a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13765a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
137669a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13767ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (174 * 64)
137689a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
137699a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
137709a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
137719a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13772a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
137739a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
137749a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
137759a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13776a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13777a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13778a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13779ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_DOUBLE: /* 0xaf */
137803d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13781a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
137829a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13783a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
137849a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
137859a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
137869a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
137879a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13788a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
137899a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13790ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (175 * 64)
137919a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
137929a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
137939a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
137949a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13795a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
137969a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
137979a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
137989a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13799a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13800a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13801a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13802ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_INT_2ADDR: /* 0xb0 */
138033d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13804a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
138059a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13806a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
138079a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
138089a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
138099a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
138109a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13811a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
138129a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13813ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (176 * 64)
138149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
138159a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
138169a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
138179a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13818a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
138199a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
138209a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
138219a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13822a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13823a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13824a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13825ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_INT_2ADDR: /* 0xb1 */
138263d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13827a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
138289a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13829a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
138309a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
138319a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
138329a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
138339a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13834a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
138359a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13836ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (177 * 64)
138379a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
138389a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
138399a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
138409a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13841a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
138429a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
138439a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
138449a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13845a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13846a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13847a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13848ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_INT_2ADDR: /* 0xb2 */
138493d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13850a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
138519a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13852a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
138539a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
138549a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
138559a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
138569a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13857a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
138589a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13859ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (178 * 64)
138609a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
138619a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
138629a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
138639a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13864a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
138659a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
138669a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
138679a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13868a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13869a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13870a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13871ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_INT_2ADDR: /* 0xb3 */
138723d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13873a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
138749a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13875a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
138769a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
138779a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
138789a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
138799a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13880a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
138819a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13882ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (179 * 64)
138839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
138849a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
138859a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
138869a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13887a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
138889a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
138899a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
138909a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13891a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13892a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13893a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13894ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_INT_2ADDR: /* 0xb4 */
138953d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13896a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
138979a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13898a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
138999a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
139009a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
139019a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
139029a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13903a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
139049a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13905ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (180 * 64)
139069a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
139079a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
139089a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
139099a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13910a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
139119a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
139129a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
139139a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13914a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13915a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13916a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13917ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AND_INT_2ADDR: /* 0xb5 */
139183d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13919a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
139209a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13921a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
139229a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
139239a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
139249a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
139259a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13926a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
139279a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13928ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (181 * 64)
139299a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
139309a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
139319a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
139329a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13933a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
139349a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
139359a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
139369a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13937a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13938a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13939a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13940ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_OR_INT_2ADDR: /* 0xb6 */
139413d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13942a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
139439a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13944a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
139459a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
139469a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
139479a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
139489a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13949a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
139509a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13951ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (182 * 64)
139529a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
139539a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
139549a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
139559a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13956a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
139579a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
139589a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
139599a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13960a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13961a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13962a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13963ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_XOR_INT_2ADDR: /* 0xb7 */
139643d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13965a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
139669a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13967a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
139689a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
139699a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
139709a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
139719a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13972a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
139739a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13974ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (183 * 64)
139759a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
139769a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
139779a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
139789a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
13979a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
139809a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
139819a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
139829a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
13983a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
13984a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
13985a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
13986ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHL_INT_2ADDR: /* 0xb8 */
139873d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
13988a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
139899a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
13990a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
139919a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
139929a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
139939a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
139949a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
13995a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
139969a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
13997ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (184 * 64)
139989a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
139999a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
140009a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
140019a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14002a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
140039a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
140049a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
140059a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14006a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14007a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14008a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14009ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHR_INT_2ADDR: /* 0xb9 */
140103d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14011a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
140129a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14013a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
140149a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
140159a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
140169a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
140179a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14018a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
140199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14020ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (185 * 64)
140219a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
140229a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
140239a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
140249a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14025a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
140269a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
140279a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
140289a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14029a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14030a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14031a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14032ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_USHR_INT_2ADDR: /* 0xba */
140333d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14034a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
140359a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14036a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
140379a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
140389a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
140399a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
140409a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14041a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
140429a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14043ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (186 * 64)
140449a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
140459a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
140469a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
140479a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14048a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
140499a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
140509a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
140519a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14052a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14053a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14054a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14055ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_LONG_2ADDR: /* 0xbb */
140563d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14057a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
140589a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14059a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
140609a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
140619a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
140629a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
140639a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14064a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
140659a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14066ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (187 * 64)
140679a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
140689a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
140699a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
140709a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14071a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
140729a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
140739a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
140749a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14075a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14076a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14077a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14078ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_LONG_2ADDR: /* 0xbc */
140793d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14080a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
140819a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14082a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
140839a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
140849a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
140859a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
140869a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14087a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
140889a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14089ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (188 * 64)
140909a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
140919a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
140929a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
140939a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14094a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
140959a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
140969a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
140979a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14098a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14099a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14100a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14101ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_LONG_2ADDR: /* 0xbd */
141023d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14103a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
141049a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14105a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
141069a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
141079a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
141089a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
141099a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14110a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
141119a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14112ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (189 * 64)
141139a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
141149a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
141159a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
141169a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14117a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
141189a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
141199a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
141209a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14121a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14122a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14123a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14124ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_LONG_2ADDR: /* 0xbe */
141253d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14126a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
141279a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14128a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
141299a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
141309a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
141319a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
141329a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14133a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
141349a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14135ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (190 * 64)
141369a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
141379a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
141389a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
141399a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14140a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
141419a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
141429a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
141439a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14144a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14145a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14146a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14147ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_LONG_2ADDR: /* 0xbf */
141483d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14149a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
141509a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14151a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
141529a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
141539a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
141549a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
141559a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14156a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
141579a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14158ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (191 * 64)
141599a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
141609a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
141619a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
141629a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14163a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
141649a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
141659a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
141669a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14167a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14168a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14169a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14170ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AND_LONG_2ADDR: /* 0xc0 */
141713d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14172a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
141739a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14174a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
141759a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
141769a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
141779a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
141789a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14179a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
141809a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14181ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (192 * 64)
141829a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
141839a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
141849a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
141859a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14186a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
141879a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
141889a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
141899a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14190a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14191a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14192a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14193ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_OR_LONG_2ADDR: /* 0xc1 */
141943d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14195a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
141969a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14197a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
141989a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
141999a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
142009a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
142019a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14202a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
142039a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14204ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (193 * 64)
142059a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
142069a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
142079a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
142089a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14209a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
142109a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
142119a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
142129a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14213a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14214a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14215a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14216ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_XOR_LONG_2ADDR: /* 0xc2 */
142173d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14218a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
142199a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14220a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
142219a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
142229a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
142239a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
142249a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14225a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
142269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14227ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (194 * 64)
142289a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
142299a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
142309a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
142319a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14232a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
142339a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
142349a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
142359a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14236a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14237a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14238a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14239ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHL_LONG_2ADDR: /* 0xc3 */
142403d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14241a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
142429a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14243a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
142449a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
142459a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
142469a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
142479a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14248a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
142499a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14250ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (195 * 64)
142519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
142529a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
142539a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
142549a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14255a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
142569a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
142579a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
142589a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14259a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14260a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14261a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14262ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHR_LONG_2ADDR: /* 0xc4 */
142633d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14264a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
142659a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14266a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
142679a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
142689a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
142699a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
142709a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14271a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
142729a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14273ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (196 * 64)
142749a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
142759a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
142769a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
142779a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14278a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
142799a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
142809a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
142819a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14282a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14283a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14284a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14285ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_USHR_LONG_2ADDR: /* 0xc5 */
142863d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14287a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
142889a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14289a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
142909a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
142919a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
142929a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
142939a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14294a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
142959a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14296ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (197 * 64)
142979a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
142989a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
142999a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
143009a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14301a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
143029a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
143039a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
143049a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14305a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14306a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14307a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14308ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_FLOAT_2ADDR: /* 0xc6 */
143093d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14310a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
143119a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14312a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
143139a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
143149a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
143159a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
143169a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14317a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
143189a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14319ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (198 * 64)
143209a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
143219a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
143229a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
143239a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14324a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
143259a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
143269a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
143279a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14328a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14329a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14330a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14331ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_FLOAT_2ADDR: /* 0xc7 */
143323d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14333a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
143349a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14335a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
143369a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
143379a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
143389a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
143399a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14340a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
143419a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14342ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (199 * 64)
143439a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
143449a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
143459a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
143469a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14347a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
143489a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
143499a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
143509a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14351a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14352a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14353a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14354ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_FLOAT_2ADDR: /* 0xc8 */
143553d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14356a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
143579a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14358a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
143599a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
143609a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
143619a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
143629a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14363a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
143649a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14365ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (200 * 64)
143669a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
143679a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
143689a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
143699a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14370a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
143719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
143729a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
143739a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14374a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14375a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14376a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14377ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_FLOAT_2ADDR: /* 0xc9 */
143783d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14379a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
143809a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14381a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
143829a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
143839a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
143849a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
143859a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14386a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
143879a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14388ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (201 * 64)
143899a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
143909a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
143919a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
143929a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14393a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
143949a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
143959a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
143969a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14397a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14398a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14399a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14400ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_FLOAT_2ADDR: /* 0xca */
144013d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14402a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
144039a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14404a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
144059a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
144069a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
144079a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
144089a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14409a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
144109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14411ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (202 * 64)
144129a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
144139a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
144149a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
144159a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14416a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
144179a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
144189a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
144199a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14420a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14421a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14422a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14423ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
144243d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14425a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
144269a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14427a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
144289a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
144299a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
144309a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
144319a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14432a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
144339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14434ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (203 * 64)
144359a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
144369a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
144379a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
144389a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14439a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
144409a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
144419a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
144429a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14443a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14444a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14445a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14446ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SUB_DOUBLE_2ADDR: /* 0xcc */
144473d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14448a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
144499a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14450a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
144519a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
144529a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
144539a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
144549a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14455a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
144569a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14457ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (204 * 64)
144589a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
144599a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
144609a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
144619a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14462a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
144639a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
144649a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
144659a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14466a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14467a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14468a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14469ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_DOUBLE_2ADDR: /* 0xcd */
144703d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14471a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
144729a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14473a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
144749a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
144759a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
144769a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
144779a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14478a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
144799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14480ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (205 * 64)
144819a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
144829a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
144839a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
144849a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14485a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
144869a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
144879a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
144889a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14489a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14490a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14491a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14492ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_DOUBLE_2ADDR: /* 0xce */
144933d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14494a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
144959a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14496a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
144979a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
144989a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
144999a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
145009a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14501a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
145029a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14503ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (206 * 64)
145049a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
145059a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
145069a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
145079a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14508a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
145099a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
145109a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
145119a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14512a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14513a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14514a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14515ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_DOUBLE_2ADDR: /* 0xcf */
145163d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14517a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
145189a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14519a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
145209a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
145219a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
145229a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
145239a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14524a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
145259a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14526ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (207 * 64)
145279a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
145289a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
145299a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
145309a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14531a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
145329a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
145339a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
145349a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14535a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14536a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14537a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14538ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_INT_LIT16: /* 0xd0 */
145393d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14540a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
145419a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14542a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
145439a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
145449a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
145459a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
145469a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14547a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
145489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14549ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (208 * 64)
145509a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
145519a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
145529a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
145539a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14554a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
145559a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
145569a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
145579a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14558a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14559a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14560a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14561ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_RSUB_INT: /* 0xd1 */
145623d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14563a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
145649a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14565a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
145669a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
145679a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
145689a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
145699a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14570a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
145719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14572ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (209 * 64)
145739a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
145749a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
145759a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
145769a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14577a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
145789a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
145799a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
145809a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14581a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14582a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14583a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14584ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_INT_LIT16: /* 0xd2 */
145853d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14586a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
145879a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14588a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
145899a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
145909a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
145919a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
145929a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14593a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
145949a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14595ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (210 * 64)
145969a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
145979a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
145989a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
145999a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14600a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
146019a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
146029a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
146039a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14604a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14605a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14606a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14607ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_INT_LIT16: /* 0xd3 */
146083d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14609a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
146109a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14611a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
146129a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
146139a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
146149a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
146159a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14616a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
146179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14618ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (211 * 64)
146199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
146209a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
146219a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
146229a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14623a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
146249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
146259a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
146269a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14627a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14628a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14629a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14630ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_INT_LIT16: /* 0xd4 */
146313d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14632a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
146339a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14634a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
146359a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
146369a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
146379a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
146389a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14639a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
146409a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14641ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (212 * 64)
146429a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
146439a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
146449a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
146459a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14646a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
146479a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
146489a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
146499a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14650a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14651a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14652a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14653ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AND_INT_LIT16: /* 0xd5 */
146543d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14655a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
146569a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14657a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
146589a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
146599a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
146609a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
146619a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14662a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
146639a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14664ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (213 * 64)
146659a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
146669a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
146679a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
146689a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14669a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
146709a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
146719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
146729a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14673a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14674a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14675a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14676ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_OR_INT_LIT16: /* 0xd6 */
146773d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14678a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
146799a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14680a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
146819a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
146829a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
146839a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
146849a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14685a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
146869a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14687ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (214 * 64)
146889a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
146899a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
146909a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
146919a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14692a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
146939a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
146949a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
146959a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14696a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14697a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14698a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14699ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_XOR_INT_LIT16: /* 0xd7 */
147003d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14701a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
147029a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14703a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
147049a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
147059a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
147069a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
147079a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14708a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
147099a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14710ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (215 * 64)
147119a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
147129a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
147139a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
147149a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14715a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
147169a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
147179a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
147189a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14719a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14720a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14721a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14722ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_ADD_INT_LIT8: /* 0xd8 */
147233d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14724a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
147259a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14726a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
147279a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
147289a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
147299a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
147309a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14731a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
147329a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14733ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (216 * 64)
147349a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
147359a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
147369a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
147379a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14738a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
147399a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
147409a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
147419a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14742a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14743a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14744a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14745ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_RSUB_INT_LIT8: /* 0xd9 */
147463d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14747a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
147489a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14749a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
147509a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
147519a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
147529a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
147539a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14754a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
147559a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14756ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (217 * 64)
147579a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
147589a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
147599a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
147609a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14761a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
147629a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
147639a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
147649a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14765a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14766a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14767a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14768ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_MUL_INT_LIT8: /* 0xda */
147693d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14770a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
147719a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14772a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
147739a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
147749a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
147759a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
147769a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14777a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
147789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14779ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (218 * 64)
147809a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
147819a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
147829a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
147839a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14784a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
147859a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
147869a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
147879a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14788a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14789a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14790a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14791ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_DIV_INT_LIT8: /* 0xdb */
147923d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14793a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
147949a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14795a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
147969a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
147979a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
147989a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
147999a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14800a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
148019a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14802ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (219 * 64)
148039a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
148049a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
148059a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
148069a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14807a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
148089a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
148099a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
148109a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14811a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14812a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14813a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14814ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_REM_INT_LIT8: /* 0xdc */
148153d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14816a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
148179a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14818a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
148199a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
148209a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
148219a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
148229a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14823a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
148249a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14825ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (220 * 64)
148269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
148279a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
148289a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
148299a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14830a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
148319a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
148329a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
148339a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14834a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14835a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14836a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14837ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_AND_INT_LIT8: /* 0xdd */
148383d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14839a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
148409a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14841a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
148429a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
148439a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
148449a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
148459a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14846a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
148479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14848ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (221 * 64)
148499a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
148509a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
148519a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
148529a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14853a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
148549a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
148559a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
148569a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14857a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14858a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14859a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14860ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_OR_INT_LIT8: /* 0xde */
148613d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14862a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
148639a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14864a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
148659a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
148669a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
148679a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
148689a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14869a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
148709a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14871ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (222 * 64)
148729a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
148739a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
148749a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
148759a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14876a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
148779a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
148789a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
148799a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14880a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14881a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14882a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14883ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_XOR_INT_LIT8: /* 0xdf */
148843d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14885a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
148869a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14887a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
148889a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
148899a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
148909a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
148919a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14892a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
148939a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14894ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (223 * 64)
148959a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
148969a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
148979a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
148989a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14899a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
149009a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
149019a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
149029a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14903a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14904a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14905a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14906ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHL_INT_LIT8: /* 0xe0 */
149073d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14908a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
149099a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14910a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
149119a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
149129a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
149139a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
149149a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14915a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
149169a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14917ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (224 * 64)
149189a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
149199a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
149209a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
149219a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14922a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
149239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
149249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
149259a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14926a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14927a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14928a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14929ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SHR_INT_LIT8: /* 0xe1 */
149303d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14931a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
149329a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14933a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
149349a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
149359a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
149369a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
149379a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14938a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
149399a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14940ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (225 * 64)
149419a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
149429a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
149439a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
149449a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14945a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
149469a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
149479a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
149489a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14949a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14950a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14951a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14952ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_USHR_INT_LIT8: /* 0xe2 */
149533d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14954a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
149559a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14956a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
149579a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
149589a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
149599a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
149609a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14961a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
149629a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14963ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (226 * 64)
149649a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
149659a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
149669a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
149679a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14968a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
149699a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
149709a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
149719a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14972a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14973a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14974a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14975ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_VOLATILE: /* 0xe3 */
149763d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
14977a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
149789a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
14979a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
149809a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
149819a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
149829a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
149839a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
14984a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
149859a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
14986ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (227 * 64)
149879a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
149889a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
149899a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
149909a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
14991a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
149929a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
149939a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
149949a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
14995a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
14996a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
14997a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
14998ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_VOLATILE: /* 0xe4 */
149993d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15000a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
150019a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15002a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
150039a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
150049a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
150059a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
150069a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15007a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
150089a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15009ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (228 * 64)
150109a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
150119a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
150129a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
150139a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15014a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
150159a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
150169a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
150179a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15018a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15019a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15020a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15021ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_VOLATILE: /* 0xe5 */
150223d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15023a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
150249a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15025a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
150269a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
150279a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
150289a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
150299a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15030a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
150319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15032ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (229 * 64)
150339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
150349a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
150359a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
150369a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15037a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
150389a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
150399a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
150409a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15041a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15042a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15043a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15044ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_VOLATILE: /* 0xe6 */
150453d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15046a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
150479a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15048a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
150499a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
150509a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
150519a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
150529a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15053a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
150549a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15055ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (230 * 64)
150569a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
150579a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
150589a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
150599a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15060a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
150619a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
150629a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
150639a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15064a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15065a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15066a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15067ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
150683d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15069a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
150709a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15071a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
150729a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
150739a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
150749a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
150759a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15076a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
150779a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15078ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (231 * 64)
150799a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
150809a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
150819a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
150829a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15083a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
150849a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
150859a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
150869a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15087a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15088a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15089a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15090ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_WIDE_VOLATILE: /* 0xe8 */
150913d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15092a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
150939a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15094a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
150959a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
150969a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
150979a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
150989a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15099a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
151009a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15101ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (232 * 64)
151029a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
151039a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
151049a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
151059a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15106a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
151079a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
151089a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
151099a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15110a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15111a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15112a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15113ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_WIDE_VOLATILE: /* 0xe9 */
151143d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15115a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
151169a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15117a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
151189a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
151199a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
151209a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
151219a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15122a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
151239a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15124ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (233 * 64)
151259a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
151269a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
151279a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
151289a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15129a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
151309a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
151319a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
151329a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15133a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15134a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15135a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15136ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_WIDE_VOLATILE: /* 0xea */
151373d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15138a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
151399a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15140a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
151419a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
151429a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
151439a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
151449a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15145a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
151469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15147ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (234 * 64)
151489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
151499a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
151509a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
151519a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15152a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
151539a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
151549a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
151559a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15156a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15157a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15158a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15159ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_WIDE_VOLATILE: /* 0xeb */
151603d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15161a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
151629a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15163a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
151649a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
151659a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
151669a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
151679a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15168a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
151699a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15170ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (235 * 64)
151719a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
151729a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
151739a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
151749a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15175a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
151769a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
151779a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
151789a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15179a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15180a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15181a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15182ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_BREAKPOINT: /* 0xec */
151833d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15184a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
151859a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15186a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
151879a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
151889a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
151899a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
151909a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15191a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
151929a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15193ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (236 * 64)
151949a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
151959a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
151969a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
151979a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15198a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
151999a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
152009a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
152019a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15202a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15203a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15204a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15205ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_THROW_VERIFICATION_ERROR: /* 0xed */
152063d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15207a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
152089a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15209a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
152109a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
152119a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
152129a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
152139a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15214a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
152159a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15216ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (237 * 64)
152179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
152189a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
152199a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
152209a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15221a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
152229a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
152239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
152249a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15225a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15226a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15227a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15228ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_EXECUTE_INLINE: /* 0xee */
152293d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15230a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
152319a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15232a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
152339a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
152349a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
152359a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
152369a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15237a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
152389a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15239ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (238 * 64)
152409a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
152419a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
152429a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
152439a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15244a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
152459a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
152469a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
152479a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15248a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15249a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15250a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15251ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_EXECUTE_INLINE_RANGE: /* 0xef */
152523d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15253a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
152549a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15255a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
152569a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
152579a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
152589a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
152599a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15260a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
152619a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15262ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (239 * 64)
152639a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
152649a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
152659a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
152669a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15267a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
152689a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
152699a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
152709a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15271a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15272a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15273a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15274ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
152753d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15276a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
152779a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15278a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
152799a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
152809a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
152819a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
152829a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15283a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
152849a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15285ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (240 * 64)
152869a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
152879a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
152889a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
152899a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15290a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
152919a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
152929a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
152939a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15294a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15295a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15296a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15297ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_RETURN_VOID_BARRIER: /* 0xf1 */
152983d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15299a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
153009a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15301a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
153029a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
153039a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
153049a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
153059a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15306a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
153079a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15308ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (241 * 64)
153099a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
153109a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
153119a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
153129a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15313a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
153149a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
153159a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
153169a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15317a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15318a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15319a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15320ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_QUICK: /* 0xf2 */
153213d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15322a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
153239a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15324a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
153259a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
153269a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
153279a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
153289a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15329a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
153309a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15331ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (242 * 64)
153329a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
153339a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
153349a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
153359a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15336a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
153379a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
153389a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
153399a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15340a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15341a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15342a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15343ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_WIDE_QUICK: /* 0xf3 */
153443d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15345a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
153469a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15347a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
153489a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
153499a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
153509a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
153519a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15352a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
153539a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15354ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (243 * 64)
153559a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
153569a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
153579a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
153589a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15359a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
153609a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
153619a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
153629a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15363a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15364a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15365a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15366ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IGET_OBJECT_QUICK: /* 0xf4 */
153673d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15368a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
153699a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15370a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
153719a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
153729a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
153739a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
153749a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15375a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
153769a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15377ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (244 * 64)
153789a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
153799a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
153809a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
153819a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15382a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
153839a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
153849a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
153859a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15386a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15387a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15388a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15389ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_QUICK: /* 0xf5 */
153903d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15391a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
153929a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15393a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
153949a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
153959a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
153969a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
153979a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15398a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
153999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15400ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (245 * 64)
154019a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
154029a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
154039a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
154049a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15405a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
154069a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
154079a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
154089a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15409a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15410a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15411a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15412ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_WIDE_QUICK: /* 0xf6 */
154133d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15414a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
154159a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15416a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
154179a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
154189a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
154199a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
154209a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15421a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
154229a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15423ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (246 * 64)
154249a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
154259a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
154269a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
154279a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15428a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
154299a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
154309a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
154319a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15432a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15433a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15434a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15435ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
154363d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15437a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
154389a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15439a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
154409a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
154419a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
154429a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
154439a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15444a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
154459a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15446ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (247 * 64)
154479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
154489a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
154499a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
154509a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15451a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
154529a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
154539a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
154549a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15455a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15456a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15457a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15458ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
154593d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15460a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
154619a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15462a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
154639a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
154649a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
154659a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
154669a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15467a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
154689a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15469ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (248 * 64)
154709a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
154719a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
154729a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
154739a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15474a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
154759a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
154769a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
154779a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15478a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15479a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15480a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15481ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_VIRTUAL_QUICK_RANGE: /* 0xf9 */
154823d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15483a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
154849a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15485a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
154869a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
154879a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
154889a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
154899a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15490a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
154919a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15492ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (249 * 64)
154939a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
154949a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
154959a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
154969a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15497a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
154989a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
154999a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
155009a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15501a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15502a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15503a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15504ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_SUPER_QUICK: /* 0xfa */
155053d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15506a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
155079a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15508a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
155099a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
155109a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
155119a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
155129a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15513a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
155149a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15515ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (250 * 64)
155169a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
155179a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
155189a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
155199a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15520a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
155219a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
155229a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
155239a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15524a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15525a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15526a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15527ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
155283d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15529a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
155309a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15531a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
155329a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
155339a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
155349a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
155359a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15536a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
155379a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15538ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (251 * 64)
155399a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
155409a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
155419a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
155429a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15543a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
155449a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
155459a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
155469a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15547a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15548a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15549a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15550ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
155513d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15552a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
155539a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15554a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
155559a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
155569a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
155579a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
155589a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15559a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
155609a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15561ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (252 * 64)
155629a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
155639a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
155649a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
155659a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15566a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
155679a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
155689a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
155699a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15570a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15571a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15572a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15573ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
155743d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15575a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
155769a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15577a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
155789a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
155799a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
155809a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
155819a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15582a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
155839a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15584ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (253 * 64)
155859a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
155869a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
155879a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
155889a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15589a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
155909a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
155919a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
155929a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15593a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15594a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15595a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15596ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
155973d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15598a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
155999a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15600a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
156019a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
156029a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
156039a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
156049a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15605a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
156069a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15607ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (254 * 64)
156089a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
156099a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
156109a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
156119a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15612a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
156139a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
156149a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
156159a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15616a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15617a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/* ------------------------------ */
15618a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15619ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes.L_ALT_OP_UNUSED_FF: /* 0xff */
156203d054be0780e2bee9553711d409608495cc2c19ebuzbee/* File: armv5te/alt_stub.S */
15621a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee/*
156229a3147c7412f4794434b4c2604aa2ba784867774buzbee * Inter-instruction transfer stub.  Call out to dvmCheckBefore to handle
15623a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee * any interesting requests and then jump to the real instruction
156249a3147c7412f4794434b4c2604aa2ba784867774buzbee * handler.    Note that the call to dvmCheckBefore is done as a tail call.
156259a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE updates won't be seen until a refresh, and we can tell we have a
156269a3147c7412f4794434b4c2604aa2ba784867774buzbee * stale rIBASE if breakFlags==0.  Always refresh rIBASE here, and then
156279a3147c7412f4794434b4c2604aa2ba784867774buzbee * bail to the real handler if breakFlags==0.
15628a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee */
156299a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrb   r3, [rSELF, #offThread_breakFlags]
15630ab35b50311951feea3782151dd5422ee944685c2Elliott Hughes    adrl   lr, dvmAsmInstructionStart + (255 * 64)
156319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
156329a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp    r3, #0
156339a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq   lr                   @ nothing to do - jump to real handler
156349a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
15635a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    mov    r0, rPC              @ arg0
156369a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, rFP              @ arg1
156379a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, rSELF            @ arg2
156389a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      dvmCheckBefore       @ (dPC,dFP,self) tail call
15639a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee
15640a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .balign 64
15641a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .size   dvmAsmAltInstructionStart, .-dvmAsmAltInstructionStart
15642a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    .global dvmAsmAltInstructionEnd
15643a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbeedvmAsmAltInstructionEnd:
15644a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/* File: armv5te/footer.S */
15645a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
15646a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * ===========================================================================
15647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *  Common subroutines and data
15648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * ===========================================================================
15649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
15650a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
15651a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .text
15652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .align  2
15653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
15654ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
156559a3147c7412f4794434b4c2604aa2ba784867774buzbee
1565697319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#if defined(WITH_SELF_VERIFICATION)
156579a3147c7412f4794434b4c2604aa2ba784867774buzbee/*
156589a3147c7412f4794434b4c2604aa2ba784867774buzbee * "longjmp" to a translation after single-stepping.  Before returning
156599a3147c7412f4794434b4c2604aa2ba784867774buzbee * to translation, must save state for self-verification.
156609a3147c7412f4794434b4c2604aa2ba784867774buzbee */
156619a3147c7412f4794434b4c2604aa2ba784867774buzbee    .global dvmJitResumeTranslation              @ (Thread* self, u4* dFP)
156629a3147c7412f4794434b4c2604aa2ba784867774buzbeedvmJitResumeTranslation:
156639a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rSELF, r0                             @ restore self
156649a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rPC, r1                               @ restore Dalvik pc
156659a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rFP, r2                               @ restore Dalvik fp
156669a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    r10, [rSELF,#offThread_jitResumeNPC]  @ resume address
156679a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, #0
156689a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    r2, [rSELF,#offThread_jitResumeNPC]   @ reset resume address
156699a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    sp, [rSELF,#offThread_jitResumeNSP]   @ cut back native stack
156709a3147c7412f4794434b4c2604aa2ba784867774buzbee    b      jitSVShadowRunStart                   @ resume as if cache hit
156719a3147c7412f4794434b4c2604aa2ba784867774buzbee                                                 @ expects resume addr in r10
156729a3147c7412f4794434b4c2604aa2ba784867774buzbee
1567397319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    .global dvmJitToInterpPunt
1567497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff HaodvmJitToInterpPunt:
1567597319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r2,#kSVSPunt                 @ r2<- interpreter entry point
15676d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    mov    r3, #0
156779f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ Back to the interp land
15678d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    b      jitSVShadowRunEnd            @ doesn't return
1567997319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao
1568097319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    .global dvmJitToInterpSingleStep
1568197319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff HaodvmJitToInterpSingleStep:
156829a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rPC, r0              @ set up dalvik pc
156839a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
156849a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    lr, [rSELF,#offThread_jitResumeNPC]
156859a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    sp, [rSELF,#offThread_jitResumeNSP]
156869a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    r1, [rSELF,#offThread_jitResumeDPC]
1568797319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r2,#kSVSSingleStep           @ r2<- interpreter entry point
15688d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    b      jitSVShadowRunEnd            @ doesn't return
1568997319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao
156909a3147c7412f4794434b4c2604aa2ba784867774buzbee
156917a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    .global dvmJitToInterpNoChainNoProfile
156927a2697d327936e20ef5484f7819e2e4bf91c891fBen ChengdvmJitToInterpNoChainNoProfile:
156937a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r0,rPC                       @ pass our target PC
156947a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r2,#kSVSNoProfile            @ r2<- interpreter entry point
156957a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r3, #0                       @ 0 means !inJitCodeCache
156969f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ back to the interp land
156977a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    b      jitSVShadowRunEnd            @ doesn't return
156987a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng
1569940094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    .global dvmJitToInterpTraceSelectNoChain
1570040094c16d9727cc1e047a7d4bddffe04dd566211Ben ChengdvmJitToInterpTraceSelectNoChain:
1570140094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    mov    r0,rPC                       @ pass our target PC
157027a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r2,#kSVSTraceSelect          @ r2<- interpreter entry point
157037a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r3, #0                       @ 0 means !inJitCodeCache
157049f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ Back to the interp land
15705d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    b      jitSVShadowRunEnd            @ doesn't return
1570640094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng
1570740094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    .global dvmJitToInterpTraceSelect
1570840094c16d9727cc1e047a7d4bddffe04dd566211Ben ChengdvmJitToInterpTraceSelect:
157099a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    ldr    r0,[lr, #-1]                 @ pass our target PC
1571097319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r2,#kSVSTraceSelect          @ r2<- interpreter entry point
157117a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r3, #0                       @ 0 means !inJitCodeCache
157129f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ Back to the interp land
15713d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    b      jitSVShadowRunEnd            @ doesn't return
1571497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao
1571540094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    .global dvmJitToInterpBackwardBranch
1571640094c16d9727cc1e047a7d4bddffe04dd566211Ben ChengdvmJitToInterpBackwardBranch:
157179a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    ldr    r0,[lr, #-1]                 @ pass our target PC
1571897319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r2,#kSVSBackwardBranch       @ r2<- interpreter entry point
157197a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r3, #0                       @ 0 means !inJitCodeCache
157209f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ Back to the interp land
15721d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    b      jitSVShadowRunEnd            @ doesn't return
1572297319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao
1572397319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    .global dvmJitToInterpNormal
1572497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff HaodvmJitToInterpNormal:
157259a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    ldr    r0,[lr, #-1]                 @ pass our target PC
1572697319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r2,#kSVSNormal               @ r2<- interpreter entry point
157277a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r3, #0                       @ 0 means !inJitCodeCache
157289f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ Back to the interp land
15729d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    b      jitSVShadowRunEnd            @ doesn't return
1573097319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao
1573197319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    .global dvmJitToInterpNoChain
1573297319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff HaodvmJitToInterpNoChain:
1573397319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r0,rPC                       @ pass our target PC
1573497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r2,#kSVSNoChain              @ r2<- interpreter entry point
157357a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r3, #0                       @ 0 means !inJitCodeCache
157369f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ Back to the interp land
15737d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    b      jitSVShadowRunEnd            @ doesn't return
1573897319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#else
157399a3147c7412f4794434b4c2604aa2ba784867774buzbee
157409a3147c7412f4794434b4c2604aa2ba784867774buzbee/*
157419a3147c7412f4794434b4c2604aa2ba784867774buzbee * "longjmp" to a translation after single-stepping.
157429a3147c7412f4794434b4c2604aa2ba784867774buzbee */
157439a3147c7412f4794434b4c2604aa2ba784867774buzbee    .global dvmJitResumeTranslation              @ (Thread* self, u4* dFP)
157449a3147c7412f4794434b4c2604aa2ba784867774buzbeedvmJitResumeTranslation:
157459a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rSELF, r0                             @ restore self
157469a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rPC, r1                               @ restore Dalvik pc
157479a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rFP, r2                               @ restore Dalvik fp
157489a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    r0, [rSELF,#offThread_jitResumeNPC]
157499a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r2, #0
157509a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    r2, [rSELF,#offThread_jitResumeNPC]   @ reset resume address
157519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    sp, [rSELF,#offThread_jitResumeNSP]   @ cut back native stack
157529a3147c7412f4794434b4c2604aa2ba784867774buzbee    bx     r0                                    @ resume translation
157539a3147c7412f4794434b4c2604aa2ba784867774buzbee
15754ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/*
15755ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * Return from the translation cache to the interpreter when the compiler is
15756ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * having issues translating/executing a Dalvik instruction. We have to skip
15757ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * the code cache lookup otherwise it is possible to indefinitely bouce
15758ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * between the interpreter and the code cache if the instruction that fails
15759ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * to be compiled happens to be at a trace start.
15760ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng */
15761ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    .global dvmJitToInterpPunt
15762ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben ChengdvmJitToInterpPunt:
15763ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov    rPC, r0
15764978738d2cbf9d08fa78c65762eaac3351ab76b9aBen Cheng#if defined(WITH_JIT_TUNING)
15765ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov    r0,lr
15766ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bl     dvmBumpPunt;
15767ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#endif
15768ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    EXPORT_PC()
157697a0bcd0de6c4da6499a088a18d1750e51204c2a6Ben Cheng    mov    r0, #0
157709f601a917c8878204482c37aec7005054b6776fabuzbee    str    r0, [rSELF, #offThread_inJitCodeCache] @ Back to the interp land
15771a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
15772ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    FETCH_INST()
15773ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)
15774ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)
15775ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
15776ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/*
15777ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * Return to the interpreter to handle a single instruction.
157789a3147c7412f4794434b4c2604aa2ba784867774buzbee * We'll use the normal single-stepping mechanism via interpBreak,
157799a3147c7412f4794434b4c2604aa2ba784867774buzbee * but also save the native pc of the resume point in the translation
157809a3147c7412f4794434b4c2604aa2ba784867774buzbee * and the native sp so that we can later do the equivalent of a
157819a3147c7412f4794434b4c2604aa2ba784867774buzbee * longjmp() to resume.
15782ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * On entry:
157839a3147c7412f4794434b4c2604aa2ba784867774buzbee *    dPC <= Dalvik PC of instrucion to interpret
15784ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng *    lr <= resume point in translation
157859a3147c7412f4794434b4c2604aa2ba784867774buzbee *    r1 <= Dalvik PC of next instruction
15786ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng */
15787ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    .global dvmJitToInterpSingleStep
15788ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben ChengdvmJitToInterpSingleStep:
157899a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    rPC, r0              @ set up dalvik pc
15790ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    EXPORT_PC()
157919a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    lr, [rSELF,#offThread_jitResumeNPC]
157929a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    sp, [rSELF,#offThread_jitResumeNSP]
157939a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    r1, [rSELF,#offThread_jitResumeDPC]
157949a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1, #1
157959a3147c7412f4794434b4c2604aa2ba784867774buzbee    str    r1, [rSELF,#offThread_singleStepCount]  @ just step once
157969a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r0, rSELF
15797cf2aac7e6a29e7e1e5f622fd6123e0d1a9a75bdabuzbee    mov    r1, #kSubModeCountedStep
15798cf2aac7e6a29e7e1e5f622fd6123e0d1a9a75bdabuzbee    bl     dvmEnableSubMode     @ (self, newMode)
157999a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF,#offThread_curHandlerTable]
158009a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_INST()
158019a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_INST_OPCODE(ip)
158029a3147c7412f4794434b4c2604aa2ba784867774buzbee    GOTO_OPCODE(ip)
15803ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
1580440094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng/*
1580540094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng * Return from the translation cache and immediately request
1580640094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng * a translation for the exit target.  Commonly used for callees.
1580740094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng */
1580840094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    .global dvmJitToInterpTraceSelectNoChain
1580940094c16d9727cc1e047a7d4bddffe04dd566211Ben ChengdvmJitToInterpTraceSelectNoChain:
15810978738d2cbf9d08fa78c65762eaac3351ab76b9aBen Cheng#if defined(WITH_JIT_TUNING)
1581140094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    bl     dvmBumpNoChain
1581240094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng#endif
1581340094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    mov    r0,rPC
158149a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1,rSELF
158159a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl     dvmJitGetTraceAddrThread @ (pc, self)
158169f601a917c8878204482c37aec7005054b6776fabuzbee    str    r0, [rSELF, #offThread_inJitCodeCache] @ set the inJitCodeCache flag
1581740094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    mov    r1, rPC                  @ arg1 of translation may need this
1581840094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    mov    lr, #0                   @  in case target is HANDLER_INTERPRET
158197a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    cmp    r0,#0                    @ !0 means translation exists
1582040094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    bxne   r0                       @ continue native execution if so
158217a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    b      2f                       @ branch over to use the interpreter
15822ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
15823ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/*
15824ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * Return from the translation cache and immediately request
15825ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * a translation for the exit target.  Commonly used following
15826ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * invokes.
15827ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng */
1582840094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    .global dvmJitToInterpTraceSelect
1582940094c16d9727cc1e047a7d4bddffe04dd566211Ben ChengdvmJitToInterpTraceSelect:
158309a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    ldr    rPC,[lr, #-1]           @ get our target PC
158319a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    add    rINST,lr,#-5            @ save start of chain branch
15832bd0472480c6e876198fe19c4ffa22350c0ce57daBill Buzbee    add    rINST, #-4              @  .. which is 9 bytes back
15833ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov    r0,rPC
158349a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1,rSELF
158359a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl     dvmJitGetTraceAddrThread @ (pc, self)
158369f601a917c8878204482c37aec7005054b6776fabuzbee    str    r0, [rSELF, #offThread_inJitCodeCache] @ set the inJitCodeCache flag
15837ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp    r0,#0
15838ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    beq    2f
15839ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov    r1,rINST
15840ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bl     dvmJitChain              @ r0<- dvmJitChain(codeAddr,chainAddr)
158419a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    mov    r1, rPC                  @ arg1 of translation may need this
158429a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    mov    lr, #0                   @ in case target is HANDLER_INTERPRET
1584346cd5b63c29d3284a9ff3e0d0711fb136f409313Bill Buzbee    cmp    r0,#0                    @ successful chain?
1584446cd5b63c29d3284a9ff3e0d0711fb136f409313Bill Buzbee    bxne   r0                       @ continue native execution
1584546cd5b63c29d3284a9ff3e0d0711fb136f409313Bill Buzbee    b      toInterpreter            @ didn't chain - resume with interpreter
15846ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
15847ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/* No translation, so request one if profiling isn't disabled*/
15848ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng2:
15849a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
158509a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    r0, [rSELF, #offThread_pJitProfTable]
15851ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    FETCH_INST()
15852ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp    r0, #0
1585340094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    movne  r2,#kJitTSelectRequestHot   @ ask for trace selection
15854ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bne    common_selectTrace
15855ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)
15856ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)
15857ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
15858ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/*
15859ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * Return from the translation cache to the interpreter.
15860ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * The return was done with a BLX from thumb mode, and
15861ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * the following 32-bit word contains the target rPC value.
15862ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * Note that lr (r14) will have its low-order bit set to denote
15863ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * its thumb-mode origin.
15864ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng *
15865ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * We'll need to stash our lr origin away, recover the new
15866ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * target and then check to see if there is a translation available
15867ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * for our new target.  If so, we do a translation chain and
15868ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * go back to native execution.  Otherwise, it's back to the
15869ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * interpreter (after treating this entry as a potential
15870ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * trace start).
15871ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng */
15872ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    .global dvmJitToInterpNormal
15873ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben ChengdvmJitToInterpNormal:
158749a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    ldr    rPC,[lr, #-1]           @ get our target PC
158759a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    add    rINST,lr,#-5            @ save start of chain branch
15876bd0472480c6e876198fe19c4ffa22350c0ce57daBill Buzbee    add    rINST,#-4               @ .. which is 9 bytes back
15877978738d2cbf9d08fa78c65762eaac3351ab76b9aBen Cheng#if defined(WITH_JIT_TUNING)
15878ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bl     dvmBumpNormal
15879ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#endif
15880ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov    r0,rPC
158819a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1,rSELF
158829a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl     dvmJitGetTraceAddrThread @ (pc, self)
158839f601a917c8878204482c37aec7005054b6776fabuzbee    str    r0, [rSELF, #offThread_inJitCodeCache] @ set the inJitCodeCache flag
15884ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp    r0,#0
1588546cd5b63c29d3284a9ff3e0d0711fb136f409313Bill Buzbee    beq    toInterpreter            @ go if not, otherwise do chain
15886ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov    r1,rINST
15887ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bl     dvmJitChain              @ r0<- dvmJitChain(codeAddr,chainAddr)
158889a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    mov    r1, rPC                  @ arg1 of translation may need this
158899a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    mov    lr, #0                   @  in case target is HANDLER_INTERPRET
1589046cd5b63c29d3284a9ff3e0d0711fb136f409313Bill Buzbee    cmp    r0,#0                    @ successful chain?
1589146cd5b63c29d3284a9ff3e0d0711fb136f409313Bill Buzbee    bxne   r0                       @ continue native execution
1589246cd5b63c29d3284a9ff3e0d0711fb136f409313Bill Buzbee    b      toInterpreter            @ didn't chain - resume with interpreter
15893ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
15894ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/*
15895ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * Return from the translation cache to the interpreter to do method invocation.
15896ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * Check if translation exists for the callee, but don't chain to it.
15897ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng */
158987a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    .global dvmJitToInterpNoChainNoProfile
158997a2697d327936e20ef5484f7819e2e4bf91c891fBen ChengdvmJitToInterpNoChainNoProfile:
159007a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng#if defined(WITH_JIT_TUNING)
159017a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    bl     dvmBumpNoChain
159027a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng#endif
159037a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r0,rPC
159049a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1,rSELF
159059a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl     dvmJitGetTraceAddrThread @ (pc, self)
159069f601a917c8878204482c37aec7005054b6776fabuzbee    str    r0, [rSELF, #offThread_inJitCodeCache] @ set the inJitCodeCache flag
159077a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    r1, rPC                  @ arg1 of translation may need this
159087a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    mov    lr, #0                   @  in case target is HANDLER_INTERPRET
159097a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    cmp    r0,#0
159107a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    bxne   r0                       @ continue native execution if so
159117a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    EXPORT_PC()
15912a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
159137a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    FETCH_INST()
159147a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
159157a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
159167a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng
159177a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng/*
159187a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng * Return from the translation cache to the interpreter to do method invocation.
159197a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng * Check if translation exists for the callee, but don't chain to it.
159207a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng */
15921ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    .global dvmJitToInterpNoChain
15922ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben ChengdvmJitToInterpNoChain:
15923978738d2cbf9d08fa78c65762eaac3351ab76b9aBen Cheng#if defined(WITH_JIT_TUNING)
15924ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bl     dvmBumpNoChain
15925ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#endif
15926ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov    r0,rPC
159279a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r1,rSELF
159289a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl     dvmJitGetTraceAddrThread @ (pc, self)
159299f601a917c8878204482c37aec7005054b6776fabuzbee    str    r0, [rSELF, #offThread_inJitCodeCache] @ set the inJitCodeCache flag
159309a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    mov    r1, rPC                  @ arg1 of translation may need this
159319a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    mov    lr, #0                   @  in case target is HANDLER_INTERPRET
15932ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp    r0,#0
15933ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bxne   r0                       @ continue native execution if so
1593497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#endif
15935ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
15936ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/*
15937ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * No translation, restore interpreter regs and start interpreting.
159389f601a917c8878204482c37aec7005054b6776fabuzbee * rSELF & rFP were preserved in the translated code, and rPC has
15939ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * already been restored by the time we get here.  We'll need to set
15940ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng * up rIBASE & rINST, and load the address of the JitTable into r0.
15941ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng */
1594246cd5b63c29d3284a9ff3e0d0711fb136f409313Bill BuzbeetoInterpreter:
15943ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    EXPORT_PC()
15944a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
15945ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    FETCH_INST()
159469a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    r0, [rSELF, #offThread_pJitProfTable]
159479a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
15948ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    @ NOTE: intended fallthrough
159497a2697d327936e20ef5484f7819e2e4bf91c891fBen Cheng
15950ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng/*
159519a3147c7412f4794434b4c2604aa2ba784867774buzbee * Similar to common_updateProfile, but tests for null pJitProfTable
159529a3147c7412f4794434b4c2604aa2ba784867774buzbee * r0 holds pJifProfTAble, rINST is loaded, rPC is current and
159539a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE has been recently refreshed.
15954ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng */
15955ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Chengcommon_testUpdateProfile:
159569a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r0, #0               @ JIT switched off?
159579a3147c7412f4794434b4c2604aa2ba784867774buzbee    beq     4f                   @ return to interp if so
15958ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
159599a3147c7412f4794434b4c2604aa2ba784867774buzbee/*
159609a3147c7412f4794434b4c2604aa2ba784867774buzbee * Common code to update potential trace start counter, and initiate
159619a3147c7412f4794434b4c2604aa2ba784867774buzbee * a trace-build if appropriate.
159629a3147c7412f4794434b4c2604aa2ba784867774buzbee * On entry here:
159639a3147c7412f4794434b4c2604aa2ba784867774buzbee *    r0    <= pJitProfTable (verified non-NULL)
159649a3147c7412f4794434b4c2604aa2ba784867774buzbee *    rPC   <= Dalvik PC
159659a3147c7412f4794434b4c2604aa2ba784867774buzbee *    rINST <= next instruction
159669a3147c7412f4794434b4c2604aa2ba784867774buzbee */
15967ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Chengcommon_updateProfile:
15968ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    eor     r3,rPC,rPC,lsr #12 @ cheap, but fast hash function
159697b133ef7c84e68c3c4042176d830ea5b52e84139Ben Cheng    lsl     r3,r3,#(32 - JIT_PROF_SIZE_LOG_2)          @ shift out excess bits
159707b133ef7c84e68c3c4042176d830ea5b52e84139Ben Cheng    ldrb    r1,[r0,r3,lsr #(32 - JIT_PROF_SIZE_LOG_2)] @ get counter
15971ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)
15972ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    subs    r1,r1,#1           @ decrement counter
159737b133ef7c84e68c3c4042176d830ea5b52e84139Ben Cheng    strb    r1,[r0,r3,lsr #(32 - JIT_PROF_SIZE_LOG_2)] @ and store it
15974ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE_IFNE(ip)       @ if not threshold, fallthrough otherwise */
15975ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
159769a3147c7412f4794434b4c2604aa2ba784867774buzbee    /* Looks good, reset the counter */
159779a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r1, [rSELF, #offThread_jitThreshold]
159787b133ef7c84e68c3c4042176d830ea5b52e84139Ben Cheng    strb    r1,[r0,r3,lsr #(32 - JIT_PROF_SIZE_LOG_2)] @ reset counter
15979ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    EXPORT_PC()
15980ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov     r0,rPC
159819a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r1,rSELF
159829a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      dvmJitGetTraceAddrThread    @ (pc, self)
159839f601a917c8878204482c37aec7005054b6776fabuzbee    str     r0, [rSELF, #offThread_inJitCodeCache] @ set the inJitCodeCache flag
159847a0bcd0de6c4da6499a088a18d1750e51204c2a6Ben Cheng    mov     r1, rPC                     @ arg1 of translation may need this
159857a0bcd0de6c4da6499a088a18d1750e51204c2a6Ben Cheng    mov     lr, #0                      @  in case target is HANDLER_INTERPRET
15986ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
1598797319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#if !defined(WITH_SELF_VERIFICATION)
15988ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bxne    r0                          @ jump to the translation
1598940094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    mov     r2,#kJitTSelectRequest      @ ask for trace selection
1599040094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    @ fall-through to common_selectTrace
1599197319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#else
1599240094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng    moveq   r2,#kJitTSelectRequest      @ ask for trace selection
159939a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    beq     common_selectTrace
159949a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    /*
159959a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee     * At this point, we have a target translation.  However, if
159969a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee     * that translation is actually the interpret-only pseudo-translation
159979a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee     * we want to treat it the same as no translation.
159989a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee     */
15999d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    mov     r10, r0                     @ save target
160009a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    bl      dvmCompilerGetInterpretTemplate
16001d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    cmp     r0, r10                     @ special case?
16002d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng    bne     jitSVShadowRunStart         @ set up self verification shadow space
160031a7b9d7703297358d6b2276dff02eaff6586a6fdBen Cheng    @ Need to clear the inJitCodeCache flag
160041a7b9d7703297358d6b2276dff02eaff6586a6fdBen Cheng    mov    r3, #0                       @ 0 means not in the JIT code cache
160059f601a917c8878204482c37aec7005054b6776fabuzbee    str    r3, [rSELF, #offThread_inJitCodeCache] @ back to the interp land
160069a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    GET_INST_OPCODE(ip)
160079a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    GOTO_OPCODE(ip)
160089a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    /* no return */
1600997319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#endif
160109a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee
1601140094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng/*
1601240094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng * On entry:
160139a3147c7412f4794434b4c2604aa2ba784867774buzbee *  r2 is jit state.
1601440094c16d9727cc1e047a7d4bddffe04dd566211Ben Cheng */
16015ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Chengcommon_selectTrace:
16016cf2aac7e6a29e7e1e5f622fd6123e0d1a9a75bdabuzbee    ldrh    r0,[rSELF,#offThread_subMode]
16017cf2aac7e6a29e7e1e5f622fd6123e0d1a9a75bdabuzbee    ands    r0, #(kSubModeJitTraceBuild | kSubModeJitSV)
160189a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     3f                         @ already doing JIT work, continue
160199f601a917c8878204482c37aec7005054b6776fabuzbee    str     r2,[rSELF,#offThread_jitState]
160209a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r0, rSELF
160219a3147c7412f4794434b4c2604aa2ba784867774buzbee/*
160229a3147c7412f4794434b4c2604aa2ba784867774buzbee * Call out to validate trace-building request.  If successful,
160239a3147c7412f4794434b4c2604aa2ba784867774buzbee * rIBASE will be swapped to to send us into single-stepping trace
160249a3147c7412f4794434b4c2604aa2ba784867774buzbee * building mode, so we need to refresh before we continue.
160259a3147c7412f4794434b4c2604aa2ba784867774buzbee */
160269a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
160279a3147c7412f4794434b4c2604aa2ba784867774buzbee    SAVE_PC_FP_TO_SELF()                 @ copy of pc/fp to Thread
160289a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      dvmJitCheckTraceRequest
160299a3147c7412f4794434b4c2604aa2ba784867774buzbee3:
160309a3147c7412f4794434b4c2604aa2ba784867774buzbee    FETCH_INST()
160319a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
160329a3147c7412f4794434b4c2604aa2ba784867774buzbee4:
160339a3147c7412f4794434b4c2604aa2ba784867774buzbee    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
160349a3147c7412f4794434b4c2604aa2ba784867774buzbee    GOTO_OPCODE(ip)
160359a3147c7412f4794434b4c2604aa2ba784867774buzbee    /* no return */
160369a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
16037ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng
1603897319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#if defined(WITH_SELF_VERIFICATION)
1603997319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao/*
1604097319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao * Save PC and registers to shadow memory for self verification mode
1604197319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao * before jumping to native translation.
16042d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng * On entry:
160439f601a917c8878204482c37aec7005054b6776fabuzbee *    rPC, rFP, rSELF: the values that they should contain
16044d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben Cheng *    r10: the address of the target translation.
1604597319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao */
16046d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben ChengjitSVShadowRunStart:
1604797319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov     r0,rPC                      @ r0<- program counter
1604897319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov     r1,rFP                      @ r1<- frame pointer
160499f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r2,rSELF                    @ r2<- self (Thread) pointer
160509a8c75adb2abf551d06dbf757bff558c1feded08Bill Buzbee    mov     r3,r10                      @ r3<- target translation
1605197319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    bl      dvmSelfVerificationSaveState @ save registers to shadow space
16052ccd6c0102d1f898aaea1c94761167fdd083b5275Ben Cheng    ldr     rFP,[r0,#offShadowSpace_shadowFP] @ rFP<- fp in shadow space
16053ccd6c0102d1f898aaea1c94761167fdd083b5275Ben Cheng    bx      r10                         @ jump to the translation
1605497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao
1605597319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao/*
160569f601a917c8878204482c37aec7005054b6776fabuzbee * Restore PC, registers, and interpreter state to original values
1605797319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao * before jumping back to the interpreter.
160589a3147c7412f4794434b4c2604aa2ba784867774buzbee * On entry:
160599a3147c7412f4794434b4c2604aa2ba784867774buzbee *   r0:  dPC
160609a3147c7412f4794434b4c2604aa2ba784867774buzbee *   r2:  self verification state
1606197319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao */
16062d5adae17d71e86a1a5f3ae7825054e3249fb7879Ben ChengjitSVShadowRunEnd:
1606397319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r1,rFP                        @ pass ending fp
160649f601a917c8878204482c37aec7005054b6776fabuzbee    mov    r3,rSELF                      @ pass self ptr for convenience
1606597319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    bl     dvmSelfVerificationRestoreState @ restore pc and fp values
160669a3147c7412f4794434b4c2604aa2ba784867774buzbee    LOAD_PC_FP_FROM_SELF()               @ restore pc, fp
16067ccd6c0102d1f898aaea1c94761167fdd083b5275Ben Cheng    ldr    r1,[r0,#offShadowSpace_svState] @ get self verification state
1606897319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    cmp    r1,#0                         @ check for punt condition
1606997319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    beq    1f
160709a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Set up SV single-stepping
160719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov    r0, rSELF
16072cf2aac7e6a29e7e1e5f622fd6123e0d1a9a75bdabuzbee    mov    r1, #kSubModeJitSV
16073cf2aac7e6a29e7e1e5f622fd6123e0d1a9a75bdabuzbee    bl     dvmEnableSubMode              @ (self, subMode)
1607497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    mov    r2,#kJitSelfVerification      @ ask for self verification
160759f601a917c8878204482c37aec7005054b6776fabuzbee    str    r2,[rSELF,#offThread_jitState]
160769a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ intentional fallthrough
1607797319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao1:                                       @ exit to interpreter without check
1607897319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    EXPORT_PC()
16079a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]
1608097319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    FETCH_INST()
1608197319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    GET_INST_OPCODE(ip)
1608297319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao    GOTO_OPCODE(ip)
1608397319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao#endif
1608497319a8a234e9fe1cf90ca39aa6eca37d729afd5Jeff Hao
16085a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16086a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * The equivalent of "goto bail", this calls through the "bail handler".
160879a3147c7412f4794434b4c2604aa2ba784867774buzbee * It will end this interpreter activation, and return to the caller
160889a3147c7412f4794434b4c2604aa2ba784867774buzbee * of dvmMterpStdRun.
16089a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
160909a3147c7412f4794434b4c2604aa2ba784867774buzbee * State registers will be saved to the "thread" area before bailing
160919a3147c7412f4794434b4c2604aa2ba784867774buzbee * debugging purposes
16092a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16093a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_gotoBail:
160949f601a917c8878204482c37aec7005054b6776fabuzbee    SAVE_PC_FP_TO_SELF()                @ export state to "thread"
160959f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ r0<- self ptr
160969f601a917c8878204482c37aec7005054b6776fabuzbee    b       dvmMterpStdBail             @ call(self, changeInterp)
16097a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
160989a3147c7412f4794434b4c2604aa2ba784867774buzbee/*
160999a3147c7412f4794434b4c2604aa2ba784867774buzbee * The JIT's invoke method needs to remember the callsite class and
161009a3147c7412f4794434b4c2604aa2ba784867774buzbee * target pair.  Save them here so that they are available to
161019a3147c7412f4794434b4c2604aa2ba784867774buzbee * dvmCheckJit following the interpretation of this invoke.
161029a3147c7412f4794434b4c2604aa2ba784867774buzbee */
161039a3147c7412f4794434b4c2604aa2ba784867774buzbee#if defined(WITH_JIT)
161049a3147c7412f4794434b4c2604aa2ba784867774buzbeesave_callsiteinfo:
161059a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r9, #0
161069a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldrne   r9, [r9, #offObject_clazz]
161079a3147c7412f4794434b4c2604aa2ba784867774buzbee    str     r0, [rSELF, #offThread_methodToCall]
161089a3147c7412f4794434b4c2604aa2ba784867774buzbee    str     r9, [rSELF, #offThread_callsiteClass]
161099a3147c7412f4794434b4c2604aa2ba784867774buzbee    bx      lr
161109a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
16111a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16112a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16113a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Common code for method invocation with range.
16114a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
16115a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * On entry:
161169a3147c7412f4794434b4c2604aa2ba784867774buzbee *  r0 is "Method* methodToCall", r9 is "this"
16117a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16118a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_invokeMethodRange:
16119a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LinvokeNewRange:
161209a3147c7412f4794434b4c2604aa2ba784867774buzbee#if defined(WITH_JIT)
16121389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    r1, [rSELF, #offThread_subMode]
161229a3147c7412f4794434b4c2604aa2ba784867774buzbee    ands    r1, #kSubModeJitTraceBuild
161239a3147c7412f4794434b4c2604aa2ba784867774buzbee    blne    save_callsiteinfo
161249a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
16125a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ prepare to copy args to "outs" area of current frame
16126a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r2, rINST, lsr #8           @ r2<- AA (arg count) -- test for zero
16127a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SAVEAREA_FROM_FP(r10, rFP)          @ r10<- stack save area
16128a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LinvokeArgsDone            @ if no args, skip the rest
16129a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- CCCC
16130a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1613171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao.LinvokeRangeArgs:
16132a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ r0=methodToCall, r1=CCCC, r2=count, r10=outs
16133a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ (very few methods have > 10 args; could unroll for common cases)
16134a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     r3, rFP, r1, lsl #2         @ r3<- &fp[CCCC]
16135a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     r10, r10, r2, lsl #2        @ r10<- "outs" area, for call args
16136a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden1:  ldr     r1, [r3], #4                @ val = *fp++
16137a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    subs    r2, r2, #1                  @ count--
16138a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r1, [r10], #4               @ *outs++ = val
16139a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     1b                          @ ...while count != 0
16140a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .LinvokeArgsDone
16141a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16142a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16143a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Common code for method invocation without range.
16144a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
16145a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * On entry:
161469a3147c7412f4794434b4c2604aa2ba784867774buzbee *  r0 is "Method* methodToCall", r9 is "this"
16147a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16148a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_invokeMethodNoRange:
16149a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LinvokeNewNoRange:
161509a3147c7412f4794434b4c2604aa2ba784867774buzbee#if defined(WITH_JIT)
16151389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    r1, [rSELF, #offThread_subMode]
161529a3147c7412f4794434b4c2604aa2ba784867774buzbee    ands    r1, #kSubModeJitTraceBuild
161539a3147c7412f4794434b4c2604aa2ba784867774buzbee    blne    save_callsiteinfo
161549a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
16155a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ prepare to copy args to "outs" area of current frame
16156a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    movs    r2, rINST, lsr #12          @ r2<- B (arg count) -- test for zero
16157a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SAVEAREA_FROM_FP(r10, rFP)          @ r10<- stack save area
16158a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(r1, 2)                        @ r1<- GFED (load here to hide latency)
16159a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     .LinvokeArgsDone
16160a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1616171eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    @ r0=methodToCall, r1=GFED, r2=count, r10=outs
16162a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LinvokeNonRange:
16163a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    rsb     r2, r2, #5                  @ r2<- 5-r2
16164a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     pc, pc, r2, lsl #4          @ computed goto, 4 instrs each
16165a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_abort                @ (skipped due to ARM prefetch)
16166a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden5:  and     ip, rINST, #0x0f00          @ isolate A
16167a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [rFP, ip, lsr #6]       @ r2<- vA (shift right 8, left 2)
16168a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0                      @ nop
16169a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r2, [r10, #-4]!             @ *--outs = vA
16170a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden4:  and     ip, r1, #0xf000             @ isolate G
16171a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [rFP, ip, lsr #10]      @ r2<- vG (shift right 12, left 2)
16172a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0                      @ nop
16173a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r2, [r10, #-4]!             @ *--outs = vG
16174a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden3:  and     ip, r1, #0x0f00             @ isolate F
16175a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [rFP, ip, lsr #6]       @ r2<- vF
16176a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0                      @ nop
16177a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r2, [r10, #-4]!             @ *--outs = vF
16178a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden2:  and     ip, r1, #0x00f0             @ isolate E
16179a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [rFP, ip, lsr #2]       @ r2<- vE
16180a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0                      @ nop
16181a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r2, [r10, #-4]!             @ *--outs = vE
16182a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden1:  and     ip, r1, #0x000f             @ isolate D
16183a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [rFP, ip, lsl #2]       @ r2<- vD
16184a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r0                      @ nop
16185a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r2, [r10, #-4]!             @ *--outs = vD
16186a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden0:  @ fall through to .LinvokeArgsDone
16187a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1618871eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao.LinvokeArgsDone: @ r0=methodToCall
1618971eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    ldrh    r9, [r0, #offMethod_registersSize]  @ r9<- methodToCall->regsSize
1619071eee1f0c2eb514585fdbee16730c9c2209e8f68jeffhao    ldrh    r3, [r0, #offMethod_outsSize]  @ r3<- methodToCall->outsSize
16191a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r0, #offMethod_insns]  @ r2<- method->insns
16192a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     rINST, [r0, #offMethod_clazz]  @ rINST<- method->clazz
16193a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ find space for the new stack frame, check for overflow
16194a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SAVEAREA_FROM_FP(r1, rFP)           @ r1<- stack save area
16195a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     r1, r1, r9, lsl #2          @ r1<- newFp (old savearea - regsSize)
16196a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SAVEAREA_FROM_FP(r10, r1)           @ r10<- newSaveArea
16197a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden@    bl      common_dumpRegs
161989f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r9, [rSELF, #offThread_interpStackEnd]    @ r9<- interpStackEnd
16199a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     r3, r10, r3, lsl #2         @ r3<- bottom (newsave - outsSize)
16200a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r3, r9                      @ bottom < interpStackEnd?
16201389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    lr, [rSELF, #offThread_subMode]
16202a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r0, #offMethod_accessFlags] @ r3<- methodToCall->accessFlags
162037a44e4ee0782d24b4c6090be1f0a3c66f971f2c1Andy McFadden    blo     .LstackOverflow             @ yes, this frame will overflow stack
16204a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16205a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ set up newSaveArea
16206a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#ifdef EASY_GDB
16207a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SAVEAREA_FROM_FP(ip, rFP)           @ ip<- stack save area
16208a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     ip, [r10, #offStackSaveArea_prevSave]
16209a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#endif
16210a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     rFP, [r10, #offStackSaveArea_prevFrame]
16211a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     rPC, [r10, #offStackSaveArea_savedPc]
16212ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
16213ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov     r9, #0
16214ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    str     r9, [r10, #offStackSaveArea_returnAddr]
16215ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#endif
16216a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r0, [r10, #offStackSaveArea_method]
162179a3147c7412f4794434b4c2604aa2ba784867774buzbee
162189a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Profiling?
162199a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     lr, #0                      @ any special modes happening?
162209a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     2f                          @ go if so
162219a3147c7412f4794434b4c2604aa2ba784867774buzbee1:
16222a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    tst     r3, #ACC_NATIVE
16223a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     .LinvokeNative
16224a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16225a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
16226a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0-r3}
16227a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_printNewline
16228a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rFP
16229a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, #0
16230a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmDumpFp
16231a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0-r3}
16232a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0-r3}
16233a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r1
16234a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r10
16235a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmDumpFp
16236a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      common_printNewline
16237a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0-r3}
16238a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    */
16239a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16240a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldrh    r9, [r2]                        @ r9 <- load INST from new PC
16241a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [rINST, #offClassObject_pDvmDex] @ r3<- method->clazz->pDvmDex
16242a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     rPC, r2                         @ publish new rPC
16243a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
162449f601a917c8878204482c37aec7005054b6776fabuzbee    @ Update state values for the new method
162459f601a917c8878204482c37aec7005054b6776fabuzbee    @ r0=methodToCall, r1=newFp, r3=newMethodClass, r9=newINST
162469f601a917c8878204482c37aec7005054b6776fabuzbee    str     r0, [rSELF, #offThread_method]    @ self->method = methodToCall
162479f601a917c8878204482c37aec7005054b6776fabuzbee    str     r3, [rSELF, #offThread_methodClassDex] @ self->methodClassDex = ...
162489a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r2, #1
162499a3147c7412f4794434b4c2604aa2ba784867774buzbee    str     r2, [rSELF, #offThread_debugIsMethodEntry]
16250ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
162519a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r0, [rSELF, #offThread_pJitProfTable]
16252a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     rFP, r1                         @ fp = newFp
16253a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_PREFETCHED_OPCODE(ip, r9)           @ extract prefetched opcode from r9
16254a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     rINST, r9                       @ publish new rINST
1625530bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    str     r1, [rSELF, #offThread_curFrame]   @ curFrame = newFp
16256ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    cmp     r0,#0
16257ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    bne     common_updateProfile
16258a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                         @ jump to next instruction
16259ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
16260ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov     rFP, r1                         @ fp = newFp
16261ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_PREFETCHED_OPCODE(ip, r9)           @ extract prefetched opcode from r9
16262ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov     rINST, r9                       @ publish new rINST
1626330bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    str     r1, [rSELF, #offThread_curFrame]   @ curFrame = newFp
16264ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                         @ jump to next instruction
16265ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#endif
16266a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
162679a3147c7412f4794434b4c2604aa2ba784867774buzbee2:
162689a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Profiling - record method entry.  r0: methodToCall
162699a3147c7412f4794434b4c2604aa2ba784867774buzbee    stmfd   sp!, {r0-r3}                @ preserve r0-r3
1627099e3e6e72e3471eb85fc2e405866392b01c080febuzbee    str     rPC, [rSELF, #offThread_pc] @ update interpSave.pc
162719a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r1, r0
162729a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r0, rSELF
162739a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      dvmReportInvoke             @ (self, method)
162749a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldmfd   sp!, {r0-r3}                @ restore r0-r3
162759a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       1b
162769a3147c7412f4794434b4c2604aa2ba784867774buzbee
16277a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LinvokeNative:
16278a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ Prep for the native call
16279a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ r0=methodToCall, r1=newFp, r10=newSaveArea
16280389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    lr, [rSELF, #offThread_subMode]
162819f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r9, [rSELF, #offThread_jniLocal_topCookie]@r9<-thread->localRef->...
1628230bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    str     r1, [rSELF, #offThread_curFrame]   @ curFrame = newFp
16283d5ab726b65d7271be261864c7e224fb90bfe06e0Andy McFadden    str     r9, [r10, #offStackSaveArea_localRefCookie] @newFp->localRefCookie=top
16284a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, r0                      @ r2<- methodToCall
16285a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r1                      @ r0<- newFp (points to args)
162869f601a917c8878204482c37aec7005054b6776fabuzbee    add     r1, rSELF, #offThread_retval  @ r1<- &retval
162879f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r3, rSELF                   @ arg3<- self
16288a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16289a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#ifdef ASSIST_DEBUGGER
16290a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* insert fake function header to help gdb find the stack frame */
16291a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       .Lskip
16292a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .type   dalvik_mterp, %function
16293a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddendalvik_mterp:
16294a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .fnstart
16295a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    MTERP_ENTRY1
16296a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    MTERP_ENTRY2
16297a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.Lskip:
16298a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#endif
16299a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
163009a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     lr, #0                      @ any special SubModes active?
163019a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     11f                         @ go handle them if so
163028b095215a4d5bde723819087f3455bdcc250a78fDavid Butcher    ldr     ip, [r2, #offMethod_nativeFunc] @ pc<- methodToCall->nativeFunc
163038b095215a4d5bde723819087f3455bdcc250a78fDavid Butcher    blx     ip
163049a3147c7412f4794434b4c2604aa2ba784867774buzbee7:
16305964a7b06a9134947b5985c7f712d18d57ed665d2Bill Buzbee
163069f601a917c8878204482c37aec7005054b6776fabuzbee    @ native return; r10=newSaveArea
16307a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ equivalent to dvmPopJniLocals
16308d5ab726b65d7271be261864c7e224fb90bfe06e0Andy McFadden    ldr     r0, [r10, #offStackSaveArea_localRefCookie] @ r0<- saved top
163099f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r1, [rSELF, #offThread_exception] @ check for exception
1631030bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    str     rFP, [rSELF, #offThread_curFrame]  @ curFrame = fp
16311a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ null?
163129f601a917c8878204482c37aec7005054b6776fabuzbee    str     r0, [rSELF, #offThread_jniLocal_topCookie] @ new top <- old top
16313a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bne     common_exceptionThrown      @ no, handle exception
16314a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16315a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_ADVANCE_INST(3)               @ advance rPC, load rINST
16316a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
16317a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
16318a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
163199a3147c7412f4794434b4c2604aa2ba784867774buzbee11:
163209a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ r0=newFp, r1=&retval, r2=methodToCall, r3=self, lr=subModes
163219a3147c7412f4794434b4c2604aa2ba784867774buzbee    stmfd   sp!, {r0-r3}                @ save all but subModes
1632299e3e6e72e3471eb85fc2e405866392b01c080febuzbee    mov     r0, r2                      @ r0<- methodToCall
163239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r1, rSELF
1632430bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    mov     r2, rFP
1632530bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    bl      dvmReportPreNativeInvoke    @ (methodToCall, self, fp)
163269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldmfd   sp, {r0-r3}                 @ refresh.  NOTE: no sp autoincrement
163272ff04ab635eeba79c2dad82850c34188abcdfe62Andy McFadden
163289a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Call the native method
163298b095215a4d5bde723819087f3455bdcc250a78fDavid Butcher    ldr     ip, [r2, #offMethod_nativeFunc] @ pc<- methodToCall->nativeFunc
163308b095215a4d5bde723819087f3455bdcc250a78fDavid Butcher    blx     ip
163312ff04ab635eeba79c2dad82850c34188abcdfe62Andy McFadden
163329a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Restore the pre-call arguments
163339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldmfd   sp!, {r0-r3}                @ r2<- methodToCall (others unneeded)
163349a3147c7412f4794434b4c2604aa2ba784867774buzbee
163359a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Finish up any post-invoke subMode requirements
1633699e3e6e72e3471eb85fc2e405866392b01c080febuzbee    mov     r0, r2                      @ r0<- methodToCall
163379a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r1, rSELF
1633830bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    mov     r2, rFP
1633930bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    bl      dvmReportPostNativeInvoke   @ (methodToCall, self, fp)
163409a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       7b                          @ resume
163412ff04ab635eeba79c2dad82850c34188abcdfe62Andy McFadden
163426ed1a0f396a1857c31b486d3e93ee2dbeb49a6cdAndy McFadden.LstackOverflow:    @ r0=methodToCall
163436ed1a0f396a1857c31b486d3e93ee2dbeb49a6cdAndy McFadden    mov     r1, r0                      @ r1<- methodToCall
163449f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ r0<- self
16345a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmHandleStackOverflow
16346a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
16347a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#ifdef ASSIST_DEBUGGER
16348a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .fnend
16349b387fe1b970a216c09d2abc98c893ff1fff3e512Andy McFadden    .size   dalvik_mterp, .-dalvik_mterp
16350a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#endif
16351a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16352a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16353a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
16354a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Common code for method invocation, calling through "glue code".
16355a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
16356a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * TODO: now that we have range and non-range invoke handlers, this
16357a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *       needs to be split into two.  Maybe just create entry points
16358a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *       that set r9 and jump here?
16359a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *
16360a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * On entry:
16361a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *  r0 is "Method* methodToCall", the method we're trying to call
16362a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     *  r9 is "bool methodCallRange", indicating if this is a /range variant
16363a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
16364a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     .if    0
16365a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LinvokeOld:
16366a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     sp, sp, #8                  @ space for args + pad
16367a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH(ip, 2)                        @ ip<- FEDC or CCCC
16368a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, r0                      @ A2<- methodToCall
163699f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ A0<- self
163709f601a917c8878204482c37aec7005054b6776fabuzbee    SAVE_PC_FP_TO_SELF()                @ export state to "self"
16371a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r9                      @ A1<- methodCallRange
16372a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, rINST, lsr #8           @ A3<- AA
16373a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     ip, [sp, #0]                @ A4<- ip
16374a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmMterp_invokeMethod       @ call the C invokeMethod
16375a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     sp, sp, #8                  @ remove arg area
16376a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_resumeAfterGlueCall  @ continue to next instruction
16377a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
16378a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16379a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16380a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16381a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16382a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Common code for handling a return instruction.
16383a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
16384a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * This does not return.
16385a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16386a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_returnFromMethod:
16387a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LreturnNew:
16388389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    lr, [rSELF, #offThread_subMode]
1638918fba346582c08d81aa96d9508c0e935bad5f36fbuzbee    SAVEAREA_FROM_FP(r0, rFP)
1639018fba346582c08d81aa96d9508c0e935bad5f36fbuzbee    ldr     r9, [r0, #offStackSaveArea_savedPc] @ r9 = saveArea->savedPc
163919a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     lr, #0                      @ any special subMode handling needed?
163929a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     19f
163939a3147c7412f4794434b4c2604aa2ba784867774buzbee14:
16394a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     rFP, [r0, #offStackSaveArea_prevFrame] @ fp = saveArea->prevFrame
16395a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [rFP, #(offStackSaveArea_method - sizeofStackSaveArea)]
16396a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden                                        @ r2<- method we're returning to
16397a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r2, #0                      @ is this a break frame?
163988c9ac9ab0ab6fd75b73cb0d99005da3aa90c167cBen Cheng#if defined(WORKAROUND_CORTEX_A9_745320)
163998c9ac9ab0ab6fd75b73cb0d99005da3aa90c167cBen Cheng    /* Don't use conditional loads if the HW defect exists */
164009a3147c7412f4794434b4c2604aa2ba784867774buzbee    beq     15f
164018c9ac9ab0ab6fd75b73cb0d99005da3aa90c167cBen Cheng    ldr     r10, [r2, #offMethod_clazz] @ r10<- method->clazz
164029a3147c7412f4794434b4c2604aa2ba784867774buzbee15:
164038c9ac9ab0ab6fd75b73cb0d99005da3aa90c167cBen Cheng#else
16404a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldrne   r10, [r2, #offMethod_clazz] @ r10<- method->clazz
164058c9ac9ab0ab6fd75b73cb0d99005da3aa90c167cBen Cheng#endif
16406a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     common_gotoBail             @ break frame, bail out completely
16407a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
164089a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
16409a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    PREFETCH_ADVANCE_INST(rINST, r9, 3) @ advance r9, update new rINST
164109f601a917c8878204482c37aec7005054b6776fabuzbee    str     r2, [rSELF, #offThread_method]@ self->method = newSave->method
16411a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r10, #offClassObject_pDvmDex]   @ r1<- method->clazz->pDvmDex
1641230bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    str     rFP, [rSELF, #offThread_curFrame]  @ curFrame = fp
16413ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#if defined(WITH_JIT)
164147a0bcd0de6c4da6499a088a18d1750e51204c2a6Ben Cheng    ldr     r10, [r0, #offStackSaveArea_returnAddr] @ r10 = saveArea->returnAddr
16415ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    mov     rPC, r9                     @ publish new rPC
164169f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [rSELF, #offThread_methodClassDex]
164179f601a917c8878204482c37aec7005054b6776fabuzbee    str     r10, [rSELF, #offThread_inJitCodeCache]  @ may return to JIT'ed land
164187a0bcd0de6c4da6499a088a18d1750e51204c2a6Ben Cheng    cmp     r10, #0                      @ caller is compiled code
164197a0bcd0de6c4da6499a088a18d1750e51204c2a6Ben Cheng    blxne   r10
16420ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
16421ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng    GOTO_OPCODE(ip)                     @ jump to next instruction
16422ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#else
16423a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
16424a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     rPC, r9                     @ publish new rPC
164259f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [rSELF, #offThread_methodClassDex]
16426a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
16427ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng#endif
16428a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
164299a3147c7412f4794434b4c2604aa2ba784867774buzbee19:
164309a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Handle special actions
164319a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ On entry, r0: StackSaveArea
1643299e3e6e72e3471eb85fc2e405866392b01c080febuzbee    ldr     r1, [r0, #offStackSaveArea_prevFrame]  @ r2<- prevFP
1643399e3e6e72e3471eb85fc2e405866392b01c080febuzbee    str     rPC, [rSELF, #offThread_pc] @ update interpSave.pc
1643430bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    str     r1, [rSELF, #offThread_curFrame]   @ update interpSave.curFrame
164359a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r0, rSELF
1643699e3e6e72e3471eb85fc2e405866392b01c080febuzbee    bl      dvmReportReturn             @ (self)
164379a3147c7412f4794434b4c2604aa2ba784867774buzbee    SAVEAREA_FROM_FP(r0, rFP)           @ restore StackSaveArea
164389a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       14b                         @ continue
164399a3147c7412f4794434b4c2604aa2ba784867774buzbee
16440a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
16441a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Return handling, calls through "glue code".
16442a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
16443a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     .if    0
16444a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LreturnOld:
164459f601a917c8878204482c37aec7005054b6776fabuzbee    SAVE_PC_FP_TO_SELF()                @ export state
164469f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ arg to function
16447a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmMterp_returnFromMethod
16448a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_resumeAfterGlueCall
16449a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
16450a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16451a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16452a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16453a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Somebody has thrown an exception.  Handle it.
16454a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
16455a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * If the exception processing code returns to us (instead of falling
16456a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * out of the interpreter), continue with whatever the next instruction
16457a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * now happens to be.
16458a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
16459a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * This does not return.
16460a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16461ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben Cheng     .global dvmMterpCommonExceptionThrown
16462ba4fc8bfc1bccae048403bd1cea3b869dca61dd7Ben ChengdvmMterpCommonExceptionThrown:
16463a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_exceptionThrown:
16464a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LexceptionNew:
164659a3147c7412f4794434b4c2604aa2ba784867774buzbee
164669a3147c7412f4794434b4c2604aa2ba784867774buzbee    EXPORT_PC()
164679a3147c7412f4794434b4c2604aa2ba784867774buzbee
164689a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r0, rSELF
164699a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      dvmCheckSuspendPending
16470a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
164719f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r9, [rSELF, #offThread_exception] @ r9<- self->exception
164729f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r1, rSELF                   @ r1<- self
16473a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r9                      @ r0<- exception
16474a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmAddTrackedAlloc          @ don't let the exception be GCed
16475389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    r2, [rSELF, #offThread_subMode]  @ get subMode flags
16476a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, #0                      @ r3<- NULL
164779f601a917c8878204482c37aec7005054b6776fabuzbee    str     r3, [rSELF, #offThread_exception] @ self->exception = NULL
16478a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
164799a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Special subMode?
164809a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r2, #0                      @ any special subMode handling needed?
164819a3147c7412f4794434b4c2604aa2ba784867774buzbee    bne     7f                          @ go if so
164829a3147c7412f4794434b4c2604aa2ba784867774buzbee8:
16483a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* set up args and a local for "&fp" */
16484a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* (str sp, [sp, #-4]!  would be perfect here, but is discouraged) */
16485a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     rFP, [sp, #-4]!             @ *--sp = fp
16486a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     ip, sp                      @ ip<- &fp
16487a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, #0                      @ r3<- false
16488a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     ip, [sp, #-4]!              @ *--sp = &fp
164899f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r1, [rSELF, #offThread_method] @ r1<- self->method
164909f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ r0<- self
16491a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r1, #offMethod_insns]  @ r1<- method->insns
16492389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    lr, [rSELF, #offThread_subMode]  @ lr<- subMode flags
16493a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, r9                      @ r2<- exception
16494a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     r1, rPC, r1                 @ r1<- pc - method->insns
16495a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r1, asr #1              @ r1<- offset in code units
16496a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16497a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* call, r0 gets catchRelPc (a code-unit offset) */
16498a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmFindCatchBlock           @ call(self, relPc, exc, scan?, &fp)
16499a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16500a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* fix earlier stack overflow if necessary; may trash rFP */
165019f601a917c8878204482c37aec7005054b6776fabuzbee    ldrb    r1, [rSELF, #offThread_stackOverflowed]
16502a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ did we overflow earlier?
16503a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    beq     1f                          @ no, skip ahead
16504a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     rFP, r0                     @ save relPc result in rFP
165059f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ r0<- self
165064fbba1f95b3e27bdc5f5572bb0420b5f928aa54eAndy McFadden    mov     r1, r9                      @ r1<- exception
16507a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmCleanupStackOverflow     @ call(self)
16508a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, rFP                     @ restore result
16509a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden1:
16510a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16511a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* update frame pointer and check result from dvmFindCatchBlock */
16512a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     rFP, [sp, #4]               @ retrieve the updated rFP
16513a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r0, #0                      @ is catchRelPc < 0?
16514a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     sp, sp, #8                  @ restore stack
16515a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bmi     .LnotCaughtLocally
16516a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
1651730bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    /* adjust locals to match self->interpSave.curFrame and updated PC */
16518a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SAVEAREA_FROM_FP(r1, rFP)           @ r1<- new save area
16519a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r1, #offStackSaveArea_method] @ r1<- new method
165209f601a917c8878204482c37aec7005054b6776fabuzbee    str     r1, [rSELF, #offThread_method]  @ self->method = new method
16521a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r1, #offMethod_clazz]      @ r2<- method->clazz
16522a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r1, #offMethod_insns]      @ r3<- method->insns
16523a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, [r2, #offClassObject_pDvmDex] @ r2<- method->clazz->pDvmDex
16524a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    add     rPC, r3, r0, asl #1             @ rPC<- method->insns + catchRelPc
165259f601a917c8878204482c37aec7005054b6776fabuzbee    str     r2, [rSELF, #offThread_methodClassDex] @ self->pDvmDex = meth...
16526a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16527a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* release the tracked alloc on the exception */
16528a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r9                      @ r0<- exception
165299f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r1, rSELF                   @ r1<- self
16530a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmReleaseTrackedAlloc      @ release the exception
16531a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16532a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* restore the exception if the handler wants it */
165339a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr    rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh rIBASE
16534a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_INST()                        @ load rINST from rPC
16535a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
16536a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     ip, #OP_MOVE_EXCEPTION      @ is it "move-exception"?
165379f601a917c8878204482c37aec7005054b6776fabuzbee    streq   r9, [rSELF, #offThread_exception] @ yes, restore the exception
16538a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
16539a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
165409a3147c7412f4794434b4c2604aa2ba784867774buzbee    @ Manage debugger bookkeeping
165419a3147c7412f4794434b4c2604aa2ba784867774buzbee7:
1654299e3e6e72e3471eb85fc2e405866392b01c080febuzbee    str     rPC, [rSELF, #offThread_pc]     @ update interpSave.pc
1654330bc0d46ae730d78c42c39cfa56a59ba3025380bbuzbee    str     rFP, [rSELF, #offThread_curFrame]     @ update interpSave.curFrame
165449a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r0, rSELF                       @ arg0<- self
1654599e3e6e72e3471eb85fc2e405866392b01c080febuzbee    mov     r1, r9                          @ arg1<- exception
1654699e3e6e72e3471eb85fc2e405866392b01c080febuzbee    bl      dvmReportExceptionThrow         @ (self, exception)
165479a3147c7412f4794434b4c2604aa2ba784867774buzbee    b       8b                              @ resume with normal handling
165489a3147c7412f4794434b4c2604aa2ba784867774buzbee
165499f601a917c8878204482c37aec7005054b6776fabuzbee.LnotCaughtLocally: @ r9=exception
16550a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* fix stack overflow if necessary */
165519f601a917c8878204482c37aec7005054b6776fabuzbee    ldrb    r1, [rSELF, #offThread_stackOverflowed]
16552a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    cmp     r1, #0                      @ did we overflow earlier?
165539f601a917c8878204482c37aec7005054b6776fabuzbee    movne   r0, rSELF                   @ if yes: r0<- self
165544fbba1f95b3e27bdc5f5572bb0420b5f928aa54eAndy McFadden    movne   r1, r9                      @ if yes: r1<- exception
16555a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    blne    dvmCleanupStackOverflow     @ if yes: call(self)
16556a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16557a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ may want to show "not caught locally" debug messages here
16558a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#if DVM_SHOW_EXCEPTION >= 2
16559a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* call __android_log_print(prio, tag, format, ...) */
16560a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /* "Exception %s from %s:%d not caught locally" */
16561a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ dvmLineNumFromPC(method, pc - method->insns)
165629f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_method]
16563a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, [r0, #offMethod_insns]
16564a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    sub     r1, rPC, r1
16565a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    asr     r1, r1, #1
16566a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmLineNumFromPC
16567a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r0, [sp, #-4]!
16568a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ dvmGetMethodSourceFile(method)
165699f601a917c8878204482c37aec7005054b6776fabuzbee    ldr     r0, [rSELF, #offThread_method]
16570a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmGetMethodSourceFile
16571a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    str     r0, [sp, #-4]!
16572a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @ exception->clazz->descriptor
16573a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r9, #offObject_clazz]
16574a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r3, [r3, #offClassObject_descriptor]
16575a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    @
16576a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r2, strExceptionNotCaughtLocally
165775dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r2, pc
16578a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r1, strLogTag
165795dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel1:  add     r1, pc
16580a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, #3                      @ LOG_DEBUG
16581a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      __android_log_print
16582a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden#endif
165839f601a917c8878204482c37aec7005054b6776fabuzbee    str     r9, [rSELF, #offThread_exception] @ restore exception
16584a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r0, r9                      @ r0<- exception
165859f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r1, rSELF                   @ r1<- self
16586a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmReleaseTrackedAlloc      @ release the exception
16587a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_gotoBail             @ bail out
16588a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
165895dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrExceptionNotCaughtLocally:
165905dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrExceptionNotCaughtLocally,0b)
165915dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrLogTag:
165925dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrLogTag,1b)
16593a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16594a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
16595a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Exception handling, calls through "glue code".
16596a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
16597a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     0
16598a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LexceptionOld:
165999f601a917c8878204482c37aec7005054b6776fabuzbee    SAVE_PC_FP_TO_SELF()                @ export state
166009f601a917c8878204482c37aec7005054b6776fabuzbee    mov     r0, rSELF                   @ arg to function
16601a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmMterp_exceptionThrown
16602a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_resumeAfterGlueCall
16603a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
16604a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
166059a3147c7412f4794434b4c2604aa2ba784867774buzbee#if defined(WITH_JIT)
166069a3147c7412f4794434b4c2604aa2ba784867774buzbee    /*
166079a3147c7412f4794434b4c2604aa2ba784867774buzbee     * If the JIT is actively building a trace we need to make sure
166089a3147c7412f4794434b4c2604aa2ba784867774buzbee     * that the field is fully resolved before including the current
166099a3147c7412f4794434b4c2604aa2ba784867774buzbee     * instruction.
166109a3147c7412f4794434b4c2604aa2ba784867774buzbee     *
166119a3147c7412f4794434b4c2604aa2ba784867774buzbee     * On entry:
166129a3147c7412f4794434b4c2604aa2ba784867774buzbee     *     r10: &dvmDex->pResFields[field]
166139a3147c7412f4794434b4c2604aa2ba784867774buzbee     *     r0:  field pointer (must preserve)
166149a3147c7412f4794434b4c2604aa2ba784867774buzbee     */
166159a3147c7412f4794434b4c2604aa2ba784867774buzbeecommon_verifyField:
16616389e258a5b9b2afb7bfaee3344c615d3310fae4ebuzbee    ldrh    r3, [rSELF, #offThread_subMode]  @ r3 <- submode byte
166179a3147c7412f4794434b4c2604aa2ba784867774buzbee    ands    r3, #kSubModeJitTraceBuild
166189a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxeq    lr                          @ Not building trace, continue
166199a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     r1, [r10]                   @ r1<- reload resolved StaticField ptr
166209a3147c7412f4794434b4c2604aa2ba784867774buzbee    cmp     r1, #0                      @ resolution complete?
166219a3147c7412f4794434b4c2604aa2ba784867774buzbee    bxne    lr                          @ yes, continue
166229a3147c7412f4794434b4c2604aa2ba784867774buzbee    stmfd   sp!, {r0-r2,lr}             @ save regs
166239a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r0, rSELF
166249a3147c7412f4794434b4c2604aa2ba784867774buzbee    mov     r1, rPC
166259a3147c7412f4794434b4c2604aa2ba784867774buzbee    bl      dvmJitEndTraceSelect        @ (self,pc) end trace before this inst
166269a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldmfd   sp!, {r0-r2, lr}
166279a3147c7412f4794434b4c2604aa2ba784867774buzbee    bx      lr                          @ return
166289a3147c7412f4794434b4c2604aa2ba784867774buzbee#endif
16629a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16630a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16631a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * After returning from a "glued" function, pull out the updated
16632a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * values and start executing at the next instruction.
16633a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16634a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_resumeAfterGlueCall:
166359f601a917c8878204482c37aec7005054b6776fabuzbee    LOAD_PC_FP_FROM_SELF()              @ pull rPC and rFP out of thread
166369a3147c7412f4794434b4c2604aa2ba784867774buzbee    ldr     rIBASE, [rSELF, #offThread_curHandlerTable]  @ refresh
16637a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    FETCH_INST()                        @ load rINST from rPC
16638a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
16639a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    GOTO_OPCODE(ip)                     @ jump to next instruction
16640a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16641a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16642d88756df5b4dbc6fd450afd0019a5f64ebe4432dElliott Hughes * Invalid array index. Note that our calling convention is strange; we use r1
16643d88756df5b4dbc6fd450afd0019a5f64ebe4432dElliott Hughes * and r3 because those just happen to be the registers all our callers are
1664447f58250c5177adba475b0b11a36151ac0ce9ab9Dan Bornstein * using. We move r3 before calling the C function, but r1 happens to match.
16645d88756df5b4dbc6fd450afd0019a5f64ebe4432dElliott Hughes * r1: index
16646d88756df5b4dbc6fd450afd0019a5f64ebe4432dElliott Hughes * r3: size
16647a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16648a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_errArrayIndex:
16649a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()
1665047f58250c5177adba475b0b11a36151ac0ce9ab9Dan Bornstein    mov     r0, r3
1665174501e600dcb5634aa26aee0a3f57f2b45b213f2Dan Bornstein    bl      dvmThrowArrayIndexOutOfBoundsException
16652a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
16653a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16654a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16655a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Integer divide or mod by zero.
16656a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16657a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_errDivideByZero:
16658a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()
1665998f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee    ldr     r0, strDivideByZero
166605dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r0, pc
1666198f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee    bl      dvmThrowArithmeticException
16662a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
16663a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
166645dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrDivideByZero:
166655dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrDivideByZero,0b)
166665dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel
16667a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16668a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Attempt to allocate an array with a negative size.
166698cb0d098d79af61546e275f633325794f4587602buzbee * On entry: length in r1
16670a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16671a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_errNegativeArraySize:
16672a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()
166738cb0d098d79af61546e275f633325794f4587602buzbee    mov     r0, r1                                @ arg0 <- len
166748cb0d098d79af61546e275f633325794f4587602buzbee    bl      dvmThrowNegativeArraySizeException    @ (len)
16675a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
16676a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16677a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16678a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Invocation of a non-existent method.
1667998f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee * On entry: method name in r1
16680a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16681a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_errNoSuchMethod:
16682a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()
1668398f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee    mov     r0, r1
1668498f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee    bl      dvmThrowNoSuchMethodError
16685a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
16686a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16687a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16688a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * We encountered a null object when we weren't expecting one.  We
16689a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * export the PC, throw a NullPointerException, and goto the exception
16690a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * processing code.
16691a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16692a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_errNullObject:
16693a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    EXPORT_PC()
1669498f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee    mov     r0, #0
1669598f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee    bl      dvmThrowNullPointerException
16696a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    b       common_exceptionThrown
16697a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16698a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16699a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * For debugging, cause an immediate fault.  The source address will
16700a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * be in lr (use a bl instruction to jump here).
16701a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16702a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_abort:
16703a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     pc, .LdeadFood
16704a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LdeadFood:
16705a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .word   0xdeadf00d
16706a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16707a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16708a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Spit out a "we were here", preserving all registers.  (The attempt
16709a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * to save ip won't work, but we need to save an even number of
16710a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * registers for EABI 64-bit stack alignment.)
16711a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16712a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .macro  SQUEAK num
16713a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_squeak\num:
16714a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0, r1, r2, r3, ip, lr}
167155dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    ldr     r0, strSqueak\num
167165dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r0, pc
16717a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, #\num
16718a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      printf
16719a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0, r1, r2, r3, ip, lr}
16720a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bx      lr
167215dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel
167225dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrSqueak\num:
167235dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrSqueak,0b)
16724a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endm
16725a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16726a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SQUEAK  0
16727a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SQUEAK  1
16728a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SQUEAK  2
16729a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SQUEAK  3
16730a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SQUEAK  4
16731a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    SQUEAK  5
16732a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16733a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16734a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Spit out the number in r0, preserving registers.
16735a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16736a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_printNum:
16737a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0, r1, r2, r3, ip, lr}
16738a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r0
16739a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, strSqueak
167405dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r0, pc
16741a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      printf
16742a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0, r1, r2, r3, ip, lr}
16743a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bx      lr
16744a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
167455dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrSqueak:
167465dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrSqueak,0b)
167475dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel
16748a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16749a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Print a newline, preserving registers.
16750a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16751a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_printNewline:
16752a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0, r1, r2, r3, ip, lr}
16753a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, strNewline
167545dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r0, pc
16755a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      printf
16756a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0, r1, r2, r3, ip, lr}
16757a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bx      lr
16758a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
167595dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrNewline:
167605dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrNewline,0b)
167615dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel
16762a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    /*
16763a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     * Print the 32-bit quantity in r0 as a hex value, preserving registers.
16764a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden     */
16765a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_printHex:
16766a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0, r1, r2, r3, ip, lr}
16767a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r1, r0
16768a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, strPrintHex
167695dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r0, pc
16770a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      printf
16771a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0, r1, r2, r3, ip, lr}
16772a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bx      lr
16773a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
167745dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrPrintHex:
167755dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrPrintHex,0b)
167765dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel
16777a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16778a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Print the 64-bit quantity in r0-r1, preserving registers.
16779a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16780a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_printLong:
16781a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0, r1, r2, r3, ip, lr}
16782a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r3, r1
16783a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    mov     r2, r0
16784a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldr     r0, strPrintLong
167855dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel0:  add     r0, pc
16786a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      printf
16787a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0, r1, r2, r3, ip, lr}
16788a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bx      lr
16789a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
167905dfcc78af479937ba8dafceefd9b1931a88dfaafArd BiesheuvelstrPrintLong:
167915dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel    .word   PCREL_REF(.LstrPrintLong,0b)
167925dfcc78af479937ba8dafceefd9b1931a88dfaafArd Biesheuvel
16793a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16794a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Print full method info.  Pass the Method* in r0.  Preserves regs.
16795a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16796a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_printMethod:
16797a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0, r1, r2, r3, ip, lr}
16798a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmMterpPrintMethod
16799a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0, r1, r2, r3, ip, lr}
16800a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bx      lr
16801a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16802a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16803a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Call a C helper function that dumps regs and possibly some
16804a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * additional info.  Requires the C function to be compiled in.
16805a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16806a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .if     0
16807a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFaddencommon_dumpRegs:
16808a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    stmfd   sp!, {r0, r1, r2, r3, ip, lr}
16809a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bl      dvmMterpDumpArmRegs
16810a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    ldmfd   sp!, {r0, r1, r2, r3, ip, lr}
16811a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    bx      lr
16812a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .endif
16813a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16814d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden#if 0
16815d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden/*
16816d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden * Experiment on VFP mode.
16817d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden *
16818d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden * uint32_t setFPSCR(uint32_t val, uint32_t mask)
16819d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden *
16820d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden * Updates the bits specified by "mask", setting them to the values in "val".
16821d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden */
16822d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFaddensetFPSCR:
16823d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    and     r0, r0, r1                  @ make sure no stray bits are set
16824d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    fmrx    r2, fpscr                   @ get VFP reg
16825d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    mvn     r1, r1                      @ bit-invert mask
16826d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    and     r2, r2, r1                  @ clear masked bits
16827d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    orr     r2, r2, r0                  @ set specified bits
16828d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    fmxr    fpscr, r2                   @ set VFP reg
16829d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    mov     r0, r2                      @ return new value
16830d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    bx      lr
16831d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden
16832d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    .align  2
16833d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    .global dvmConfigureFP
16834d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    .type   dvmConfigureFP, %function
16835d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFaddendvmConfigureFP:
16836d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    stmfd   sp!, {ip, lr}
16837d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    /* 0x03000000 sets DN/FZ */
16838d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    /* 0x00009f00 clears the six exception enable flags */
16839d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    bl      common_squeak0
16840d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    mov     r0, #0x03000000             @ r0<- 0x03000000
16841d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    add     r1, r0, #0x9f00             @ r1<- 0x03009f00
16842d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    bl      setFPSCR
16843d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden    ldmfd   sp!, {ip, pc}
16844d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden#endif
16845d8125c62642bd71df7485a85f787a1c6e2124c48Andy McFadden
16846a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16847a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16848a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden/*
16849a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * Zero-terminated ASCII string data.
16850a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden *
16851a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * On ARM we have two choices: do like gcc does, and LDR from a .word
16852a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * with the address, or use an ADR pseudo-op to get the address
16853a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * directly.  ADR saves 4 bytes and an indirection, but it's using a
16854a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * PC-relative addressing mode and hence has a limited range, which
16855a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden * makes it not work well with mergeable string sections.
16856a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden */
16857a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .section .rodata.str1.4,"aMS",%progbits,1
16858a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16859a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrBadEntryPoint:
16860a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .asciz  "Bad entry point %d\n"
16861a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrFilledNewArrayNotImpl:
16862a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .asciz  "filled-new-array only implemented for objects and 'int'"
1686398f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee.LstrDivideByZero:
1686498f3eb12bf2a33c49712e093d5cc2aa713a93aa5buzbee    .asciz  "divide by zero"
16865a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrLogTag:
16866a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .asciz  "mterp"
16867a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrExceptionNotCaughtLocally:
16868a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .asciz  "Exception %s from %s:%d not caught locally\n"
16869a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16870a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrNewline:
16871a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .asciz  "\n"
16872a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrSqueak:
16873a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .asciz  "<%d>"
16874a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrPrintHex:
16875291c84f60853d30e1c0d79dd08c5e5164f588e26Dan Bornstein    .asciz  "<%#x>"
16876a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden.LstrPrintLong:
16877a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden    .asciz  "<%lld>"
16878a80b76553c2b9f33c4063ae8c69c5362d961de81Andy McFadden
16879