blob: aadbf204541fca76762e222a5f358d192d79cdfc [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001/*
2 * This file was generated automatically by gen-mterp.py for 'mips'.
3 *
4 * --> DO NOT EDIT <--
5 */
6
7/* File: mips/header.S */
8/*
9 * Copyright (C) 2016 The Android Open Source Project
10 *
11 * Licensed under the Apache License, Version 2.0 (the "License");
12 * you may not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
14 *
15 * http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
22 */
23
24/*
25 Art assembly interpreter notes:
26
27 First validate assembly code by implementing ExecuteXXXImpl() style body (doesn't
28 handle invoke, allows higher-level code to create frame & shadow frame.
29
30 Once that's working, support direct entry code & eliminate shadow frame (and
31 excess locals allocation.
32
33 Some (hopefully) temporary ugliness. We'll treat rFP as pointing to the
34 base of the vreg array within the shadow frame. Access the other fields,
35 dex_pc_, method_ and number_of_vregs_ via negative offsets. For now, we'll continue
36 the shadow frame mechanism of double-storing object references - via rFP &
37 number_of_vregs_.
38
39 */
40
41#include "asm_support.h"
42
43#if (__mips==32) && (__mips_isa_rev>=2)
44#define MIPS32REVGE2 /* mips32r2 and greater */
45#if (__mips==32) && (__mips_isa_rev>=5)
46#define FPU64 /* 64 bit FPU */
47#if (__mips==32) && (__mips_isa_rev>=6)
48#define MIPS32REVGE6 /* mips32r6 and greater */
49#endif
50#endif
51#endif
52
53/* MIPS definitions and declarations
54
55 reg nick purpose
56 s0 rPC interpreted program counter, used for fetching instructions
57 s1 rFP interpreted frame pointer, used for accessing locals and args
58 s2 rSELF self (Thread) pointer
59 s3 rIBASE interpreted instruction base pointer, used for computed goto
60 s4 rINST first 16-bit code unit of current instruction
Douglas Leung020b18a2016-06-03 18:05:35 -070061 s5 rOBJ object pointer
Douglas Leung200f0402016-02-25 20:05:47 -080062 s6 rREFS base of object references in shadow frame (ideally, we'll get rid of this later).
Douglas Leung020b18a2016-06-03 18:05:35 -070063 s7 rTEMP used as temp storage that can survive a function call
64 s8 rPROFILE branch profiling countdown
65
Douglas Leung200f0402016-02-25 20:05:47 -080066*/
67
68/* single-purpose registers, given names for clarity */
69#define rPC s0
70#define rFP s1
71#define rSELF s2
72#define rIBASE s3
73#define rINST s4
74#define rOBJ s5
75#define rREFS s6
76#define rTEMP s7
Douglas Leung020b18a2016-06-03 18:05:35 -070077#define rPROFILE s8
Douglas Leung200f0402016-02-25 20:05:47 -080078
79#define rARG0 a0
80#define rARG1 a1
81#define rARG2 a2
82#define rARG3 a3
83#define rRESULT0 v0
84#define rRESULT1 v1
85
86/* GP register definitions */
87#define zero $0 /* always zero */
88#define AT $at /* assembler temp */
89#define v0 $2 /* return value */
90#define v1 $3
91#define a0 $4 /* argument registers */
92#define a1 $5
93#define a2 $6
94#define a3 $7
95#define t0 $8 /* temp registers (not saved across subroutine calls) */
96#define t1 $9
97#define t2 $10
98#define t3 $11
99#define t4 $12
100#define t5 $13
101#define t6 $14
102#define t7 $15
103#define ta0 $12 /* alias */
104#define ta1 $13
105#define ta2 $14
106#define ta3 $15
107#define s0 $16 /* saved across subroutine calls (callee saved) */
108#define s1 $17
109#define s2 $18
110#define s3 $19
111#define s4 $20
112#define s5 $21
113#define s6 $22
114#define s7 $23
115#define t8 $24 /* two more temp registers */
116#define t9 $25
117#define k0 $26 /* kernel temporary */
118#define k1 $27
119#define gp $28 /* global pointer */
120#define sp $29 /* stack pointer */
121#define s8 $30 /* one more callee saved */
122#define ra $31 /* return address */
123
124/* FP register definitions */
125#define fv0 $f0
126#define fv0f $f1
127#define fv1 $f2
128#define fv1f $f3
129#define fa0 $f12
130#define fa0f $f13
131#define fa1 $f14
132#define fa1f $f15
133#define ft0 $f4
134#define ft0f $f5
135#define ft1 $f6
136#define ft1f $f7
137#define ft2 $f8
138#define ft2f $f9
139#define ft3 $f10
140#define ft3f $f11
141#define ft4 $f16
142#define ft4f $f17
143#define ft5 $f18
144#define ft5f $f19
145#define fs0 $f20
146#define fs0f $f21
147#define fs1 $f22
148#define fs1f $f23
149#define fs2 $f24
150#define fs2f $f25
151#define fs3 $f26
152#define fs3f $f27
153#define fs4 $f28
154#define fs4f $f29
155#define fs5 $f30
156#define fs5f $f31
157
158#ifndef MIPS32REVGE6
159#define fcc0 $fcc0
160#define fcc1 $fcc1
161#endif
162
163/*
164 * Instead of holding a pointer to the shadow frame, we keep rFP at the base of the vregs. So,
165 * to access other shadow frame fields, we need to use a backwards offset. Define those here.
166 */
167#define OFF_FP(a) (a - SHADOWFRAME_VREGS_OFFSET)
168#define OFF_FP_NUMBER_OF_VREGS OFF_FP(SHADOWFRAME_NUMBER_OF_VREGS_OFFSET)
169#define OFF_FP_DEX_PC OFF_FP(SHADOWFRAME_DEX_PC_OFFSET)
170#define OFF_FP_LINK OFF_FP(SHADOWFRAME_LINK_OFFSET)
171#define OFF_FP_METHOD OFF_FP(SHADOWFRAME_METHOD_OFFSET)
172#define OFF_FP_RESULT_REGISTER OFF_FP(SHADOWFRAME_RESULT_REGISTER_OFFSET)
173#define OFF_FP_DEX_PC_PTR OFF_FP(SHADOWFRAME_DEX_PC_PTR_OFFSET)
174#define OFF_FP_CODE_ITEM OFF_FP(SHADOWFRAME_CODE_ITEM_OFFSET)
Douglas Leung020b18a2016-06-03 18:05:35 -0700175#define OFF_FP_SHADOWFRAME OFF_FP(0)
Douglas Leung200f0402016-02-25 20:05:47 -0800176
177#define MTERP_PROFILE_BRANCHES 1
178#define MTERP_LOGGING 0
179
180/*
181 * "export" the PC to dex_pc field in the shadow frame, f/b/o future exception objects. Must
182 * be done *before* something throws.
183 *
184 * It's okay to do this more than once.
185 *
186 * NOTE: the fast interpreter keeps track of dex pc as a direct pointer to the mapped
187 * dex byte codes. However, the rest of the runtime expects dex pc to be an instruction
188 * offset into the code_items_[] array. For effiency, we will "export" the
189 * current dex pc as a direct pointer using the EXPORT_PC macro, and rely on GetDexPC
190 * to convert to a dex pc when needed.
191 */
192#define EXPORT_PC() \
193 sw rPC, OFF_FP_DEX_PC_PTR(rFP)
194
195#define EXPORT_DEX_PC(tmp) \
196 lw tmp, OFF_FP_CODE_ITEM(rFP) \
197 sw rPC, OFF_FP_DEX_PC_PTR(rFP) \
198 addu tmp, CODEITEM_INSNS_OFFSET \
199 subu tmp, rPC, tmp \
200 sra tmp, tmp, 1 \
201 sw tmp, OFF_FP_DEX_PC(rFP)
202
203/*
204 * Fetch the next instruction from rPC into rINST. Does not advance rPC.
205 */
206#define FETCH_INST() lhu rINST, (rPC)
207
208/*
209 * Fetch the next instruction from the specified offset. Advances rPC
210 * to point to the next instruction. "_count" is in 16-bit code units.
211 *
212 * This must come AFTER anything that can throw an exception, or the
213 * exception catch may miss. (This also implies that it must come after
214 * EXPORT_PC().)
215 */
216#define FETCH_ADVANCE_INST(_count) lhu rINST, ((_count)*2)(rPC); \
217 addu rPC, rPC, ((_count) * 2)
218
219/*
220 * The operation performed here is similar to FETCH_ADVANCE_INST, except the
221 * src and dest registers are parameterized (not hard-wired to rPC and rINST).
222 */
223#define PREFETCH_ADVANCE_INST(_dreg, _sreg, _count) \
224 lhu _dreg, ((_count)*2)(_sreg) ; \
225 addu _sreg, _sreg, (_count)*2
226
227/*
228 * Similar to FETCH_ADVANCE_INST, but does not update rPC. Used to load
229 * rINST ahead of possible exception point. Be sure to manually advance rPC
230 * later.
231 */
232#define PREFETCH_INST(_count) lhu rINST, ((_count)*2)(rPC)
233
234/* Advance rPC by some number of code units. */
235#define ADVANCE(_count) addu rPC, rPC, ((_count) * 2)
236
237/*
238 * Fetch the next instruction from an offset specified by rd. Updates
239 * rPC to point to the next instruction. "rd" must specify the distance
240 * in bytes, *not* 16-bit code units, and may be a signed value.
241 */
242#define FETCH_ADVANCE_INST_RB(rd) addu rPC, rPC, rd; \
243 lhu rINST, (rPC)
244
245/*
246 * Fetch a half-word code unit from an offset past the current PC. The
247 * "_count" value is in 16-bit code units. Does not advance rPC.
248 *
249 * The "_S" variant works the same but treats the value as signed.
250 */
251#define FETCH(rd, _count) lhu rd, ((_count) * 2)(rPC)
252#define FETCH_S(rd, _count) lh rd, ((_count) * 2)(rPC)
253
254/*
255 * Fetch one byte from an offset past the current PC. Pass in the same
256 * "_count" as you would for FETCH, and an additional 0/1 indicating which
257 * byte of the halfword you want (lo/hi).
258 */
259#define FETCH_B(rd, _count, _byte) lbu rd, ((_count) * 2 + _byte)(rPC)
260
261/*
262 * Put the instruction's opcode field into the specified register.
263 */
264#define GET_INST_OPCODE(rd) and rd, rINST, 0xFF
265
266/*
267 * Put the prefetched instruction's opcode field into the specified register.
268 */
269#define GET_PREFETCHED_OPCODE(dreg, sreg) andi dreg, sreg, 255
270
271/*
272 * Begin executing the opcode in rd.
273 */
274#define GOTO_OPCODE(rd) sll rd, rd, 7; \
275 addu rd, rIBASE, rd; \
276 jalr zero, rd
277
278#define GOTO_OPCODE_BASE(_base, rd) sll rd, rd, 7; \
279 addu rd, _base, rd; \
280 jalr zero, rd
281
282/*
283 * Get/set the 32-bit value from a Dalvik register.
284 */
285#define GET_VREG(rd, rix) LOAD_eas2(rd, rFP, rix)
286
287#define GET_VREG_F(rd, rix) EAS2(AT, rFP, rix); \
288 .set noat; l.s rd, (AT); .set at
289
290#define SET_VREG(rd, rix) .set noat; \
291 sll AT, rix, 2; \
292 addu t8, rFP, AT; \
293 sw rd, 0(t8); \
294 addu t8, rREFS, AT; \
295 .set at; \
296 sw zero, 0(t8)
297
298#define SET_VREG64(rlo, rhi, rix) .set noat; \
299 sll AT, rix, 2; \
300 addu t8, rFP, AT; \
301 sw rlo, 0(t8); \
302 sw rhi, 4(t8); \
303 addu t8, rREFS, AT; \
304 .set at; \
305 sw zero, 0(t8); \
306 sw zero, 4(t8)
307
308#ifdef FPU64
309#define SET_VREG64_F(rlo, rhi, rix) .set noat; \
310 sll AT, rix, 2; \
311 addu t8, rREFS, AT; \
312 sw zero, 0(t8); \
313 sw zero, 4(t8); \
314 addu t8, rFP, AT; \
315 mfhc1 AT, rlo; \
316 sw AT, 4(t8); \
317 .set at; \
318 s.s rlo, 0(t8)
319#else
320#define SET_VREG64_F(rlo, rhi, rix) .set noat; \
321 sll AT, rix, 2; \
322 addu t8, rFP, AT; \
323 s.s rlo, 0(t8); \
324 s.s rhi, 4(t8); \
325 addu t8, rREFS, AT; \
326 .set at; \
327 sw zero, 0(t8); \
328 sw zero, 4(t8)
329#endif
330
331#define SET_VREG_OBJECT(rd, rix) .set noat; \
332 sll AT, rix, 2; \
333 addu t8, rFP, AT; \
334 sw rd, 0(t8); \
335 addu t8, rREFS, AT; \
336 .set at; \
337 sw rd, 0(t8)
338
339/* Combination of the SET_VREG and GOTO_OPCODE functions to save 1 instruction */
340#define SET_VREG_GOTO(rd, rix, dst) .set noreorder; \
341 sll dst, dst, 7; \
342 addu dst, rIBASE, dst; \
343 .set noat; \
344 sll AT, rix, 2; \
345 addu t8, rFP, AT; \
346 sw rd, 0(t8); \
347 addu t8, rREFS, AT; \
348 .set at; \
349 jalr zero, dst; \
350 sw zero, 0(t8); \
351 .set reorder
352
353/* Combination of the SET_VREG64 and GOTO_OPCODE functions to save 1 instruction */
354#define SET_VREG64_GOTO(rlo, rhi, rix, dst) .set noreorder; \
355 sll dst, dst, 7; \
356 addu dst, rIBASE, dst; \
357 .set noat; \
358 sll AT, rix, 2; \
359 addu t8, rFP, AT; \
360 sw rlo, 0(t8); \
361 sw rhi, 4(t8); \
362 addu t8, rREFS, AT; \
363 .set at; \
364 sw zero, 0(t8); \
365 jalr zero, dst; \
366 sw zero, 4(t8); \
367 .set reorder
368
369#define SET_VREG_F(rd, rix) .set noat; \
370 sll AT, rix, 2; \
371 addu t8, rFP, AT; \
372 s.s rd, 0(t8); \
373 addu t8, rREFS, AT; \
374 .set at; \
375 sw zero, 0(t8)
376
377#define GET_OPA(rd) srl rd, rINST, 8
378#ifdef MIPS32REVGE2
379#define GET_OPA4(rd) ext rd, rINST, 8, 4
380#else
381#define GET_OPA4(rd) GET_OPA(rd); and rd, 0xf
382#endif
383#define GET_OPB(rd) srl rd, rINST, 12
384
385/*
386 * Form an Effective Address rd = rbase + roff<<n;
387 * Uses reg AT
388 */
389#define EASN(rd, rbase, roff, rshift) .set noat; \
390 sll AT, roff, rshift; \
391 addu rd, rbase, AT; \
392 .set at
393
394#define EAS1(rd, rbase, roff) EASN(rd, rbase, roff, 1)
395#define EAS2(rd, rbase, roff) EASN(rd, rbase, roff, 2)
396#define EAS3(rd, rbase, roff) EASN(rd, rbase, roff, 3)
397#define EAS4(rd, rbase, roff) EASN(rd, rbase, roff, 4)
398
399/*
400 * Form an Effective Shift Right rd = rbase + roff>>n;
401 * Uses reg AT
402 */
403#define ESRN(rd, rbase, roff, rshift) .set noat; \
404 srl AT, roff, rshift; \
405 addu rd, rbase, AT; \
406 .set at
407
408#define LOAD_eas2(rd, rbase, roff) EAS2(AT, rbase, roff); \
409 .set noat; lw rd, 0(AT); .set at
410
411#define STORE_eas2(rd, rbase, roff) EAS2(AT, rbase, roff); \
412 .set noat; sw rd, 0(AT); .set at
413
414#define LOAD_RB_OFF(rd, rbase, off) lw rd, off(rbase)
415#define STORE_RB_OFF(rd, rbase, off) sw rd, off(rbase)
416
417#define STORE64_off(rlo, rhi, rbase, off) sw rlo, off(rbase); \
418 sw rhi, (off+4)(rbase)
419#define LOAD64_off(rlo, rhi, rbase, off) lw rlo, off(rbase); \
420 lw rhi, (off+4)(rbase)
421
422#define STORE64(rlo, rhi, rbase) STORE64_off(rlo, rhi, rbase, 0)
423#define LOAD64(rlo, rhi, rbase) LOAD64_off(rlo, rhi, rbase, 0)
424
425#ifdef FPU64
426#define STORE64_off_F(rlo, rhi, rbase, off) s.s rlo, off(rbase); \
427 .set noat; \
428 mfhc1 AT, rlo; \
429 sw AT, (off+4)(rbase); \
430 .set at
431#define LOAD64_off_F(rlo, rhi, rbase, off) l.s rlo, off(rbase); \
432 .set noat; \
433 lw AT, (off+4)(rbase); \
434 mthc1 AT, rlo; \
435 .set at
436#else
437#define STORE64_off_F(rlo, rhi, rbase, off) s.s rlo, off(rbase); \
438 s.s rhi, (off+4)(rbase)
439#define LOAD64_off_F(rlo, rhi, rbase, off) l.s rlo, off(rbase); \
440 l.s rhi, (off+4)(rbase)
441#endif
442
443#define STORE64_F(rlo, rhi, rbase) STORE64_off_F(rlo, rhi, rbase, 0)
444#define LOAD64_F(rlo, rhi, rbase) LOAD64_off_F(rlo, rhi, rbase, 0)
445
446
447#define LOAD_base_offMirrorArray_length(rd, rbase) LOAD_RB_OFF(rd, rbase, MIRROR_ARRAY_LENGTH_OFFSET)
448
449#define STACK_STORE(rd, off) sw rd, off(sp)
450#define STACK_LOAD(rd, off) lw rd, off(sp)
451#define CREATE_STACK(n) subu sp, sp, n
452#define DELETE_STACK(n) addu sp, sp, n
453
454#define LOAD_ADDR(dest, addr) la dest, addr
455#define LOAD_IMM(dest, imm) li dest, imm
456#define MOVE_REG(dest, src) move dest, src
457#define STACK_SIZE 128
458
459#define STACK_OFFSET_ARG04 16
460#define STACK_OFFSET_ARG05 20
461#define STACK_OFFSET_ARG06 24
462#define STACK_OFFSET_ARG07 28
463#define STACK_OFFSET_GP 84
464
465#define JAL(n) jal n
466#define BAL(n) bal n
467
468/*
469 * FP register usage restrictions:
470 * 1) We don't use the callee save FP registers so we don't have to save them.
471 * 2) We don't use the odd FP registers so we can share code with mips32r6.
472 */
473#define STACK_STORE_FULL() CREATE_STACK(STACK_SIZE); \
474 STACK_STORE(ra, 124); \
475 STACK_STORE(s8, 120); \
476 STACK_STORE(s0, 116); \
477 STACK_STORE(s1, 112); \
478 STACK_STORE(s2, 108); \
479 STACK_STORE(s3, 104); \
480 STACK_STORE(s4, 100); \
481 STACK_STORE(s5, 96); \
482 STACK_STORE(s6, 92); \
483 STACK_STORE(s7, 88);
484
485#define STACK_LOAD_FULL() STACK_LOAD(gp, STACK_OFFSET_GP); \
486 STACK_LOAD(s7, 88); \
487 STACK_LOAD(s6, 92); \
488 STACK_LOAD(s5, 96); \
489 STACK_LOAD(s4, 100); \
490 STACK_LOAD(s3, 104); \
491 STACK_LOAD(s2, 108); \
492 STACK_LOAD(s1, 112); \
493 STACK_LOAD(s0, 116); \
494 STACK_LOAD(s8, 120); \
495 STACK_LOAD(ra, 124); \
496 DELETE_STACK(STACK_SIZE)
497
Douglas Leung020b18a2016-06-03 18:05:35 -0700498#define REFRESH_IBASE() \
499 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF)
500
Douglas Leung200f0402016-02-25 20:05:47 -0800501/* File: mips/entry.S */
502/*
503 * Copyright (C) 2016 The Android Open Source Project
504 *
505 * Licensed under the Apache License, Version 2.0 (the "License");
506 * you may not use this file except in compliance with the License.
507 * You may obtain a copy of the License at
508 *
509 * http://www.apache.org/licenses/LICENSE-2.0
510 *
511 * Unless required by applicable law or agreed to in writing, software
512 * distributed under the License is distributed on an "AS IS" BASIS,
513 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
514 * See the License for the specific language governing permissions and
515 * limitations under the License.
516 */
517/*
518 * Interpreter entry point.
519 */
520
521 .text
522 .align 2
523 .global ExecuteMterpImpl
524 .ent ExecuteMterpImpl
525 .frame sp, STACK_SIZE, ra
526/*
527 * On entry:
528 * a0 Thread* self
529 * a1 code_item
530 * a2 ShadowFrame
531 * a3 JValue* result_register
532 *
533 */
534
535ExecuteMterpImpl:
536 .set noreorder
537 .cpload t9
538 .set reorder
539/* Save to the stack. Frame size = STACK_SIZE */
540 STACK_STORE_FULL()
541/* This directive will make sure all subsequent jal restore gp at a known offset */
542 .cprestore STACK_OFFSET_GP
543
544 /* Remember the return register */
545 sw a3, SHADOWFRAME_RESULT_REGISTER_OFFSET(a2)
546
547 /* Remember the code_item */
548 sw a1, SHADOWFRAME_CODE_ITEM_OFFSET(a2)
549
550 /* set up "named" registers */
551 move rSELF, a0
552 lw a0, SHADOWFRAME_NUMBER_OF_VREGS_OFFSET(a2)
buzbeeace690f2016-03-11 09:51:11 -0800553 addu rFP, a2, SHADOWFRAME_VREGS_OFFSET # point to vregs.
Douglas Leung200f0402016-02-25 20:05:47 -0800554 EAS2(rREFS, rFP, a0) # point to reference array in shadow frame
555 lw a0, SHADOWFRAME_DEX_PC_OFFSET(a2) # Get starting dex_pc
556 addu rPC, a1, CODEITEM_INSNS_OFFSET # Point to base of insns[]
557 EAS1(rPC, rPC, a0) # Create direct pointer to 1st dex opcode
558
559 EXPORT_PC()
560
561 /* Starting ibase */
562 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF)
563
Douglas Leung020b18a2016-06-03 18:05:35 -0700564 /* Set up for backwards branches & osr profiling */
565 lw a0, OFF_FP_METHOD(rFP)
566 addu a1, rFP, OFF_FP_SHADOWFRAME
567 JAL(MterpSetUpHotnessCountdown) # (method, shadow_frame)
568 move rPROFILE, v0 # Starting hotness countdown to rPROFILE
569
Douglas Leung200f0402016-02-25 20:05:47 -0800570 /* start executing the instruction at rPC */
571 FETCH_INST() # load rINST from rPC
572 GET_INST_OPCODE(t0) # extract opcode from rINST
573 GOTO_OPCODE(t0) # jump to next instruction
574 /* NOTE: no fallthrough */
575
576
577 .global artMterpAsmInstructionStart
578 .type artMterpAsmInstructionStart, %function
579artMterpAsmInstructionStart = .L_op_nop
580 .text
581
582/* ------------------------------ */
583 .balign 128
584.L_op_nop: /* 0x00 */
585/* File: mips/op_nop.S */
586 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
587 GET_INST_OPCODE(t0) # extract opcode from rINST
588 GOTO_OPCODE(t0) # jump to next instruction
589
590/* ------------------------------ */
591 .balign 128
592.L_op_move: /* 0x01 */
593/* File: mips/op_move.S */
594 /* for move, move-object, long-to-int */
595 /* op vA, vB */
596 GET_OPB(a1) # a1 <- B from 15:12
597 GET_OPA4(a0) # a0 <- A from 11:8
598 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
599 GET_VREG(a2, a1) # a2 <- fp[B]
600 GET_INST_OPCODE(t0) # t0 <- opcode from rINST
601 .if 0
602 SET_VREG_OBJECT(a2, a0) # fp[A] <- a2
603 .else
604 SET_VREG(a2, a0) # fp[A] <- a2
605 .endif
606 GOTO_OPCODE(t0) # jump to next instruction
607
608/* ------------------------------ */
609 .balign 128
610.L_op_move_from16: /* 0x02 */
611/* File: mips/op_move_from16.S */
612 /* for: move/from16, move-object/from16 */
613 /* op vAA, vBBBB */
614 FETCH(a1, 1) # a1 <- BBBB
615 GET_OPA(a0) # a0 <- AA
616 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
617 GET_VREG(a2, a1) # a2 <- fp[BBBB]
618 GET_INST_OPCODE(t0) # extract opcode from rINST
619 .if 0
620 SET_VREG_OBJECT(a2, a0) # fp[AA] <- a2
621 .else
622 SET_VREG(a2, a0) # fp[AA] <- a2
623 .endif
624 GOTO_OPCODE(t0) # jump to next instruction
625
626/* ------------------------------ */
627 .balign 128
628.L_op_move_16: /* 0x03 */
629/* File: mips/op_move_16.S */
630 /* for: move/16, move-object/16 */
631 /* op vAAAA, vBBBB */
632 FETCH(a1, 2) # a1 <- BBBB
633 FETCH(a0, 1) # a0 <- AAAA
634 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
635 GET_VREG(a2, a1) # a2 <- fp[BBBB]
636 GET_INST_OPCODE(t0) # extract opcode from rINST
637 .if 0
638 SET_VREG_OBJECT(a2, a0) # fp[AAAA] <- a2
639 .else
640 SET_VREG(a2, a0) # fp[AAAA] <- a2
641 .endif
642 GOTO_OPCODE(t0) # jump to next instruction
643
644/* ------------------------------ */
645 .balign 128
646.L_op_move_wide: /* 0x04 */
647/* File: mips/op_move_wide.S */
648 /* move-wide vA, vB */
649 /* NOTE: regs can overlap, e.g. "move v6, v7" or "move v7, v6" */
650 GET_OPA4(a2) # a2 <- A(+)
651 GET_OPB(a3) # a3 <- B
652 EAS2(a3, rFP, a3) # a3 <- &fp[B]
653 LOAD64(a0, a1, a3) # a0/a1 <- fp[B]
654 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
655 SET_VREG64(a0, a1, a2) # fp[A] <- a0/a1
656 GET_INST_OPCODE(t0) # extract opcode from rINST
657 GOTO_OPCODE(t0) # jump to next instruction
658
659/* ------------------------------ */
660 .balign 128
661.L_op_move_wide_from16: /* 0x05 */
662/* File: mips/op_move_wide_from16.S */
663 /* move-wide/from16 vAA, vBBBB */
664 /* NOTE: regs can overlap, e.g. "move v6, v7" or "move v7, v6" */
665 FETCH(a3, 1) # a3 <- BBBB
666 GET_OPA(a2) # a2 <- AA
667 EAS2(a3, rFP, a3) # a3 <- &fp[BBBB]
668 LOAD64(a0, a1, a3) # a0/a1 <- fp[BBBB]
669 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
670 SET_VREG64(a0, a1, a2) # fp[AA] <- a0/a1
671 GET_INST_OPCODE(t0) # extract opcode from rINST
672 GOTO_OPCODE(t0) # jump to next instruction
673
674/* ------------------------------ */
675 .balign 128
676.L_op_move_wide_16: /* 0x06 */
677/* File: mips/op_move_wide_16.S */
678 /* move-wide/16 vAAAA, vBBBB */
679 /* NOTE: regs can overlap, e.g. "move v6, v7" or "move v7, v6" */
680 FETCH(a3, 2) # a3 <- BBBB
681 FETCH(a2, 1) # a2 <- AAAA
682 EAS2(a3, rFP, a3) # a3 <- &fp[BBBB]
683 LOAD64(a0, a1, a3) # a0/a1 <- fp[BBBB]
684 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
685 SET_VREG64(a0, a1, a2) # fp[AAAA] <- a0/a1
686 GET_INST_OPCODE(t0) # extract opcode from rINST
687 GOTO_OPCODE(t0) # jump to next instruction
688
689/* ------------------------------ */
690 .balign 128
691.L_op_move_object: /* 0x07 */
692/* File: mips/op_move_object.S */
693/* File: mips/op_move.S */
694 /* for move, move-object, long-to-int */
695 /* op vA, vB */
696 GET_OPB(a1) # a1 <- B from 15:12
697 GET_OPA4(a0) # a0 <- A from 11:8
698 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
699 GET_VREG(a2, a1) # a2 <- fp[B]
700 GET_INST_OPCODE(t0) # t0 <- opcode from rINST
701 .if 1
702 SET_VREG_OBJECT(a2, a0) # fp[A] <- a2
703 .else
704 SET_VREG(a2, a0) # fp[A] <- a2
705 .endif
706 GOTO_OPCODE(t0) # jump to next instruction
707
708
709/* ------------------------------ */
710 .balign 128
711.L_op_move_object_from16: /* 0x08 */
712/* File: mips/op_move_object_from16.S */
713/* File: mips/op_move_from16.S */
714 /* for: move/from16, move-object/from16 */
715 /* op vAA, vBBBB */
716 FETCH(a1, 1) # a1 <- BBBB
717 GET_OPA(a0) # a0 <- AA
718 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
719 GET_VREG(a2, a1) # a2 <- fp[BBBB]
720 GET_INST_OPCODE(t0) # extract opcode from rINST
721 .if 1
722 SET_VREG_OBJECT(a2, a0) # fp[AA] <- a2
723 .else
724 SET_VREG(a2, a0) # fp[AA] <- a2
725 .endif
726 GOTO_OPCODE(t0) # jump to next instruction
727
728
729/* ------------------------------ */
730 .balign 128
731.L_op_move_object_16: /* 0x09 */
732/* File: mips/op_move_object_16.S */
733/* File: mips/op_move_16.S */
734 /* for: move/16, move-object/16 */
735 /* op vAAAA, vBBBB */
736 FETCH(a1, 2) # a1 <- BBBB
737 FETCH(a0, 1) # a0 <- AAAA
738 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
739 GET_VREG(a2, a1) # a2 <- fp[BBBB]
740 GET_INST_OPCODE(t0) # extract opcode from rINST
741 .if 1
742 SET_VREG_OBJECT(a2, a0) # fp[AAAA] <- a2
743 .else
744 SET_VREG(a2, a0) # fp[AAAA] <- a2
745 .endif
746 GOTO_OPCODE(t0) # jump to next instruction
747
748
749/* ------------------------------ */
750 .balign 128
751.L_op_move_result: /* 0x0a */
752/* File: mips/op_move_result.S */
753 /* for: move-result, move-result-object */
754 /* op vAA */
755 GET_OPA(a2) # a2 <- AA
756 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
757 lw a0, OFF_FP_RESULT_REGISTER(rFP) # get pointer to result JType
758 lw a0, 0(a0) # a0 <- result.i
759 GET_INST_OPCODE(t0) # extract opcode from rINST
760 .if 0
761 SET_VREG_OBJECT(a0, a2) # fp[AA] <- a0
762 .else
763 SET_VREG(a0, a2) # fp[AA] <- a0
764 .endif
765 GOTO_OPCODE(t0) # jump to next instruction
766
767/* ------------------------------ */
768 .balign 128
769.L_op_move_result_wide: /* 0x0b */
770/* File: mips/op_move_result_wide.S */
771 /* move-result-wide vAA */
772 GET_OPA(a2) # a2 <- AA
773 lw a3, OFF_FP_RESULT_REGISTER(rFP) # get pointer to result JType
774 LOAD64(a0, a1, a3) # a0/a1 <- retval.j
775 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
776 SET_VREG64(a0, a1, a2) # fp[AA] <- a0/a1
777 GET_INST_OPCODE(t0) # extract opcode from rINST
778 GOTO_OPCODE(t0) # jump to next instruction
779
780/* ------------------------------ */
781 .balign 128
782.L_op_move_result_object: /* 0x0c */
783/* File: mips/op_move_result_object.S */
784/* File: mips/op_move_result.S */
785 /* for: move-result, move-result-object */
786 /* op vAA */
787 GET_OPA(a2) # a2 <- AA
788 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
789 lw a0, OFF_FP_RESULT_REGISTER(rFP) # get pointer to result JType
790 lw a0, 0(a0) # a0 <- result.i
791 GET_INST_OPCODE(t0) # extract opcode from rINST
792 .if 1
793 SET_VREG_OBJECT(a0, a2) # fp[AA] <- a0
794 .else
795 SET_VREG(a0, a2) # fp[AA] <- a0
796 .endif
797 GOTO_OPCODE(t0) # jump to next instruction
798
799
800/* ------------------------------ */
801 .balign 128
802.L_op_move_exception: /* 0x0d */
803/* File: mips/op_move_exception.S */
804 /* move-exception vAA */
805 GET_OPA(a2) # a2 <- AA
806 lw a3, THREAD_EXCEPTION_OFFSET(rSELF) # get exception obj
807 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
808 SET_VREG_OBJECT(a3, a2) # fp[AA] <- exception obj
809 GET_INST_OPCODE(t0) # extract opcode from rINST
810 sw zero, THREAD_EXCEPTION_OFFSET(rSELF) # clear exception
811 GOTO_OPCODE(t0) # jump to next instruction
812
813/* ------------------------------ */
814 .balign 128
815.L_op_return_void: /* 0x0e */
816/* File: mips/op_return_void.S */
817 .extern MterpThreadFenceForConstructor
818 JAL(MterpThreadFenceForConstructor)
819 lw ra, THREAD_FLAGS_OFFSET(rSELF)
820 move a0, rSELF
821 and ra, (THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST)
822 beqz ra, 1f
823 JAL(MterpSuspendCheck) # (self)
8241:
825 move v0, zero
826 move v1, zero
827 b MterpReturn
828
829/* ------------------------------ */
830 .balign 128
831.L_op_return: /* 0x0f */
832/* File: mips/op_return.S */
833 /*
834 * Return a 32-bit value.
835 *
836 * for: return, return-object
837 */
838 /* op vAA */
839 .extern MterpThreadFenceForConstructor
840 JAL(MterpThreadFenceForConstructor)
841 lw ra, THREAD_FLAGS_OFFSET(rSELF)
842 move a0, rSELF
843 and ra, (THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST)
844 beqz ra, 1f
845 JAL(MterpSuspendCheck) # (self)
8461:
847 GET_OPA(a2) # a2 <- AA
848 GET_VREG(v0, a2) # v0 <- vAA
849 move v1, zero
850 b MterpReturn
851
852/* ------------------------------ */
853 .balign 128
854.L_op_return_wide: /* 0x10 */
855/* File: mips/op_return_wide.S */
856 /*
857 * Return a 64-bit value.
858 */
859 /* return-wide vAA */
860 .extern MterpThreadFenceForConstructor
861 JAL(MterpThreadFenceForConstructor)
862 lw ra, THREAD_FLAGS_OFFSET(rSELF)
863 move a0, rSELF
864 and ra, (THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST)
865 beqz ra, 1f
866 JAL(MterpSuspendCheck) # (self)
8671:
868 GET_OPA(a2) # a2 <- AA
869 EAS2(a2, rFP, a2) # a2 <- &fp[AA]
870 LOAD64(v0, v1, a2) # v0/v1 <- vAA/vAA+1
871 b MterpReturn
872
873/* ------------------------------ */
874 .balign 128
875.L_op_return_object: /* 0x11 */
876/* File: mips/op_return_object.S */
877/* File: mips/op_return.S */
878 /*
879 * Return a 32-bit value.
880 *
881 * for: return, return-object
882 */
883 /* op vAA */
884 .extern MterpThreadFenceForConstructor
885 JAL(MterpThreadFenceForConstructor)
886 lw ra, THREAD_FLAGS_OFFSET(rSELF)
887 move a0, rSELF
888 and ra, (THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST)
889 beqz ra, 1f
890 JAL(MterpSuspendCheck) # (self)
8911:
892 GET_OPA(a2) # a2 <- AA
893 GET_VREG(v0, a2) # v0 <- vAA
894 move v1, zero
895 b MterpReturn
896
897
898/* ------------------------------ */
899 .balign 128
900.L_op_const_4: /* 0x12 */
901/* File: mips/op_const_4.S */
902 # const/4 vA, /* +B */
903 sll a1, rINST, 16 # a1 <- Bxxx0000
904 GET_OPA(a0) # a0 <- A+
905 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
906 sra a1, a1, 28 # a1 <- sssssssB (sign-extended)
907 and a0, a0, 15
908 GET_INST_OPCODE(t0) # extract opcode from rINST
909 SET_VREG_GOTO(a1, a0, t0) # fp[A] <- a1
910
911/* ------------------------------ */
912 .balign 128
913.L_op_const_16: /* 0x13 */
914/* File: mips/op_const_16.S */
915 # const/16 vAA, /* +BBBB */
916 FETCH_S(a0, 1) # a0 <- ssssBBBB (sign-extended)
917 GET_OPA(a3) # a3 <- AA
918 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
919 GET_INST_OPCODE(t0) # extract opcode from rINST
920 SET_VREG_GOTO(a0, a3, t0) # vAA <- a0
921
922/* ------------------------------ */
923 .balign 128
924.L_op_const: /* 0x14 */
925/* File: mips/op_const.S */
926 # const vAA, /* +BBBBbbbb */
927 GET_OPA(a3) # a3 <- AA
928 FETCH(a0, 1) # a0 <- bbbb (low)
929 FETCH(a1, 2) # a1 <- BBBB (high)
930 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
931 sll a1, a1, 16
932 or a0, a1, a0 # a0 <- BBBBbbbb
933 GET_INST_OPCODE(t0) # extract opcode from rINST
934 SET_VREG_GOTO(a0, a3, t0) # vAA <- a0
935
936/* ------------------------------ */
937 .balign 128
938.L_op_const_high16: /* 0x15 */
939/* File: mips/op_const_high16.S */
940 # const/high16 vAA, /* +BBBB0000 */
941 FETCH(a0, 1) # a0 <- 0000BBBB (zero-extended)
942 GET_OPA(a3) # a3 <- AA
943 sll a0, a0, 16 # a0 <- BBBB0000
944 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
945 GET_INST_OPCODE(t0) # extract opcode from rINST
946 SET_VREG_GOTO(a0, a3, t0) # vAA <- a0
947
948/* ------------------------------ */
949 .balign 128
950.L_op_const_wide_16: /* 0x16 */
951/* File: mips/op_const_wide_16.S */
952 # const-wide/16 vAA, /* +BBBB */
953 FETCH_S(a0, 1) # a0 <- ssssBBBB (sign-extended)
954 GET_OPA(a3) # a3 <- AA
955 sra a1, a0, 31 # a1 <- ssssssss
956 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
957 GET_INST_OPCODE(t0) # extract opcode from rINST
958 SET_VREG64(a0, a1, a3) # vAA <- a0/a1
959 GOTO_OPCODE(t0) # jump to next instruction
960
961/* ------------------------------ */
962 .balign 128
963.L_op_const_wide_32: /* 0x17 */
964/* File: mips/op_const_wide_32.S */
965 # const-wide/32 vAA, /* +BBBBbbbb */
966 FETCH(a0, 1) # a0 <- 0000bbbb (low)
967 GET_OPA(a3) # a3 <- AA
968 FETCH_S(a2, 2) # a2 <- ssssBBBB (high)
969 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
970 sll a2, a2, 16
971 or a0, a0, a2 # a0 <- BBBBbbbb
972 sra a1, a0, 31 # a1 <- ssssssss
973 GET_INST_OPCODE(t0) # extract opcode from rINST
974 SET_VREG64(a0, a1, a3) # vAA <- a0/a1
975 GOTO_OPCODE(t0) # jump to next instruction
976
977/* ------------------------------ */
978 .balign 128
979.L_op_const_wide: /* 0x18 */
980/* File: mips/op_const_wide.S */
981 # const-wide vAA, /* +HHHHhhhhBBBBbbbb */
982 FETCH(a0, 1) # a0 <- bbbb (low)
983 FETCH(a1, 2) # a1 <- BBBB (low middle)
984 FETCH(a2, 3) # a2 <- hhhh (high middle)
985 sll a1, 16 #
986 or a0, a1 # a0 <- BBBBbbbb (low word)
987 FETCH(a3, 4) # a3 <- HHHH (high)
988 GET_OPA(t1) # t1 <- AA
989 sll a3, 16
990 or a1, a3, a2 # a1 <- HHHHhhhh (high word)
991 FETCH_ADVANCE_INST(5) # advance rPC, load rINST
992 GET_INST_OPCODE(t0) # extract opcode from rINST
993 SET_VREG64(a0, a1, t1) # vAA <- a0/a1
994 GOTO_OPCODE(t0) # jump to next instruction
995
996/* ------------------------------ */
997 .balign 128
998.L_op_const_wide_high16: /* 0x19 */
999/* File: mips/op_const_wide_high16.S */
1000 # const-wide/high16 vAA, /* +BBBB000000000000 */
1001 FETCH(a1, 1) # a1 <- 0000BBBB (zero-extended)
1002 GET_OPA(a3) # a3 <- AA
1003 li a0, 0 # a0 <- 00000000
1004 sll a1, 16 # a1 <- BBBB0000
1005 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1006 GET_INST_OPCODE(t0) # extract opcode from rINST
1007 SET_VREG64(a0, a1, a3) # vAA <- a0/a1
1008 GOTO_OPCODE(t0) # jump to next instruction
1009
1010/* ------------------------------ */
1011 .balign 128
1012.L_op_const_string: /* 0x1a */
1013/* File: mips/op_const_string.S */
1014 # const/string vAA, String /* BBBB */
1015 EXPORT_PC()
1016 FETCH(a0, 1) # a0 <- BBBB
1017 GET_OPA(a1) # a1 <- AA
1018 addu a2, rFP, OFF_FP_SHADOWFRAME # a2 <- shadow frame
1019 move a3, rSELF
1020 JAL(MterpConstString) # v0 <- Mterp(index, tgt_reg, shadow_frame, self)
1021 PREFETCH_INST(2) # load rINST
1022 bnez v0, MterpPossibleException
1023 ADVANCE(2) # advance rPC
1024 GET_INST_OPCODE(t0) # extract opcode from rINST
1025 GOTO_OPCODE(t0) # jump to next instruction
1026
1027/* ------------------------------ */
1028 .balign 128
1029.L_op_const_string_jumbo: /* 0x1b */
1030/* File: mips/op_const_string_jumbo.S */
1031 # const/string vAA, String /* BBBBBBBB */
1032 EXPORT_PC()
1033 FETCH(a0, 1) # a0 <- bbbb (low)
1034 FETCH(a2, 2) # a2 <- BBBB (high)
1035 GET_OPA(a1) # a1 <- AA
1036 sll a2, a2, 16
1037 or a0, a0, a2 # a0 <- BBBBbbbb
1038 addu a2, rFP, OFF_FP_SHADOWFRAME # a2 <- shadow frame
1039 move a3, rSELF
1040 JAL(MterpConstString) # v0 <- Mterp(index, tgt_reg, shadow_frame, self)
1041 PREFETCH_INST(3) # load rINST
1042 bnez v0, MterpPossibleException
1043 ADVANCE(3) # advance rPC
1044 GET_INST_OPCODE(t0) # extract opcode from rINST
1045 GOTO_OPCODE(t0) # jump to next instruction
1046
1047/* ------------------------------ */
1048 .balign 128
1049.L_op_const_class: /* 0x1c */
1050/* File: mips/op_const_class.S */
1051 # const/class vAA, Class /* BBBB */
1052 EXPORT_PC()
1053 FETCH(a0, 1) # a0 <- BBBB
1054 GET_OPA(a1) # a1 <- AA
1055 addu a2, rFP, OFF_FP_SHADOWFRAME # a2 <- shadow frame
1056 move a3, rSELF
1057 JAL(MterpConstClass)
1058 PREFETCH_INST(2) # load rINST
1059 bnez v0, MterpPossibleException
1060 ADVANCE(2) # advance rPC
1061 GET_INST_OPCODE(t0) # extract opcode from rINST
1062 GOTO_OPCODE(t0) # jump to next instruction
1063
1064/* ------------------------------ */
1065 .balign 128
1066.L_op_monitor_enter: /* 0x1d */
1067/* File: mips/op_monitor_enter.S */
1068 /*
1069 * Synchronize on an object.
1070 */
1071 /* monitor-enter vAA */
1072 EXPORT_PC()
1073 GET_OPA(a2) # a2 <- AA
1074 GET_VREG(a0, a2) # a0 <- vAA (object)
1075 move a1, rSELF # a1 <- self
1076 JAL(artLockObjectFromCode) # v0 <- artLockObject(obj, self)
1077 bnez v0, MterpException
1078 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
1079 GET_INST_OPCODE(t0) # extract opcode from rINST
1080 GOTO_OPCODE(t0) # jump to next instruction
1081
1082/* ------------------------------ */
1083 .balign 128
1084.L_op_monitor_exit: /* 0x1e */
1085/* File: mips/op_monitor_exit.S */
1086 /*
1087 * Unlock an object.
1088 *
1089 * Exceptions that occur when unlocking a monitor need to appear as
1090 * if they happened at the following instruction. See the Dalvik
1091 * instruction spec.
1092 */
1093 /* monitor-exit vAA */
1094 EXPORT_PC()
1095 GET_OPA(a2) # a2 <- AA
1096 GET_VREG(a0, a2) # a0 <- vAA (object)
1097 move a1, rSELF # a1 <- self
1098 JAL(artUnlockObjectFromCode) # v0 <- artUnlockObject(obj, self)
1099 bnez v0, MterpException
1100 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
1101 GET_INST_OPCODE(t0) # extract opcode from rINST
1102 GOTO_OPCODE(t0) # jump to next instruction
1103
1104/* ------------------------------ */
1105 .balign 128
1106.L_op_check_cast: /* 0x1f */
1107/* File: mips/op_check_cast.S */
1108 /*
1109 * Check to see if a cast from one class to another is allowed.
1110 */
1111 # check-cast vAA, class /* BBBB */
1112 EXPORT_PC()
1113 FETCH(a0, 1) # a0 <- BBBB
1114 GET_OPA(a1) # a1 <- AA
1115 EAS2(a1, rFP, a1) # a1 <- &object
1116 lw a2, OFF_FP_METHOD(rFP) # a2 <- method
1117 move a3, rSELF # a3 <- self
1118 JAL(MterpCheckCast) # v0 <- CheckCast(index, &obj, method, self)
1119 PREFETCH_INST(2)
1120 bnez v0, MterpPossibleException
1121 ADVANCE(2)
1122 GET_INST_OPCODE(t0) # extract opcode from rINST
1123 GOTO_OPCODE(t0) # jump to next instruction
1124
1125/* ------------------------------ */
1126 .balign 128
1127.L_op_instance_of: /* 0x20 */
1128/* File: mips/op_instance_of.S */
1129 /*
1130 * Check to see if an object reference is an instance of a class.
1131 *
1132 * Most common situation is a non-null object, being compared against
1133 * an already-resolved class.
1134 */
1135 # instance-of vA, vB, class /* CCCC */
1136 EXPORT_PC()
1137 FETCH(a0, 1) # a0 <- CCCC
1138 GET_OPB(a1) # a1 <- B
1139 EAS2(a1, rFP, a1) # a1 <- &object
1140 lw a2, OFF_FP_METHOD(rFP) # a2 <- method
1141 move a3, rSELF # a3 <- self
1142 GET_OPA4(rOBJ) # rOBJ <- A+
1143 JAL(MterpInstanceOf) # v0 <- Mterp(index, &obj, method, self)
1144 lw a1, THREAD_EXCEPTION_OFFSET(rSELF)
1145 PREFETCH_INST(2) # load rINST
1146 bnez a1, MterpException
1147 ADVANCE(2) # advance rPC
1148 GET_INST_OPCODE(t0) # extract opcode from rINST
1149 SET_VREG_GOTO(v0, rOBJ, t0) # vA <- v0
1150
1151/* ------------------------------ */
1152 .balign 128
1153.L_op_array_length: /* 0x21 */
1154/* File: mips/op_array_length.S */
1155 /*
1156 * Return the length of an array.
1157 */
1158 GET_OPB(a1) # a1 <- B
1159 GET_OPA4(a2) # a2 <- A+
1160 GET_VREG(a0, a1) # a0 <- vB (object ref)
1161 # is object null?
1162 beqz a0, common_errNullObject # yup, fail
1163 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
1164 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- array length
1165 GET_INST_OPCODE(t0) # extract opcode from rINST
1166 SET_VREG_GOTO(a3, a2, t0) # vA <- length
1167
1168/* ------------------------------ */
1169 .balign 128
1170.L_op_new_instance: /* 0x22 */
1171/* File: mips/op_new_instance.S */
1172 /*
1173 * Create a new instance of a class.
1174 */
1175 # new-instance vAA, class /* BBBB */
1176 EXPORT_PC()
1177 addu a0, rFP, OFF_FP_SHADOWFRAME
1178 move a1, rSELF
1179 move a2, rINST
1180 JAL(MterpNewInstance)
1181 beqz v0, MterpPossibleException
1182 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1183 GET_INST_OPCODE(t0) # extract opcode from rINST
1184 GOTO_OPCODE(t0) # jump to next instruction
1185
1186/* ------------------------------ */
1187 .balign 128
1188.L_op_new_array: /* 0x23 */
1189/* File: mips/op_new_array.S */
1190 /*
1191 * Allocate an array of objects, specified with the array class
1192 * and a count.
1193 *
1194 * The verifier guarantees that this is an array class, so we don't
1195 * check for it here.
1196 */
1197 /* new-array vA, vB, class@CCCC */
1198 EXPORT_PC()
1199 addu a0, rFP, OFF_FP_SHADOWFRAME
1200 move a1, rPC
1201 move a2, rINST
1202 move a3, rSELF
1203 JAL(MterpNewArray)
1204 beqz v0, MterpPossibleException
1205 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1206 GET_INST_OPCODE(t0) # extract opcode from rINST
1207 GOTO_OPCODE(t0) # jump to next instruction
1208
1209/* ------------------------------ */
1210 .balign 128
1211.L_op_filled_new_array: /* 0x24 */
1212/* File: mips/op_filled_new_array.S */
1213 /*
1214 * Create a new array with elements filled from registers.
1215 *
1216 * for: filled-new-array, filled-new-array/range
1217 */
1218 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
1219 # op {vCCCC..v(CCCC+AA-1)}, type /* BBBB */
1220 .extern MterpFilledNewArray
1221 EXPORT_PC()
1222 addu a0, rFP, OFF_FP_SHADOWFRAME # a0 <- shadow frame
1223 move a1, rPC
1224 move a2, rSELF
1225 JAL(MterpFilledNewArray) # v0 <- helper(shadow_frame, pc, self)
1226 beqz v0, MterpPossibleException # has exception
1227 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
1228 GET_INST_OPCODE(t0) # extract opcode from rINST
1229 GOTO_OPCODE(t0) # jump to next instruction
1230
1231/* ------------------------------ */
1232 .balign 128
1233.L_op_filled_new_array_range: /* 0x25 */
1234/* File: mips/op_filled_new_array_range.S */
1235/* File: mips/op_filled_new_array.S */
1236 /*
1237 * Create a new array with elements filled from registers.
1238 *
1239 * for: filled-new-array, filled-new-array/range
1240 */
1241 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
1242 # op {vCCCC..v(CCCC+AA-1)}, type /* BBBB */
1243 .extern MterpFilledNewArrayRange
1244 EXPORT_PC()
1245 addu a0, rFP, OFF_FP_SHADOWFRAME # a0 <- shadow frame
1246 move a1, rPC
1247 move a2, rSELF
1248 JAL(MterpFilledNewArrayRange) # v0 <- helper(shadow_frame, pc, self)
1249 beqz v0, MterpPossibleException # has exception
1250 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
1251 GET_INST_OPCODE(t0) # extract opcode from rINST
1252 GOTO_OPCODE(t0) # jump to next instruction
1253
1254
1255/* ------------------------------ */
1256 .balign 128
1257.L_op_fill_array_data: /* 0x26 */
1258/* File: mips/op_fill_array_data.S */
1259 /* fill-array-data vAA, +BBBBBBBB */
1260 EXPORT_PC()
1261 FETCH(a0, 1) # a0 <- bbbb (lo)
1262 FETCH(a1, 2) # a1 <- BBBB (hi)
1263 GET_OPA(a3) # a3 <- AA
1264 sll a1, a1, 16 # a1 <- BBBBbbbb
1265 or a1, a0, a1 # a1 <- BBBBbbbb
1266 GET_VREG(a0, a3) # a0 <- vAA (array object)
1267 EAS1(a1, rPC, a1) # a1 <- PC + BBBBbbbb*2 (array data off.)
1268 JAL(MterpFillArrayData) # v0 <- Mterp(obj, payload)
1269 beqz v0, MterpPossibleException # has exception
1270 FETCH_ADVANCE_INST(3) # advance rPC, load rINST
1271 GET_INST_OPCODE(t0) # extract opcode from rINST
1272 GOTO_OPCODE(t0) # jump to next instruction
1273
1274/* ------------------------------ */
1275 .balign 128
1276.L_op_throw: /* 0x27 */
1277/* File: mips/op_throw.S */
1278 /*
1279 * Throw an exception object in the current thread.
1280 */
1281 /* throw vAA */
1282 EXPORT_PC() # exception handler can throw
1283 GET_OPA(a2) # a2 <- AA
1284 GET_VREG(a1, a2) # a1 <- vAA (exception object)
1285 # null object?
1286 beqz a1, common_errNullObject # yes, throw an NPE instead
1287 sw a1, THREAD_EXCEPTION_OFFSET(rSELF) # thread->exception <- obj
1288 b MterpException
1289
1290/* ------------------------------ */
1291 .balign 128
1292.L_op_goto: /* 0x28 */
1293/* File: mips/op_goto.S */
1294 /*
1295 * Unconditional branch, 8-bit offset.
1296 *
1297 * The branch distance is a signed code-unit offset, which we need to
1298 * double to get a byte offset.
1299 */
1300 /* goto +AA */
Douglas Leung200f0402016-02-25 20:05:47 -08001301 sll a0, rINST, 16 # a0 <- AAxx0000
1302 sra rINST, a0, 24 # rINST <- ssssssAA (sign-extended)
Douglas Leung020b18a2016-06-03 18:05:35 -07001303 b MterpCommonTakenBranchNoFlags
Douglas Leung200f0402016-02-25 20:05:47 -08001304
1305/* ------------------------------ */
1306 .balign 128
1307.L_op_goto_16: /* 0x29 */
1308/* File: mips/op_goto_16.S */
1309 /*
1310 * Unconditional branch, 16-bit offset.
1311 *
1312 * The branch distance is a signed code-unit offset, which we need to
1313 * double to get a byte offset.
1314 */
1315 /* goto/16 +AAAA */
Douglas Leung200f0402016-02-25 20:05:47 -08001316 FETCH_S(rINST, 1) # rINST <- ssssAAAA (sign-extended)
Douglas Leung020b18a2016-06-03 18:05:35 -07001317 b MterpCommonTakenBranchNoFlags
Douglas Leung200f0402016-02-25 20:05:47 -08001318
1319/* ------------------------------ */
1320 .balign 128
1321.L_op_goto_32: /* 0x2a */
1322/* File: mips/op_goto_32.S */
1323 /*
1324 * Unconditional branch, 32-bit offset.
1325 *
1326 * The branch distance is a signed code-unit offset, which we need to
1327 * double to get a byte offset.
1328 *
1329 * Unlike most opcodes, this one is allowed to branch to itself, so
1330 * our "backward branch" test must be "<=0" instead of "<0".
1331 */
1332 /* goto/32 +AAAAAAAA */
Douglas Leung200f0402016-02-25 20:05:47 -08001333 FETCH(a0, 1) # a0 <- aaaa (lo)
1334 FETCH(a1, 2) # a1 <- AAAA (hi)
1335 sll a1, a1, 16
1336 or rINST, a0, a1 # rINST <- AAAAaaaa
Douglas Leung020b18a2016-06-03 18:05:35 -07001337 b MterpCommonTakenBranchNoFlags
Douglas Leung200f0402016-02-25 20:05:47 -08001338
1339/* ------------------------------ */
1340 .balign 128
1341.L_op_packed_switch: /* 0x2b */
1342/* File: mips/op_packed_switch.S */
1343 /*
1344 * Handle a packed-switch or sparse-switch instruction. In both cases
1345 * we decode it and hand it off to a helper function.
1346 *
1347 * We don't really expect backward branches in a switch statement, but
1348 * they're perfectly legal, so we check for them here.
1349 *
1350 * for: packed-switch, sparse-switch
1351 */
1352 /* op vAA, +BBBB */
Douglas Leung200f0402016-02-25 20:05:47 -08001353 FETCH(a0, 1) # a0 <- bbbb (lo)
1354 FETCH(a1, 2) # a1 <- BBBB (hi)
1355 GET_OPA(a3) # a3 <- AA
1356 sll t0, a1, 16
1357 or a0, a0, t0 # a0 <- BBBBbbbb
1358 GET_VREG(a1, a3) # a1 <- vAA
1359 EAS1(a0, rPC, a0) # a0 <- PC + BBBBbbbb*2
1360 JAL(MterpDoPackedSwitch) # a0 <- code-unit branch offset
1361 move rINST, v0
Douglas Leung020b18a2016-06-03 18:05:35 -07001362 b MterpCommonTakenBranchNoFlags
Douglas Leung200f0402016-02-25 20:05:47 -08001363
1364/* ------------------------------ */
1365 .balign 128
1366.L_op_sparse_switch: /* 0x2c */
1367/* File: mips/op_sparse_switch.S */
1368/* File: mips/op_packed_switch.S */
1369 /*
1370 * Handle a packed-switch or sparse-switch instruction. In both cases
1371 * we decode it and hand it off to a helper function.
1372 *
1373 * We don't really expect backward branches in a switch statement, but
1374 * they're perfectly legal, so we check for them here.
1375 *
1376 * for: packed-switch, sparse-switch
1377 */
1378 /* op vAA, +BBBB */
Douglas Leung200f0402016-02-25 20:05:47 -08001379 FETCH(a0, 1) # a0 <- bbbb (lo)
1380 FETCH(a1, 2) # a1 <- BBBB (hi)
1381 GET_OPA(a3) # a3 <- AA
1382 sll t0, a1, 16
1383 or a0, a0, t0 # a0 <- BBBBbbbb
1384 GET_VREG(a1, a3) # a1 <- vAA
1385 EAS1(a0, rPC, a0) # a0 <- PC + BBBBbbbb*2
1386 JAL(MterpDoSparseSwitch) # a0 <- code-unit branch offset
1387 move rINST, v0
Douglas Leung020b18a2016-06-03 18:05:35 -07001388 b MterpCommonTakenBranchNoFlags
Douglas Leung200f0402016-02-25 20:05:47 -08001389
1390
1391/* ------------------------------ */
1392 .balign 128
1393.L_op_cmpl_float: /* 0x2d */
1394/* File: mips/op_cmpl_float.S */
1395 /*
1396 * Compare two floating-point values. Puts 0, 1, or -1 into the
1397 * destination register rTEMP based on the results of the comparison.
1398 *
1399 * Provide a "naninst" instruction that puts 1 or -1 into rTEMP depending
1400 * on what value we'd like to return when one of the operands is NaN.
1401 *
1402 * The operation we're implementing is:
1403 * if (x == y)
1404 * return 0;
1405 * else if (x < y)
1406 * return -1;
1407 * else if (x > y)
1408 * return 1;
1409 * else
1410 * return {-1 or 1}; // one or both operands was NaN
1411 *
1412 * for: cmpl-float, cmpg-float
1413 */
1414 /* op vAA, vBB, vCC */
1415
1416 /* "clasic" form */
1417 FETCH(a0, 1) # a0 <- CCBB
1418 and a2, a0, 255 # a2 <- BB
1419 srl a3, a0, 8
1420 GET_VREG_F(ft0, a2)
1421 GET_VREG_F(ft1, a3)
1422#ifdef MIPS32REVGE6
1423 cmp.ult.s ft2, ft0, ft1 # Is ft0 < ft1
1424 li rTEMP, -1
1425 bc1nez ft2, .Lop_cmpl_float_finish
1426 cmp.ult.s ft2, ft1, ft0
1427 li rTEMP, 1
1428 bc1nez ft2, .Lop_cmpl_float_finish
1429 cmp.eq.s ft2, ft0, ft1
1430 li rTEMP, 0
1431 bc1nez ft2, .Lop_cmpl_float_finish
1432 b .Lop_cmpl_float_nan
1433#else
1434 c.olt.s fcc0, ft0, ft1 # Is ft0 < ft1
1435 li rTEMP, -1
1436 bc1t fcc0, .Lop_cmpl_float_finish
1437 c.olt.s fcc0, ft1, ft0
1438 li rTEMP, 1
1439 bc1t fcc0, .Lop_cmpl_float_finish
1440 c.eq.s fcc0, ft0, ft1
1441 li rTEMP, 0
1442 bc1t fcc0, .Lop_cmpl_float_finish
1443 b .Lop_cmpl_float_nan
1444#endif
1445
1446/* ------------------------------ */
1447 .balign 128
1448.L_op_cmpg_float: /* 0x2e */
1449/* File: mips/op_cmpg_float.S */
1450/* File: mips/op_cmpl_float.S */
1451 /*
1452 * Compare two floating-point values. Puts 0, 1, or -1 into the
1453 * destination register rTEMP based on the results of the comparison.
1454 *
1455 * Provide a "naninst" instruction that puts 1 or -1 into rTEMP depending
1456 * on what value we'd like to return when one of the operands is NaN.
1457 *
1458 * The operation we're implementing is:
1459 * if (x == y)
1460 * return 0;
1461 * else if (x < y)
1462 * return -1;
1463 * else if (x > y)
1464 * return 1;
1465 * else
1466 * return {-1 or 1}; // one or both operands was NaN
1467 *
1468 * for: cmpl-float, cmpg-float
1469 */
1470 /* op vAA, vBB, vCC */
1471
1472 /* "clasic" form */
1473 FETCH(a0, 1) # a0 <- CCBB
1474 and a2, a0, 255 # a2 <- BB
1475 srl a3, a0, 8
1476 GET_VREG_F(ft0, a2)
1477 GET_VREG_F(ft1, a3)
1478#ifdef MIPS32REVGE6
1479 cmp.ult.s ft2, ft0, ft1 # Is ft0 < ft1
1480 li rTEMP, -1
1481 bc1nez ft2, .Lop_cmpg_float_finish
1482 cmp.ult.s ft2, ft1, ft0
1483 li rTEMP, 1
1484 bc1nez ft2, .Lop_cmpg_float_finish
1485 cmp.eq.s ft2, ft0, ft1
1486 li rTEMP, 0
1487 bc1nez ft2, .Lop_cmpg_float_finish
1488 b .Lop_cmpg_float_nan
1489#else
1490 c.olt.s fcc0, ft0, ft1 # Is ft0 < ft1
1491 li rTEMP, -1
1492 bc1t fcc0, .Lop_cmpg_float_finish
1493 c.olt.s fcc0, ft1, ft0
1494 li rTEMP, 1
1495 bc1t fcc0, .Lop_cmpg_float_finish
1496 c.eq.s fcc0, ft0, ft1
1497 li rTEMP, 0
1498 bc1t fcc0, .Lop_cmpg_float_finish
1499 b .Lop_cmpg_float_nan
1500#endif
1501
1502
1503/* ------------------------------ */
1504 .balign 128
1505.L_op_cmpl_double: /* 0x2f */
1506/* File: mips/op_cmpl_double.S */
1507 /*
1508 * Compare two floating-point values. Puts 0(==), 1(>), or -1(<)
1509 * into the destination register (rTEMP) based on the comparison results.
1510 *
1511 * Provide a "naninst" instruction that puts 1 or -1 into rTEMP depending
1512 * on what value we'd like to return when one of the operands is NaN.
1513 *
1514 * See op_cmpl_float for more details.
1515 *
1516 * For: cmpl-double, cmpg-double
1517 */
1518 /* op vAA, vBB, vCC */
1519
1520 FETCH(a0, 1) # a0 <- CCBB
1521 and rOBJ, a0, 255 # s5 <- BB
1522 srl t0, a0, 8 # t0 <- CC
1523 EAS2(rOBJ, rFP, rOBJ) # s5 <- &fp[BB]
1524 EAS2(t0, rFP, t0) # t0 <- &fp[CC]
1525 LOAD64_F(ft0, ft0f, rOBJ)
1526 LOAD64_F(ft1, ft1f, t0)
1527#ifdef MIPS32REVGE6
1528 cmp.ult.d ft2, ft0, ft1
1529 li rTEMP, -1
1530 bc1nez ft2, .Lop_cmpl_double_finish
1531 cmp.ult.d ft2, ft1, ft0
1532 li rTEMP, 1
1533 bc1nez ft2, .Lop_cmpl_double_finish
1534 cmp.eq.d ft2, ft0, ft1
1535 li rTEMP, 0
1536 bc1nez ft2, .Lop_cmpl_double_finish
1537 b .Lop_cmpl_double_nan
1538#else
1539 c.olt.d fcc0, ft0, ft1
1540 li rTEMP, -1
1541 bc1t fcc0, .Lop_cmpl_double_finish
1542 c.olt.d fcc0, ft1, ft0
1543 li rTEMP, 1
1544 bc1t fcc0, .Lop_cmpl_double_finish
1545 c.eq.d fcc0, ft0, ft1
1546 li rTEMP, 0
1547 bc1t fcc0, .Lop_cmpl_double_finish
1548 b .Lop_cmpl_double_nan
1549#endif
1550
1551/* ------------------------------ */
1552 .balign 128
1553.L_op_cmpg_double: /* 0x30 */
1554/* File: mips/op_cmpg_double.S */
1555/* File: mips/op_cmpl_double.S */
1556 /*
1557 * Compare two floating-point values. Puts 0(==), 1(>), or -1(<)
1558 * into the destination register (rTEMP) based on the comparison results.
1559 *
1560 * Provide a "naninst" instruction that puts 1 or -1 into rTEMP depending
1561 * on what value we'd like to return when one of the operands is NaN.
1562 *
1563 * See op_cmpl_float for more details.
1564 *
1565 * For: cmpl-double, cmpg-double
1566 */
1567 /* op vAA, vBB, vCC */
1568
1569 FETCH(a0, 1) # a0 <- CCBB
1570 and rOBJ, a0, 255 # s5 <- BB
1571 srl t0, a0, 8 # t0 <- CC
1572 EAS2(rOBJ, rFP, rOBJ) # s5 <- &fp[BB]
1573 EAS2(t0, rFP, t0) # t0 <- &fp[CC]
1574 LOAD64_F(ft0, ft0f, rOBJ)
1575 LOAD64_F(ft1, ft1f, t0)
1576#ifdef MIPS32REVGE6
1577 cmp.ult.d ft2, ft0, ft1
1578 li rTEMP, -1
1579 bc1nez ft2, .Lop_cmpg_double_finish
1580 cmp.ult.d ft2, ft1, ft0
1581 li rTEMP, 1
1582 bc1nez ft2, .Lop_cmpg_double_finish
1583 cmp.eq.d ft2, ft0, ft1
1584 li rTEMP, 0
1585 bc1nez ft2, .Lop_cmpg_double_finish
1586 b .Lop_cmpg_double_nan
1587#else
1588 c.olt.d fcc0, ft0, ft1
1589 li rTEMP, -1
1590 bc1t fcc0, .Lop_cmpg_double_finish
1591 c.olt.d fcc0, ft1, ft0
1592 li rTEMP, 1
1593 bc1t fcc0, .Lop_cmpg_double_finish
1594 c.eq.d fcc0, ft0, ft1
1595 li rTEMP, 0
1596 bc1t fcc0, .Lop_cmpg_double_finish
1597 b .Lop_cmpg_double_nan
1598#endif
1599
1600
1601/* ------------------------------ */
1602 .balign 128
1603.L_op_cmp_long: /* 0x31 */
1604/* File: mips/op_cmp_long.S */
1605 /*
1606 * Compare two 64-bit values
1607 * x = y return 0
1608 * x < y return -1
1609 * x > y return 1
1610 *
1611 * I think I can improve on the ARM code by the following observation
1612 * slt t0, x.hi, y.hi; # (x.hi < y.hi) ? 1:0
1613 * sgt t1, x.hi, y.hi; # (y.hi > x.hi) ? 1:0
1614 * subu v0, t0, t1 # v0= -1:1:0 for [ < > = ]
1615 */
1616 /* cmp-long vAA, vBB, vCC */
1617 FETCH(a0, 1) # a0 <- CCBB
1618 GET_OPA(rOBJ) # rOBJ <- AA
1619 and a2, a0, 255 # a2 <- BB
1620 srl a3, a0, 8 # a3 <- CC
1621 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
1622 EAS2(a3, rFP, a3) # a3 <- &fp[CC]
1623 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
1624 LOAD64(a2, a3, a3) # a2/a3 <- vCC/vCC+1
1625
1626 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1627 slt t0, a1, a3 # compare hi
1628 sgt t1, a1, a3
1629 subu v0, t1, t0 # v0 <- (-1, 1, 0)
1630 bnez v0, .Lop_cmp_long_finish
1631 # at this point x.hi==y.hi
1632 sltu t0, a0, a2 # compare lo
1633 sgtu t1, a0, a2
1634 subu v0, t1, t0 # v0 <- (-1, 1, 0) for [< > =]
1635
1636.Lop_cmp_long_finish:
1637 GET_INST_OPCODE(t0) # extract opcode from rINST
1638 SET_VREG_GOTO(v0, rOBJ, t0) # vAA <- v0
1639
1640/* ------------------------------ */
1641 .balign 128
1642.L_op_if_eq: /* 0x32 */
1643/* File: mips/op_if_eq.S */
1644/* File: mips/bincmp.S */
1645 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001646 * Generic two-operand compare-and-branch operation. Provide a "condition"
1647 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001648 *
1649 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1650 */
1651 /* if-cmp vA, vB, +CCCC */
1652 GET_OPA4(a0) # a0 <- A+
1653 GET_OPB(a1) # a1 <- B
1654 GET_VREG(a3, a1) # a3 <- vB
Douglas Leung020b18a2016-06-03 18:05:35 -07001655 GET_VREG(a0, a0) # a0 <- vA
Douglas Leung200f0402016-02-25 20:05:47 -08001656 FETCH_S(rINST, 1) # rINST<- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001657 beq a0, a3, MterpCommonTakenBranchNoFlags # compare (vA, vB)
1658 li t0, JIT_CHECK_OSR
1659 beq rPROFILE, t0, .L_check_not_taken_osr
1660 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1661 GET_INST_OPCODE(t0) # extract opcode from rINST
1662 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung200f0402016-02-25 20:05:47 -08001663
1664
1665/* ------------------------------ */
1666 .balign 128
1667.L_op_if_ne: /* 0x33 */
1668/* File: mips/op_if_ne.S */
1669/* File: mips/bincmp.S */
1670 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001671 * Generic two-operand compare-and-branch operation. Provide a "condition"
1672 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001673 *
1674 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1675 */
1676 /* if-cmp vA, vB, +CCCC */
1677 GET_OPA4(a0) # a0 <- A+
1678 GET_OPB(a1) # a1 <- B
1679 GET_VREG(a3, a1) # a3 <- vB
Douglas Leung020b18a2016-06-03 18:05:35 -07001680 GET_VREG(a0, a0) # a0 <- vA
Douglas Leung200f0402016-02-25 20:05:47 -08001681 FETCH_S(rINST, 1) # rINST<- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001682 bne a0, a3, MterpCommonTakenBranchNoFlags # compare (vA, vB)
1683 li t0, JIT_CHECK_OSR
1684 beq rPROFILE, t0, .L_check_not_taken_osr
1685 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1686 GET_INST_OPCODE(t0) # extract opcode from rINST
1687 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung200f0402016-02-25 20:05:47 -08001688
1689
1690/* ------------------------------ */
1691 .balign 128
1692.L_op_if_lt: /* 0x34 */
1693/* File: mips/op_if_lt.S */
1694/* File: mips/bincmp.S */
1695 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001696 * Generic two-operand compare-and-branch operation. Provide a "condition"
1697 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001698 *
1699 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1700 */
1701 /* if-cmp vA, vB, +CCCC */
1702 GET_OPA4(a0) # a0 <- A+
1703 GET_OPB(a1) # a1 <- B
1704 GET_VREG(a3, a1) # a3 <- vB
Douglas Leung020b18a2016-06-03 18:05:35 -07001705 GET_VREG(a0, a0) # a0 <- vA
Douglas Leung200f0402016-02-25 20:05:47 -08001706 FETCH_S(rINST, 1) # rINST<- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001707 blt a0, a3, MterpCommonTakenBranchNoFlags # compare (vA, vB)
1708 li t0, JIT_CHECK_OSR
1709 beq rPROFILE, t0, .L_check_not_taken_osr
1710 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1711 GET_INST_OPCODE(t0) # extract opcode from rINST
1712 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung200f0402016-02-25 20:05:47 -08001713
1714
1715/* ------------------------------ */
1716 .balign 128
1717.L_op_if_ge: /* 0x35 */
1718/* File: mips/op_if_ge.S */
1719/* File: mips/bincmp.S */
1720 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001721 * Generic two-operand compare-and-branch operation. Provide a "condition"
1722 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001723 *
1724 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1725 */
1726 /* if-cmp vA, vB, +CCCC */
1727 GET_OPA4(a0) # a0 <- A+
1728 GET_OPB(a1) # a1 <- B
1729 GET_VREG(a3, a1) # a3 <- vB
Douglas Leung020b18a2016-06-03 18:05:35 -07001730 GET_VREG(a0, a0) # a0 <- vA
Douglas Leung200f0402016-02-25 20:05:47 -08001731 FETCH_S(rINST, 1) # rINST<- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001732 bge a0, a3, MterpCommonTakenBranchNoFlags # compare (vA, vB)
1733 li t0, JIT_CHECK_OSR
1734 beq rPROFILE, t0, .L_check_not_taken_osr
1735 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1736 GET_INST_OPCODE(t0) # extract opcode from rINST
1737 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung200f0402016-02-25 20:05:47 -08001738
1739
1740/* ------------------------------ */
1741 .balign 128
1742.L_op_if_gt: /* 0x36 */
1743/* File: mips/op_if_gt.S */
1744/* File: mips/bincmp.S */
1745 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001746 * Generic two-operand compare-and-branch operation. Provide a "condition"
1747 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001748 *
1749 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1750 */
1751 /* if-cmp vA, vB, +CCCC */
1752 GET_OPA4(a0) # a0 <- A+
1753 GET_OPB(a1) # a1 <- B
1754 GET_VREG(a3, a1) # a3 <- vB
Douglas Leung020b18a2016-06-03 18:05:35 -07001755 GET_VREG(a0, a0) # a0 <- vA
Douglas Leung200f0402016-02-25 20:05:47 -08001756 FETCH_S(rINST, 1) # rINST<- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001757 bgt a0, a3, MterpCommonTakenBranchNoFlags # compare (vA, vB)
1758 li t0, JIT_CHECK_OSR
1759 beq rPROFILE, t0, .L_check_not_taken_osr
1760 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1761 GET_INST_OPCODE(t0) # extract opcode from rINST
1762 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung200f0402016-02-25 20:05:47 -08001763
1764
1765/* ------------------------------ */
1766 .balign 128
1767.L_op_if_le: /* 0x37 */
1768/* File: mips/op_if_le.S */
1769/* File: mips/bincmp.S */
1770 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001771 * Generic two-operand compare-and-branch operation. Provide a "condition"
1772 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001773 *
1774 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1775 */
1776 /* if-cmp vA, vB, +CCCC */
1777 GET_OPA4(a0) # a0 <- A+
1778 GET_OPB(a1) # a1 <- B
1779 GET_VREG(a3, a1) # a3 <- vB
Douglas Leung020b18a2016-06-03 18:05:35 -07001780 GET_VREG(a0, a0) # a0 <- vA
Douglas Leung200f0402016-02-25 20:05:47 -08001781 FETCH_S(rINST, 1) # rINST<- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001782 ble a0, a3, MterpCommonTakenBranchNoFlags # compare (vA, vB)
1783 li t0, JIT_CHECK_OSR
1784 beq rPROFILE, t0, .L_check_not_taken_osr
1785 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
1786 GET_INST_OPCODE(t0) # extract opcode from rINST
1787 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung200f0402016-02-25 20:05:47 -08001788
1789
1790/* ------------------------------ */
1791 .balign 128
1792.L_op_if_eqz: /* 0x38 */
1793/* File: mips/op_if_eqz.S */
1794/* File: mips/zcmp.S */
1795 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001796 * Generic one-operand compare-and-branch operation. Provide a "condition"
1797 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001798 *
1799 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1800 */
1801 /* if-cmp vAA, +BBBB */
1802 GET_OPA(a0) # a0 <- AA
Douglas Leung020b18a2016-06-03 18:05:35 -07001803 GET_VREG(a0, a0) # a0 <- vAA
Douglas Leung200f0402016-02-25 20:05:47 -08001804 FETCH_S(rINST, 1) # rINST <- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001805 beq a0, zero, MterpCommonTakenBranchNoFlags
1806 li t0, JIT_CHECK_OSR # possible OSR re-entry?
1807 beq rPROFILE, t0, .L_check_not_taken_osr
1808 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -08001809 GET_INST_OPCODE(t0) # extract opcode from rINST
1810 GOTO_OPCODE(t0) # jump to next instruction
1811
1812
1813/* ------------------------------ */
1814 .balign 128
1815.L_op_if_nez: /* 0x39 */
1816/* File: mips/op_if_nez.S */
1817/* File: mips/zcmp.S */
1818 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001819 * Generic one-operand compare-and-branch operation. Provide a "condition"
1820 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001821 *
1822 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1823 */
1824 /* if-cmp vAA, +BBBB */
1825 GET_OPA(a0) # a0 <- AA
Douglas Leung020b18a2016-06-03 18:05:35 -07001826 GET_VREG(a0, a0) # a0 <- vAA
Douglas Leung200f0402016-02-25 20:05:47 -08001827 FETCH_S(rINST, 1) # rINST <- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001828 bne a0, zero, MterpCommonTakenBranchNoFlags
1829 li t0, JIT_CHECK_OSR # possible OSR re-entry?
1830 beq rPROFILE, t0, .L_check_not_taken_osr
1831 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -08001832 GET_INST_OPCODE(t0) # extract opcode from rINST
1833 GOTO_OPCODE(t0) # jump to next instruction
1834
1835
1836/* ------------------------------ */
1837 .balign 128
1838.L_op_if_ltz: /* 0x3a */
1839/* File: mips/op_if_ltz.S */
1840/* File: mips/zcmp.S */
1841 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001842 * Generic one-operand compare-and-branch operation. Provide a "condition"
1843 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001844 *
1845 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1846 */
1847 /* if-cmp vAA, +BBBB */
1848 GET_OPA(a0) # a0 <- AA
Douglas Leung020b18a2016-06-03 18:05:35 -07001849 GET_VREG(a0, a0) # a0 <- vAA
Douglas Leung200f0402016-02-25 20:05:47 -08001850 FETCH_S(rINST, 1) # rINST <- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001851 blt a0, zero, MterpCommonTakenBranchNoFlags
1852 li t0, JIT_CHECK_OSR # possible OSR re-entry?
1853 beq rPROFILE, t0, .L_check_not_taken_osr
1854 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -08001855 GET_INST_OPCODE(t0) # extract opcode from rINST
1856 GOTO_OPCODE(t0) # jump to next instruction
1857
1858
1859/* ------------------------------ */
1860 .balign 128
1861.L_op_if_gez: /* 0x3b */
1862/* File: mips/op_if_gez.S */
1863/* File: mips/zcmp.S */
1864 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001865 * Generic one-operand compare-and-branch operation. Provide a "condition"
1866 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001867 *
1868 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1869 */
1870 /* if-cmp vAA, +BBBB */
1871 GET_OPA(a0) # a0 <- AA
Douglas Leung020b18a2016-06-03 18:05:35 -07001872 GET_VREG(a0, a0) # a0 <- vAA
Douglas Leung200f0402016-02-25 20:05:47 -08001873 FETCH_S(rINST, 1) # rINST <- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001874 bge a0, zero, MterpCommonTakenBranchNoFlags
1875 li t0, JIT_CHECK_OSR # possible OSR re-entry?
1876 beq rPROFILE, t0, .L_check_not_taken_osr
1877 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -08001878 GET_INST_OPCODE(t0) # extract opcode from rINST
1879 GOTO_OPCODE(t0) # jump to next instruction
1880
1881
1882/* ------------------------------ */
1883 .balign 128
1884.L_op_if_gtz: /* 0x3c */
1885/* File: mips/op_if_gtz.S */
1886/* File: mips/zcmp.S */
1887 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001888 * Generic one-operand compare-and-branch operation. Provide a "condition"
1889 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001890 *
1891 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1892 */
1893 /* if-cmp vAA, +BBBB */
1894 GET_OPA(a0) # a0 <- AA
Douglas Leung020b18a2016-06-03 18:05:35 -07001895 GET_VREG(a0, a0) # a0 <- vAA
Douglas Leung200f0402016-02-25 20:05:47 -08001896 FETCH_S(rINST, 1) # rINST <- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001897 bgt a0, zero, MterpCommonTakenBranchNoFlags
1898 li t0, JIT_CHECK_OSR # possible OSR re-entry?
1899 beq rPROFILE, t0, .L_check_not_taken_osr
1900 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -08001901 GET_INST_OPCODE(t0) # extract opcode from rINST
1902 GOTO_OPCODE(t0) # jump to next instruction
1903
1904
1905/* ------------------------------ */
1906 .balign 128
1907.L_op_if_lez: /* 0x3d */
1908/* File: mips/op_if_lez.S */
1909/* File: mips/zcmp.S */
1910 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07001911 * Generic one-operand compare-and-branch operation. Provide a "condition"
1912 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08001913 *
1914 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1915 */
1916 /* if-cmp vAA, +BBBB */
1917 GET_OPA(a0) # a0 <- AA
Douglas Leung020b18a2016-06-03 18:05:35 -07001918 GET_VREG(a0, a0) # a0 <- vAA
Douglas Leung200f0402016-02-25 20:05:47 -08001919 FETCH_S(rINST, 1) # rINST <- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -07001920 ble a0, zero, MterpCommonTakenBranchNoFlags
1921 li t0, JIT_CHECK_OSR # possible OSR re-entry?
1922 beq rPROFILE, t0, .L_check_not_taken_osr
1923 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -08001924 GET_INST_OPCODE(t0) # extract opcode from rINST
1925 GOTO_OPCODE(t0) # jump to next instruction
1926
1927
1928/* ------------------------------ */
1929 .balign 128
1930.L_op_unused_3e: /* 0x3e */
1931/* File: mips/op_unused_3e.S */
1932/* File: mips/unused.S */
1933/*
1934 * Bail to reference interpreter to throw.
1935 */
1936 b MterpFallback
1937
1938
1939/* ------------------------------ */
1940 .balign 128
1941.L_op_unused_3f: /* 0x3f */
1942/* File: mips/op_unused_3f.S */
1943/* File: mips/unused.S */
1944/*
1945 * Bail to reference interpreter to throw.
1946 */
1947 b MterpFallback
1948
1949
1950/* ------------------------------ */
1951 .balign 128
1952.L_op_unused_40: /* 0x40 */
1953/* File: mips/op_unused_40.S */
1954/* File: mips/unused.S */
1955/*
1956 * Bail to reference interpreter to throw.
1957 */
1958 b MterpFallback
1959
1960
1961/* ------------------------------ */
1962 .balign 128
1963.L_op_unused_41: /* 0x41 */
1964/* File: mips/op_unused_41.S */
1965/* File: mips/unused.S */
1966/*
1967 * Bail to reference interpreter to throw.
1968 */
1969 b MterpFallback
1970
1971
1972/* ------------------------------ */
1973 .balign 128
1974.L_op_unused_42: /* 0x42 */
1975/* File: mips/op_unused_42.S */
1976/* File: mips/unused.S */
1977/*
1978 * Bail to reference interpreter to throw.
1979 */
1980 b MterpFallback
1981
1982
1983/* ------------------------------ */
1984 .balign 128
1985.L_op_unused_43: /* 0x43 */
1986/* File: mips/op_unused_43.S */
1987/* File: mips/unused.S */
1988/*
1989 * Bail to reference interpreter to throw.
1990 */
1991 b MterpFallback
1992
1993
1994/* ------------------------------ */
1995 .balign 128
1996.L_op_aget: /* 0x44 */
1997/* File: mips/op_aget.S */
1998 /*
1999 * Array get, 32 bits or less. vAA <- vBB[vCC].
2000 *
2001 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2002 * instructions. We use a pair of FETCH_Bs instead.
2003 *
2004 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
2005 *
2006 * NOTE: assumes data offset for arrays is the same for all non-wide types.
2007 * If this changes, specialize.
2008 */
2009 /* op vAA, vBB, vCC */
2010 FETCH_B(a2, 1, 0) # a2 <- BB
2011 GET_OPA(rOBJ) # rOBJ <- AA
2012 FETCH_B(a3, 1, 1) # a3 <- CC
2013 GET_VREG(a0, a2) # a0 <- vBB (array object)
2014 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2015 # null array object?
2016 beqz a0, common_errNullObject # yes, bail
2017 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2018 .if 2
2019 EASN(a0, a0, a1, 2) # a0 <- arrayObj + index*width
2020 .else
2021 addu a0, a0, a1
2022 .endif
2023 # a1 >= a3; compare unsigned index
2024 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2025 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2026 lw a2, MIRROR_INT_ARRAY_DATA_OFFSET(a0) # a2 <- vBB[vCC]
2027 GET_INST_OPCODE(t0) # extract opcode from rINST
2028 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2
2029
2030/* ------------------------------ */
2031 .balign 128
2032.L_op_aget_wide: /* 0x45 */
2033/* File: mips/op_aget_wide.S */
2034 /*
2035 * Array get, 64 bits. vAA <- vBB[vCC].
2036 *
2037 * Arrays of long/double are 64-bit aligned.
2038 */
2039 /* aget-wide vAA, vBB, vCC */
2040 FETCH(a0, 1) # a0 <- CCBB
2041 GET_OPA(rOBJ) # rOBJ <- AA
2042 and a2, a0, 255 # a2 <- BB
2043 srl a3, a0, 8 # a3 <- CC
2044 GET_VREG(a0, a2) # a0 <- vBB (array object)
2045 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2046 # null array object?
2047 beqz a0, common_errNullObject # yes, bail
2048 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2049 EAS3(a0, a0, a1) # a0 <- arrayObj + index*width
2050 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2051
2052 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2053 LOAD64_off(a2, a3, a0, MIRROR_WIDE_ARRAY_DATA_OFFSET)
2054 GET_INST_OPCODE(t0) # extract opcode from rINST
2055 SET_VREG64_GOTO(a2, a3, rOBJ, t0) # vAA/vAA+1 <- a2/a3
2056
2057/* ------------------------------ */
2058 .balign 128
2059.L_op_aget_object: /* 0x46 */
2060/* File: mips/op_aget_object.S */
2061 /*
2062 * Array object get. vAA <- vBB[vCC].
2063 *
2064 * for: aget-object
2065 */
2066 /* op vAA, vBB, vCC */
2067 FETCH_B(a2, 1, 0) # a2 <- BB
2068 GET_OPA(rOBJ) # rOBJ <- AA
2069 FETCH_B(a3, 1, 1) # a3 <- CC
2070 EXPORT_PC()
2071 GET_VREG(a0, a2) # a0 <- vBB (array object)
2072 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2073 JAL(artAGetObjectFromMterp) # v0 <- GetObj(array, index)
2074 lw a1, THREAD_EXCEPTION_OFFSET(rSELF)
2075 PREFETCH_INST(2) # load rINST
2076 bnez a1, MterpException
2077 SET_VREG_OBJECT(v0, rOBJ) # vAA <- v0
2078 ADVANCE(2) # advance rPC
2079 GET_INST_OPCODE(t0) # extract opcode from rINST
2080 GOTO_OPCODE(t0) # jump to next instruction
2081
2082/* ------------------------------ */
2083 .balign 128
2084.L_op_aget_boolean: /* 0x47 */
2085/* File: mips/op_aget_boolean.S */
2086/* File: mips/op_aget.S */
2087 /*
2088 * Array get, 32 bits or less. vAA <- vBB[vCC].
2089 *
2090 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2091 * instructions. We use a pair of FETCH_Bs instead.
2092 *
2093 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
2094 *
2095 * NOTE: assumes data offset for arrays is the same for all non-wide types.
2096 * If this changes, specialize.
2097 */
2098 /* op vAA, vBB, vCC */
2099 FETCH_B(a2, 1, 0) # a2 <- BB
2100 GET_OPA(rOBJ) # rOBJ <- AA
2101 FETCH_B(a3, 1, 1) # a3 <- CC
2102 GET_VREG(a0, a2) # a0 <- vBB (array object)
2103 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2104 # null array object?
2105 beqz a0, common_errNullObject # yes, bail
2106 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2107 .if 0
2108 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width
2109 .else
2110 addu a0, a0, a1
2111 .endif
2112 # a1 >= a3; compare unsigned index
2113 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2114 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2115 lbu a2, MIRROR_BOOLEAN_ARRAY_DATA_OFFSET(a0) # a2 <- vBB[vCC]
2116 GET_INST_OPCODE(t0) # extract opcode from rINST
2117 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2
2118
2119
2120/* ------------------------------ */
2121 .balign 128
2122.L_op_aget_byte: /* 0x48 */
2123/* File: mips/op_aget_byte.S */
2124/* File: mips/op_aget.S */
2125 /*
2126 * Array get, 32 bits or less. vAA <- vBB[vCC].
2127 *
2128 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2129 * instructions. We use a pair of FETCH_Bs instead.
2130 *
2131 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
2132 *
2133 * NOTE: assumes data offset for arrays is the same for all non-wide types.
2134 * If this changes, specialize.
2135 */
2136 /* op vAA, vBB, vCC */
2137 FETCH_B(a2, 1, 0) # a2 <- BB
2138 GET_OPA(rOBJ) # rOBJ <- AA
2139 FETCH_B(a3, 1, 1) # a3 <- CC
2140 GET_VREG(a0, a2) # a0 <- vBB (array object)
2141 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2142 # null array object?
2143 beqz a0, common_errNullObject # yes, bail
2144 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2145 .if 0
2146 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width
2147 .else
2148 addu a0, a0, a1
2149 .endif
2150 # a1 >= a3; compare unsigned index
2151 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2152 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2153 lb a2, MIRROR_BYTE_ARRAY_DATA_OFFSET(a0) # a2 <- vBB[vCC]
2154 GET_INST_OPCODE(t0) # extract opcode from rINST
2155 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2
2156
2157
2158/* ------------------------------ */
2159 .balign 128
2160.L_op_aget_char: /* 0x49 */
2161/* File: mips/op_aget_char.S */
2162/* File: mips/op_aget.S */
2163 /*
2164 * Array get, 32 bits or less. vAA <- vBB[vCC].
2165 *
2166 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2167 * instructions. We use a pair of FETCH_Bs instead.
2168 *
2169 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
2170 *
2171 * NOTE: assumes data offset for arrays is the same for all non-wide types.
2172 * If this changes, specialize.
2173 */
2174 /* op vAA, vBB, vCC */
2175 FETCH_B(a2, 1, 0) # a2 <- BB
2176 GET_OPA(rOBJ) # rOBJ <- AA
2177 FETCH_B(a3, 1, 1) # a3 <- CC
2178 GET_VREG(a0, a2) # a0 <- vBB (array object)
2179 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2180 # null array object?
2181 beqz a0, common_errNullObject # yes, bail
2182 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2183 .if 1
2184 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width
2185 .else
2186 addu a0, a0, a1
2187 .endif
2188 # a1 >= a3; compare unsigned index
2189 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2190 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2191 lhu a2, MIRROR_CHAR_ARRAY_DATA_OFFSET(a0) # a2 <- vBB[vCC]
2192 GET_INST_OPCODE(t0) # extract opcode from rINST
2193 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2
2194
2195
2196/* ------------------------------ */
2197 .balign 128
2198.L_op_aget_short: /* 0x4a */
2199/* File: mips/op_aget_short.S */
2200/* File: mips/op_aget.S */
2201 /*
2202 * Array get, 32 bits or less. vAA <- vBB[vCC].
2203 *
2204 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17
2205 * instructions. We use a pair of FETCH_Bs instead.
2206 *
2207 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
2208 *
2209 * NOTE: assumes data offset for arrays is the same for all non-wide types.
2210 * If this changes, specialize.
2211 */
2212 /* op vAA, vBB, vCC */
2213 FETCH_B(a2, 1, 0) # a2 <- BB
2214 GET_OPA(rOBJ) # rOBJ <- AA
2215 FETCH_B(a3, 1, 1) # a3 <- CC
2216 GET_VREG(a0, a2) # a0 <- vBB (array object)
2217 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2218 # null array object?
2219 beqz a0, common_errNullObject # yes, bail
2220 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2221 .if 1
2222 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width
2223 .else
2224 addu a0, a0, a1
2225 .endif
2226 # a1 >= a3; compare unsigned index
2227 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2228 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2229 lh a2, MIRROR_SHORT_ARRAY_DATA_OFFSET(a0) # a2 <- vBB[vCC]
2230 GET_INST_OPCODE(t0) # extract opcode from rINST
2231 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2
2232
2233
2234/* ------------------------------ */
2235 .balign 128
2236.L_op_aput: /* 0x4b */
2237/* File: mips/op_aput.S */
2238
2239 /*
2240 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2241 *
2242 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2243 *
2244 * NOTE: this assumes data offset for arrays is the same for all non-wide types.
2245 * If this changes, specialize.
2246 */
2247 /* op vAA, vBB, vCC */
2248 FETCH_B(a2, 1, 0) # a2 <- BB
2249 GET_OPA(rOBJ) # rOBJ <- AA
2250 FETCH_B(a3, 1, 1) # a3 <- CC
2251 GET_VREG(a0, a2) # a0 <- vBB (array object)
2252 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2253 # null array object?
2254 beqz a0, common_errNullObject # yes, bail
2255 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2256 .if 2
2257 EASN(a0, a0, a1, 2) # a0 <- arrayObj + index*width
2258 .else
2259 addu a0, a0, a1
2260 .endif
2261 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2262 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2263 GET_VREG(a2, rOBJ) # a2 <- vAA
2264 GET_INST_OPCODE(t0) # extract opcode from rINST
2265 sw a2, MIRROR_INT_ARRAY_DATA_OFFSET(a0) # vBB[vCC] <- a2
2266 GOTO_OPCODE(t0) # jump to next instruction
2267
2268/* ------------------------------ */
2269 .balign 128
2270.L_op_aput_wide: /* 0x4c */
2271/* File: mips/op_aput_wide.S */
2272 /*
2273 * Array put, 64 bits. vBB[vCC] <- vAA.
2274 *
2275 * Arrays of long/double are 64-bit aligned, so it's okay to use STRD.
2276 */
2277 /* aput-wide vAA, vBB, vCC */
2278 FETCH(a0, 1) # a0 <- CCBB
2279 GET_OPA(t0) # t0 <- AA
2280 and a2, a0, 255 # a2 <- BB
2281 srl a3, a0, 8 # a3 <- CC
2282 GET_VREG(a0, a2) # a0 <- vBB (array object)
2283 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2284 # null array object?
2285 beqz a0, common_errNullObject # yes, bail
2286 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2287 EAS3(a0, a0, a1) # a0 <- arrayObj + index*width
2288 EAS2(rOBJ, rFP, t0) # rOBJ <- &fp[AA]
2289 # compare unsigned index, length
2290 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2291
2292 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2293 LOAD64(a2, a3, rOBJ) # a2/a3 <- vAA/vAA+1
2294 GET_INST_OPCODE(t0) # extract opcode from rINST
2295 STORE64_off(a2, a3, a0, MIRROR_WIDE_ARRAY_DATA_OFFSET) # a2/a3 <- vBB[vCC]
2296 GOTO_OPCODE(t0) # jump to next instruction
2297
2298/* ------------------------------ */
2299 .balign 128
2300.L_op_aput_object: /* 0x4d */
2301/* File: mips/op_aput_object.S */
2302 /*
2303 * Store an object into an array. vBB[vCC] <- vAA.
2304 *
2305 */
2306 /* op vAA, vBB, vCC */
2307 EXPORT_PC()
2308 addu a0, rFP, OFF_FP_SHADOWFRAME
2309 move a1, rPC
2310 move a2, rINST
2311 JAL(MterpAputObject)
2312 beqz v0, MterpPossibleException
2313 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2314 GET_INST_OPCODE(t0) # extract opcode from rINST
2315 GOTO_OPCODE(t0) # jump to next instruction
2316
2317/* ------------------------------ */
2318 .balign 128
2319.L_op_aput_boolean: /* 0x4e */
2320/* File: mips/op_aput_boolean.S */
2321/* File: mips/op_aput.S */
2322
2323 /*
2324 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2325 *
2326 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2327 *
2328 * NOTE: this assumes data offset for arrays is the same for all non-wide types.
2329 * If this changes, specialize.
2330 */
2331 /* op vAA, vBB, vCC */
2332 FETCH_B(a2, 1, 0) # a2 <- BB
2333 GET_OPA(rOBJ) # rOBJ <- AA
2334 FETCH_B(a3, 1, 1) # a3 <- CC
2335 GET_VREG(a0, a2) # a0 <- vBB (array object)
2336 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2337 # null array object?
2338 beqz a0, common_errNullObject # yes, bail
2339 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2340 .if 0
2341 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width
2342 .else
2343 addu a0, a0, a1
2344 .endif
2345 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2346 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2347 GET_VREG(a2, rOBJ) # a2 <- vAA
2348 GET_INST_OPCODE(t0) # extract opcode from rINST
2349 sb a2, MIRROR_BOOLEAN_ARRAY_DATA_OFFSET(a0) # vBB[vCC] <- a2
2350 GOTO_OPCODE(t0) # jump to next instruction
2351
2352
2353/* ------------------------------ */
2354 .balign 128
2355.L_op_aput_byte: /* 0x4f */
2356/* File: mips/op_aput_byte.S */
2357/* File: mips/op_aput.S */
2358
2359 /*
2360 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2361 *
2362 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2363 *
2364 * NOTE: this assumes data offset for arrays is the same for all non-wide types.
2365 * If this changes, specialize.
2366 */
2367 /* op vAA, vBB, vCC */
2368 FETCH_B(a2, 1, 0) # a2 <- BB
2369 GET_OPA(rOBJ) # rOBJ <- AA
2370 FETCH_B(a3, 1, 1) # a3 <- CC
2371 GET_VREG(a0, a2) # a0 <- vBB (array object)
2372 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2373 # null array object?
2374 beqz a0, common_errNullObject # yes, bail
2375 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2376 .if 0
2377 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width
2378 .else
2379 addu a0, a0, a1
2380 .endif
2381 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2382 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2383 GET_VREG(a2, rOBJ) # a2 <- vAA
2384 GET_INST_OPCODE(t0) # extract opcode from rINST
2385 sb a2, MIRROR_BYTE_ARRAY_DATA_OFFSET(a0) # vBB[vCC] <- a2
2386 GOTO_OPCODE(t0) # jump to next instruction
2387
2388
2389/* ------------------------------ */
2390 .balign 128
2391.L_op_aput_char: /* 0x50 */
2392/* File: mips/op_aput_char.S */
2393/* File: mips/op_aput.S */
2394
2395 /*
2396 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2397 *
2398 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2399 *
2400 * NOTE: this assumes data offset for arrays is the same for all non-wide types.
2401 * If this changes, specialize.
2402 */
2403 /* op vAA, vBB, vCC */
2404 FETCH_B(a2, 1, 0) # a2 <- BB
2405 GET_OPA(rOBJ) # rOBJ <- AA
2406 FETCH_B(a3, 1, 1) # a3 <- CC
2407 GET_VREG(a0, a2) # a0 <- vBB (array object)
2408 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2409 # null array object?
2410 beqz a0, common_errNullObject # yes, bail
2411 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2412 .if 1
2413 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width
2414 .else
2415 addu a0, a0, a1
2416 .endif
2417 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2418 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2419 GET_VREG(a2, rOBJ) # a2 <- vAA
2420 GET_INST_OPCODE(t0) # extract opcode from rINST
2421 sh a2, MIRROR_CHAR_ARRAY_DATA_OFFSET(a0) # vBB[vCC] <- a2
2422 GOTO_OPCODE(t0) # jump to next instruction
2423
2424
2425/* ------------------------------ */
2426 .balign 128
2427.L_op_aput_short: /* 0x51 */
2428/* File: mips/op_aput_short.S */
2429/* File: mips/op_aput.S */
2430
2431 /*
2432 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2433 *
2434 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2435 *
2436 * NOTE: this assumes data offset for arrays is the same for all non-wide types.
2437 * If this changes, specialize.
2438 */
2439 /* op vAA, vBB, vCC */
2440 FETCH_B(a2, 1, 0) # a2 <- BB
2441 GET_OPA(rOBJ) # rOBJ <- AA
2442 FETCH_B(a3, 1, 1) # a3 <- CC
2443 GET_VREG(a0, a2) # a0 <- vBB (array object)
2444 GET_VREG(a1, a3) # a1 <- vCC (requested index)
2445 # null array object?
2446 beqz a0, common_errNullObject # yes, bail
2447 LOAD_base_offMirrorArray_length(a3, a0) # a3 <- arrayObj->length
2448 .if 1
2449 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width
2450 .else
2451 addu a0, a0, a1
2452 .endif
2453 bgeu a1, a3, common_errArrayIndex # index >= length, bail
2454 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2455 GET_VREG(a2, rOBJ) # a2 <- vAA
2456 GET_INST_OPCODE(t0) # extract opcode from rINST
2457 sh a2, MIRROR_SHORT_ARRAY_DATA_OFFSET(a0) # vBB[vCC] <- a2
2458 GOTO_OPCODE(t0) # jump to next instruction
2459
2460
2461/* ------------------------------ */
2462 .balign 128
2463.L_op_iget: /* 0x52 */
2464/* File: mips/op_iget.S */
2465 /*
2466 * General instance field get.
2467 *
2468 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2469 */
2470 EXPORT_PC()
2471 FETCH(a0, 1) # a0 <- field ref CCCC
2472 GET_OPB(a1) # a1 <- B
2473 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2474 lw a2, OFF_FP_METHOD(rFP) # a2 <- referrer
2475 move a3, rSELF # a3 <- self
2476 JAL(artGet32InstanceFromCode)
2477 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2478 GET_OPA4(a2) # a2<- A+
2479 PREFETCH_INST(2) # load rINST
2480 bnez a3, MterpPossibleException # bail out
2481 .if 0
2482 SET_VREG_OBJECT(v0, a2) # fp[A] <- v0
2483 .else
2484 SET_VREG(v0, a2) # fp[A] <- v0
2485 .endif
2486 ADVANCE(2) # advance rPC
2487 GET_INST_OPCODE(t0) # extract opcode from rINST
2488 GOTO_OPCODE(t0) # jump to next instruction
2489
2490/* ------------------------------ */
2491 .balign 128
2492.L_op_iget_wide: /* 0x53 */
2493/* File: mips/op_iget_wide.S */
2494 /*
2495 * 64-bit instance field get.
2496 *
2497 * for: iget-wide
2498 */
2499 EXPORT_PC()
2500 FETCH(a0, 1) # a0 <- field byte offset
2501 GET_OPB(a1) # a1 <- B
2502 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2503 lw a2, OFF_FP_METHOD(rFP) # a2 <- referrer
2504 move a3, rSELF # a3 <- self
2505 JAL(artGet64InstanceFromCode)
2506 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2507 GET_OPA4(a2) # a2<- A+
2508 PREFETCH_INST(2) # load rINST
2509 bnez a3, MterpException # bail out
2510 SET_VREG64(v0, v1, a2) # fp[A] <- v0/v1
2511 ADVANCE(2) # advance rPC
2512 GET_INST_OPCODE(t0) # extract opcode from rINST
2513 GOTO_OPCODE(t0) # jump to next instruction
2514
2515/* ------------------------------ */
2516 .balign 128
2517.L_op_iget_object: /* 0x54 */
2518/* File: mips/op_iget_object.S */
2519/* File: mips/op_iget.S */
2520 /*
2521 * General instance field get.
2522 *
2523 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2524 */
2525 EXPORT_PC()
2526 FETCH(a0, 1) # a0 <- field ref CCCC
2527 GET_OPB(a1) # a1 <- B
2528 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2529 lw a2, OFF_FP_METHOD(rFP) # a2 <- referrer
2530 move a3, rSELF # a3 <- self
2531 JAL(artGetObjInstanceFromCode)
2532 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2533 GET_OPA4(a2) # a2<- A+
2534 PREFETCH_INST(2) # load rINST
2535 bnez a3, MterpPossibleException # bail out
2536 .if 1
2537 SET_VREG_OBJECT(v0, a2) # fp[A] <- v0
2538 .else
2539 SET_VREG(v0, a2) # fp[A] <- v0
2540 .endif
2541 ADVANCE(2) # advance rPC
2542 GET_INST_OPCODE(t0) # extract opcode from rINST
2543 GOTO_OPCODE(t0) # jump to next instruction
2544
2545
2546/* ------------------------------ */
2547 .balign 128
2548.L_op_iget_boolean: /* 0x55 */
2549/* File: mips/op_iget_boolean.S */
2550/* File: mips/op_iget.S */
2551 /*
2552 * General instance field get.
2553 *
2554 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2555 */
2556 EXPORT_PC()
2557 FETCH(a0, 1) # a0 <- field ref CCCC
2558 GET_OPB(a1) # a1 <- B
2559 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2560 lw a2, OFF_FP_METHOD(rFP) # a2 <- referrer
2561 move a3, rSELF # a3 <- self
2562 JAL(artGetBooleanInstanceFromCode)
2563 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2564 GET_OPA4(a2) # a2<- A+
2565 PREFETCH_INST(2) # load rINST
2566 bnez a3, MterpPossibleException # bail out
2567 .if 0
2568 SET_VREG_OBJECT(v0, a2) # fp[A] <- v0
2569 .else
2570 SET_VREG(v0, a2) # fp[A] <- v0
2571 .endif
2572 ADVANCE(2) # advance rPC
2573 GET_INST_OPCODE(t0) # extract opcode from rINST
2574 GOTO_OPCODE(t0) # jump to next instruction
2575
2576
2577/* ------------------------------ */
2578 .balign 128
2579.L_op_iget_byte: /* 0x56 */
2580/* File: mips/op_iget_byte.S */
2581/* File: mips/op_iget.S */
2582 /*
2583 * General instance field get.
2584 *
2585 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2586 */
2587 EXPORT_PC()
2588 FETCH(a0, 1) # a0 <- field ref CCCC
2589 GET_OPB(a1) # a1 <- B
2590 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2591 lw a2, OFF_FP_METHOD(rFP) # a2 <- referrer
2592 move a3, rSELF # a3 <- self
2593 JAL(artGetByteInstanceFromCode)
2594 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2595 GET_OPA4(a2) # a2<- A+
2596 PREFETCH_INST(2) # load rINST
2597 bnez a3, MterpPossibleException # bail out
2598 .if 0
2599 SET_VREG_OBJECT(v0, a2) # fp[A] <- v0
2600 .else
2601 SET_VREG(v0, a2) # fp[A] <- v0
2602 .endif
2603 ADVANCE(2) # advance rPC
2604 GET_INST_OPCODE(t0) # extract opcode from rINST
2605 GOTO_OPCODE(t0) # jump to next instruction
2606
2607
2608/* ------------------------------ */
2609 .balign 128
2610.L_op_iget_char: /* 0x57 */
2611/* File: mips/op_iget_char.S */
2612/* File: mips/op_iget.S */
2613 /*
2614 * General instance field get.
2615 *
2616 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2617 */
2618 EXPORT_PC()
2619 FETCH(a0, 1) # a0 <- field ref CCCC
2620 GET_OPB(a1) # a1 <- B
2621 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2622 lw a2, OFF_FP_METHOD(rFP) # a2 <- referrer
2623 move a3, rSELF # a3 <- self
2624 JAL(artGetCharInstanceFromCode)
2625 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2626 GET_OPA4(a2) # a2<- A+
2627 PREFETCH_INST(2) # load rINST
2628 bnez a3, MterpPossibleException # bail out
2629 .if 0
2630 SET_VREG_OBJECT(v0, a2) # fp[A] <- v0
2631 .else
2632 SET_VREG(v0, a2) # fp[A] <- v0
2633 .endif
2634 ADVANCE(2) # advance rPC
2635 GET_INST_OPCODE(t0) # extract opcode from rINST
2636 GOTO_OPCODE(t0) # jump to next instruction
2637
2638
2639/* ------------------------------ */
2640 .balign 128
2641.L_op_iget_short: /* 0x58 */
2642/* File: mips/op_iget_short.S */
2643/* File: mips/op_iget.S */
2644 /*
2645 * General instance field get.
2646 *
2647 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2648 */
2649 EXPORT_PC()
2650 FETCH(a0, 1) # a0 <- field ref CCCC
2651 GET_OPB(a1) # a1 <- B
2652 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2653 lw a2, OFF_FP_METHOD(rFP) # a2 <- referrer
2654 move a3, rSELF # a3 <- self
2655 JAL(artGetShortInstanceFromCode)
2656 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2657 GET_OPA4(a2) # a2<- A+
2658 PREFETCH_INST(2) # load rINST
2659 bnez a3, MterpPossibleException # bail out
2660 .if 0
2661 SET_VREG_OBJECT(v0, a2) # fp[A] <- v0
2662 .else
2663 SET_VREG(v0, a2) # fp[A] <- v0
2664 .endif
2665 ADVANCE(2) # advance rPC
2666 GET_INST_OPCODE(t0) # extract opcode from rINST
2667 GOTO_OPCODE(t0) # jump to next instruction
2668
2669
2670/* ------------------------------ */
2671 .balign 128
2672.L_op_iput: /* 0x59 */
2673/* File: mips/op_iput.S */
2674 /*
2675 * General 32-bit instance field put.
2676 *
2677 * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2678 */
2679 # op vA, vB, field /* CCCC */
2680 .extern artSet32InstanceFromMterp
2681 EXPORT_PC()
2682 FETCH(a0, 1) # a0 <- field ref CCCC
2683 GET_OPB(a1) # a1 <- B
2684 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2685 GET_OPA4(a2) # a2 <- A+
2686 GET_VREG(a2, a2) # a2 <- fp[A]
2687 lw a3, OFF_FP_METHOD(rFP) # a3 <- referrer
2688 PREFETCH_INST(2) # load rINST
2689 JAL(artSet32InstanceFromMterp)
2690 bnez v0, MterpPossibleException # bail out
2691 ADVANCE(2) # advance rPC
2692 GET_INST_OPCODE(t0) # extract opcode from rINST
2693 GOTO_OPCODE(t0) # jump to next instruction
2694
2695/* ------------------------------ */
2696 .balign 128
2697.L_op_iput_wide: /* 0x5a */
2698/* File: mips/op_iput_wide.S */
2699 # iput-wide vA, vB, field /* CCCC */
2700 .extern artSet64InstanceFromMterp
2701 EXPORT_PC()
2702 FETCH(a0, 1) # a0 <- field ref CCCC
2703 GET_OPB(a1) # a1 <- B
2704 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2705 GET_OPA4(a2) # a2 <- A+
2706 EAS2(a2, rFP, a2) # a2 <- &fp[A]
2707 lw a3, OFF_FP_METHOD(rFP) # a3 <- referrer
2708 PREFETCH_INST(2) # load rINST
2709 JAL(artSet64InstanceFromMterp)
2710 bnez v0, MterpPossibleException # bail out
2711 ADVANCE(2) # advance rPC
2712 GET_INST_OPCODE(t0) # extract opcode from rINST
2713 GOTO_OPCODE(t0) # jump to next instruction
2714
2715/* ------------------------------ */
2716 .balign 128
2717.L_op_iput_object: /* 0x5b */
2718/* File: mips/op_iput_object.S */
2719 /*
2720 * 32-bit instance field put.
2721 *
2722 * for: iput-object, iput-object-volatile
2723 */
2724 # op vA, vB, field /* CCCC */
2725 EXPORT_PC()
2726 addu a0, rFP, OFF_FP_SHADOWFRAME
2727 move a1, rPC
2728 move a2, rINST
2729 move a3, rSELF
2730 JAL(MterpIputObject)
2731 beqz v0, MterpException
2732 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2733 GET_INST_OPCODE(t0) # extract opcode from rINST
2734 GOTO_OPCODE(t0) # jump to next instruction
2735
2736/* ------------------------------ */
2737 .balign 128
2738.L_op_iput_boolean: /* 0x5c */
2739/* File: mips/op_iput_boolean.S */
2740/* File: mips/op_iput.S */
2741 /*
2742 * General 32-bit instance field put.
2743 *
2744 * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2745 */
2746 # op vA, vB, field /* CCCC */
2747 .extern artSet8InstanceFromMterp
2748 EXPORT_PC()
2749 FETCH(a0, 1) # a0 <- field ref CCCC
2750 GET_OPB(a1) # a1 <- B
2751 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2752 GET_OPA4(a2) # a2 <- A+
2753 GET_VREG(a2, a2) # a2 <- fp[A]
2754 lw a3, OFF_FP_METHOD(rFP) # a3 <- referrer
2755 PREFETCH_INST(2) # load rINST
2756 JAL(artSet8InstanceFromMterp)
2757 bnez v0, MterpPossibleException # bail out
2758 ADVANCE(2) # advance rPC
2759 GET_INST_OPCODE(t0) # extract opcode from rINST
2760 GOTO_OPCODE(t0) # jump to next instruction
2761
2762
2763/* ------------------------------ */
2764 .balign 128
2765.L_op_iput_byte: /* 0x5d */
2766/* File: mips/op_iput_byte.S */
2767/* File: mips/op_iput.S */
2768 /*
2769 * General 32-bit instance field put.
2770 *
2771 * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2772 */
2773 # op vA, vB, field /* CCCC */
2774 .extern artSet8InstanceFromMterp
2775 EXPORT_PC()
2776 FETCH(a0, 1) # a0 <- field ref CCCC
2777 GET_OPB(a1) # a1 <- B
2778 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2779 GET_OPA4(a2) # a2 <- A+
2780 GET_VREG(a2, a2) # a2 <- fp[A]
2781 lw a3, OFF_FP_METHOD(rFP) # a3 <- referrer
2782 PREFETCH_INST(2) # load rINST
2783 JAL(artSet8InstanceFromMterp)
2784 bnez v0, MterpPossibleException # bail out
2785 ADVANCE(2) # advance rPC
2786 GET_INST_OPCODE(t0) # extract opcode from rINST
2787 GOTO_OPCODE(t0) # jump to next instruction
2788
2789
2790/* ------------------------------ */
2791 .balign 128
2792.L_op_iput_char: /* 0x5e */
2793/* File: mips/op_iput_char.S */
2794/* File: mips/op_iput.S */
2795 /*
2796 * General 32-bit instance field put.
2797 *
2798 * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2799 */
2800 # op vA, vB, field /* CCCC */
2801 .extern artSet16InstanceFromMterp
2802 EXPORT_PC()
2803 FETCH(a0, 1) # a0 <- field ref CCCC
2804 GET_OPB(a1) # a1 <- B
2805 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2806 GET_OPA4(a2) # a2 <- A+
2807 GET_VREG(a2, a2) # a2 <- fp[A]
2808 lw a3, OFF_FP_METHOD(rFP) # a3 <- referrer
2809 PREFETCH_INST(2) # load rINST
2810 JAL(artSet16InstanceFromMterp)
2811 bnez v0, MterpPossibleException # bail out
2812 ADVANCE(2) # advance rPC
2813 GET_INST_OPCODE(t0) # extract opcode from rINST
2814 GOTO_OPCODE(t0) # jump to next instruction
2815
2816
2817/* ------------------------------ */
2818 .balign 128
2819.L_op_iput_short: /* 0x5f */
2820/* File: mips/op_iput_short.S */
2821/* File: mips/op_iput.S */
2822 /*
2823 * General 32-bit instance field put.
2824 *
2825 * for: iput, iput-boolean, iput-byte, iput-char, iput-short
2826 */
2827 # op vA, vB, field /* CCCC */
2828 .extern artSet16InstanceFromMterp
2829 EXPORT_PC()
2830 FETCH(a0, 1) # a0 <- field ref CCCC
2831 GET_OPB(a1) # a1 <- B
2832 GET_VREG(a1, a1) # a1 <- fp[B], the object pointer
2833 GET_OPA4(a2) # a2 <- A+
2834 GET_VREG(a2, a2) # a2 <- fp[A]
2835 lw a3, OFF_FP_METHOD(rFP) # a3 <- referrer
2836 PREFETCH_INST(2) # load rINST
2837 JAL(artSet16InstanceFromMterp)
2838 bnez v0, MterpPossibleException # bail out
2839 ADVANCE(2) # advance rPC
2840 GET_INST_OPCODE(t0) # extract opcode from rINST
2841 GOTO_OPCODE(t0) # jump to next instruction
2842
2843
2844/* ------------------------------ */
2845 .balign 128
2846.L_op_sget: /* 0x60 */
2847/* File: mips/op_sget.S */
2848 /*
2849 * General SGET handler.
2850 *
2851 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2852 */
2853 # op vAA, field /* BBBB */
2854 .extern artGet32StaticFromCode
2855 EXPORT_PC()
2856 FETCH(a0, 1) # a0 <- field ref BBBB
2857 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
2858 move a2, rSELF # a2 <- self
2859 JAL(artGet32StaticFromCode)
2860 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2861 GET_OPA(a2) # a2 <- AA
2862 PREFETCH_INST(2)
2863 bnez a3, MterpException # bail out
2864.if 0
2865 SET_VREG_OBJECT(v0, a2) # fp[AA] <- v0
2866.else
2867 SET_VREG(v0, a2) # fp[AA] <- v0
2868.endif
2869 ADVANCE(2)
2870 GET_INST_OPCODE(t0) # extract opcode from rINST
2871 GOTO_OPCODE(t0) # jump to next instruction
2872
2873/* ------------------------------ */
2874 .balign 128
2875.L_op_sget_wide: /* 0x61 */
2876/* File: mips/op_sget_wide.S */
2877 /*
2878 * 64-bit SGET handler.
2879 */
2880 # sget-wide vAA, field /* BBBB */
2881 .extern artGet64StaticFromCode
2882 EXPORT_PC()
2883 FETCH(a0, 1) # a0 <- field ref BBBB
2884 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
2885 move a2, rSELF # a2 <- self
2886 JAL(artGet64StaticFromCode)
2887 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2888 bnez a3, MterpException
2889 GET_OPA(a1) # a1 <- AA
2890 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
2891 SET_VREG64(v0, v1, a1) # vAA/vAA+1 <- v0/v1
2892 GET_INST_OPCODE(t0) # extract opcode from rINST
2893 GOTO_OPCODE(t0) # jump to next instruction
2894
2895/* ------------------------------ */
2896 .balign 128
2897.L_op_sget_object: /* 0x62 */
2898/* File: mips/op_sget_object.S */
2899/* File: mips/op_sget.S */
2900 /*
2901 * General SGET handler.
2902 *
2903 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2904 */
2905 # op vAA, field /* BBBB */
2906 .extern artGetObjStaticFromCode
2907 EXPORT_PC()
2908 FETCH(a0, 1) # a0 <- field ref BBBB
2909 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
2910 move a2, rSELF # a2 <- self
2911 JAL(artGetObjStaticFromCode)
2912 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2913 GET_OPA(a2) # a2 <- AA
2914 PREFETCH_INST(2)
2915 bnez a3, MterpException # bail out
2916.if 1
2917 SET_VREG_OBJECT(v0, a2) # fp[AA] <- v0
2918.else
2919 SET_VREG(v0, a2) # fp[AA] <- v0
2920.endif
2921 ADVANCE(2)
2922 GET_INST_OPCODE(t0) # extract opcode from rINST
2923 GOTO_OPCODE(t0) # jump to next instruction
2924
2925
2926/* ------------------------------ */
2927 .balign 128
2928.L_op_sget_boolean: /* 0x63 */
2929/* File: mips/op_sget_boolean.S */
2930/* File: mips/op_sget.S */
2931 /*
2932 * General SGET handler.
2933 *
2934 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2935 */
2936 # op vAA, field /* BBBB */
2937 .extern artGetBooleanStaticFromCode
2938 EXPORT_PC()
2939 FETCH(a0, 1) # a0 <- field ref BBBB
2940 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
2941 move a2, rSELF # a2 <- self
2942 JAL(artGetBooleanStaticFromCode)
2943 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2944 GET_OPA(a2) # a2 <- AA
2945 PREFETCH_INST(2)
2946 bnez a3, MterpException # bail out
2947.if 0
2948 SET_VREG_OBJECT(v0, a2) # fp[AA] <- v0
2949.else
2950 SET_VREG(v0, a2) # fp[AA] <- v0
2951.endif
2952 ADVANCE(2)
2953 GET_INST_OPCODE(t0) # extract opcode from rINST
2954 GOTO_OPCODE(t0) # jump to next instruction
2955
2956
2957/* ------------------------------ */
2958 .balign 128
2959.L_op_sget_byte: /* 0x64 */
2960/* File: mips/op_sget_byte.S */
2961/* File: mips/op_sget.S */
2962 /*
2963 * General SGET handler.
2964 *
2965 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2966 */
2967 # op vAA, field /* BBBB */
2968 .extern artGetByteStaticFromCode
2969 EXPORT_PC()
2970 FETCH(a0, 1) # a0 <- field ref BBBB
2971 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
2972 move a2, rSELF # a2 <- self
2973 JAL(artGetByteStaticFromCode)
2974 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
2975 GET_OPA(a2) # a2 <- AA
2976 PREFETCH_INST(2)
2977 bnez a3, MterpException # bail out
2978.if 0
2979 SET_VREG_OBJECT(v0, a2) # fp[AA] <- v0
2980.else
2981 SET_VREG(v0, a2) # fp[AA] <- v0
2982.endif
2983 ADVANCE(2)
2984 GET_INST_OPCODE(t0) # extract opcode from rINST
2985 GOTO_OPCODE(t0) # jump to next instruction
2986
2987
2988/* ------------------------------ */
2989 .balign 128
2990.L_op_sget_char: /* 0x65 */
2991/* File: mips/op_sget_char.S */
2992/* File: mips/op_sget.S */
2993 /*
2994 * General SGET handler.
2995 *
2996 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2997 */
2998 # op vAA, field /* BBBB */
2999 .extern artGetCharStaticFromCode
3000 EXPORT_PC()
3001 FETCH(a0, 1) # a0 <- field ref BBBB
3002 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
3003 move a2, rSELF # a2 <- self
3004 JAL(artGetCharStaticFromCode)
3005 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
3006 GET_OPA(a2) # a2 <- AA
3007 PREFETCH_INST(2)
3008 bnez a3, MterpException # bail out
3009.if 0
3010 SET_VREG_OBJECT(v0, a2) # fp[AA] <- v0
3011.else
3012 SET_VREG(v0, a2) # fp[AA] <- v0
3013.endif
3014 ADVANCE(2)
3015 GET_INST_OPCODE(t0) # extract opcode from rINST
3016 GOTO_OPCODE(t0) # jump to next instruction
3017
3018
3019/* ------------------------------ */
3020 .balign 128
3021.L_op_sget_short: /* 0x66 */
3022/* File: mips/op_sget_short.S */
3023/* File: mips/op_sget.S */
3024 /*
3025 * General SGET handler.
3026 *
3027 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
3028 */
3029 # op vAA, field /* BBBB */
3030 .extern artGetShortStaticFromCode
3031 EXPORT_PC()
3032 FETCH(a0, 1) # a0 <- field ref BBBB
3033 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
3034 move a2, rSELF # a2 <- self
3035 JAL(artGetShortStaticFromCode)
3036 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
3037 GET_OPA(a2) # a2 <- AA
3038 PREFETCH_INST(2)
3039 bnez a3, MterpException # bail out
3040.if 0
3041 SET_VREG_OBJECT(v0, a2) # fp[AA] <- v0
3042.else
3043 SET_VREG(v0, a2) # fp[AA] <- v0
3044.endif
3045 ADVANCE(2)
3046 GET_INST_OPCODE(t0) # extract opcode from rINST
3047 GOTO_OPCODE(t0) # jump to next instruction
3048
3049
3050/* ------------------------------ */
3051 .balign 128
3052.L_op_sput: /* 0x67 */
3053/* File: mips/op_sput.S */
3054 /*
3055 * General SPUT handler.
3056 *
3057 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
3058 */
3059 # op vAA, field /* BBBB */
3060 EXPORT_PC()
3061 FETCH(a0, 1) # a0 <- field ref BBBB
3062 GET_OPA(a3) # a3 <- AA
3063 GET_VREG(a1, a3) # a1 <- fp[AA], the object pointer
3064 lw a2, OFF_FP_METHOD(rFP) # a2 <- method
3065 move a3, rSELF # a3 <- self
3066 PREFETCH_INST(2) # load rINST
3067 JAL(artSet32StaticFromCode)
3068 bnez v0, MterpException # bail out
3069 ADVANCE(2) # advance rPC
3070 GET_INST_OPCODE(t0) # extract opcode from rINST
3071 GOTO_OPCODE(t0) # jump to next instruction
3072
3073/* ------------------------------ */
3074 .balign 128
3075.L_op_sput_wide: /* 0x68 */
3076/* File: mips/op_sput_wide.S */
3077 /*
3078 * 64-bit SPUT handler.
3079 */
3080 # sput-wide vAA, field /* BBBB */
3081 .extern artSet64IndirectStaticFromMterp
3082 EXPORT_PC()
3083 FETCH(a0, 1) # a0 <- field ref CCCC
3084 lw a1, OFF_FP_METHOD(rFP) # a1 <- method
3085 GET_OPA(a2) # a2 <- AA
3086 EAS2(a2, rFP, a2) # a2 <- &fp[AA]
3087 move a3, rSELF # a3 <- self
3088 PREFETCH_INST(2) # load rINST
3089 JAL(artSet64IndirectStaticFromMterp)
3090 bnez v0, MterpException # bail out
3091 ADVANCE(2) # advance rPC
3092 GET_INST_OPCODE(t0) # extract opcode from rINST
3093 GOTO_OPCODE(t0) # jump to next instruction
3094
3095/* ------------------------------ */
3096 .balign 128
3097.L_op_sput_object: /* 0x69 */
3098/* File: mips/op_sput_object.S */
3099 /*
3100 * General 32-bit SPUT handler.
3101 *
3102 * for: sput-object,
3103 */
3104 /* op vAA, field@BBBB */
3105 EXPORT_PC()
3106 addu a0, rFP, OFF_FP_SHADOWFRAME
3107 move a1, rPC
3108 move a2, rINST
3109 move a3, rSELF
3110 JAL(MterpSputObject)
3111 beqz v0, MterpException
3112 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
3113 GET_INST_OPCODE(t0) # extract opcode from rINST
3114 GOTO_OPCODE(t0) # jump to next instruction
3115
3116/* ------------------------------ */
3117 .balign 128
3118.L_op_sput_boolean: /* 0x6a */
3119/* File: mips/op_sput_boolean.S */
3120/* File: mips/op_sput.S */
3121 /*
3122 * General SPUT handler.
3123 *
3124 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
3125 */
3126 # op vAA, field /* BBBB */
3127 EXPORT_PC()
3128 FETCH(a0, 1) # a0 <- field ref BBBB
3129 GET_OPA(a3) # a3 <- AA
3130 GET_VREG(a1, a3) # a1 <- fp[AA], the object pointer
3131 lw a2, OFF_FP_METHOD(rFP) # a2 <- method
3132 move a3, rSELF # a3 <- self
3133 PREFETCH_INST(2) # load rINST
3134 JAL(artSet8StaticFromCode)
3135 bnez v0, MterpException # bail out
3136 ADVANCE(2) # advance rPC
3137 GET_INST_OPCODE(t0) # extract opcode from rINST
3138 GOTO_OPCODE(t0) # jump to next instruction
3139
3140
3141/* ------------------------------ */
3142 .balign 128
3143.L_op_sput_byte: /* 0x6b */
3144/* File: mips/op_sput_byte.S */
3145/* File: mips/op_sput.S */
3146 /*
3147 * General SPUT handler.
3148 *
3149 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
3150 */
3151 # op vAA, field /* BBBB */
3152 EXPORT_PC()
3153 FETCH(a0, 1) # a0 <- field ref BBBB
3154 GET_OPA(a3) # a3 <- AA
3155 GET_VREG(a1, a3) # a1 <- fp[AA], the object pointer
3156 lw a2, OFF_FP_METHOD(rFP) # a2 <- method
3157 move a3, rSELF # a3 <- self
3158 PREFETCH_INST(2) # load rINST
3159 JAL(artSet8StaticFromCode)
3160 bnez v0, MterpException # bail out
3161 ADVANCE(2) # advance rPC
3162 GET_INST_OPCODE(t0) # extract opcode from rINST
3163 GOTO_OPCODE(t0) # jump to next instruction
3164
3165
3166/* ------------------------------ */
3167 .balign 128
3168.L_op_sput_char: /* 0x6c */
3169/* File: mips/op_sput_char.S */
3170/* File: mips/op_sput.S */
3171 /*
3172 * General SPUT handler.
3173 *
3174 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
3175 */
3176 # op vAA, field /* BBBB */
3177 EXPORT_PC()
3178 FETCH(a0, 1) # a0 <- field ref BBBB
3179 GET_OPA(a3) # a3 <- AA
3180 GET_VREG(a1, a3) # a1 <- fp[AA], the object pointer
3181 lw a2, OFF_FP_METHOD(rFP) # a2 <- method
3182 move a3, rSELF # a3 <- self
3183 PREFETCH_INST(2) # load rINST
3184 JAL(artSet16StaticFromCode)
3185 bnez v0, MterpException # bail out
3186 ADVANCE(2) # advance rPC
3187 GET_INST_OPCODE(t0) # extract opcode from rINST
3188 GOTO_OPCODE(t0) # jump to next instruction
3189
3190
3191/* ------------------------------ */
3192 .balign 128
3193.L_op_sput_short: /* 0x6d */
3194/* File: mips/op_sput_short.S */
3195/* File: mips/op_sput.S */
3196 /*
3197 * General SPUT handler.
3198 *
3199 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
3200 */
3201 # op vAA, field /* BBBB */
3202 EXPORT_PC()
3203 FETCH(a0, 1) # a0 <- field ref BBBB
3204 GET_OPA(a3) # a3 <- AA
3205 GET_VREG(a1, a3) # a1 <- fp[AA], the object pointer
3206 lw a2, OFF_FP_METHOD(rFP) # a2 <- method
3207 move a3, rSELF # a3 <- self
3208 PREFETCH_INST(2) # load rINST
3209 JAL(artSet16StaticFromCode)
3210 bnez v0, MterpException # bail out
3211 ADVANCE(2) # advance rPC
3212 GET_INST_OPCODE(t0) # extract opcode from rINST
3213 GOTO_OPCODE(t0) # jump to next instruction
3214
3215
3216/* ------------------------------ */
3217 .balign 128
3218.L_op_invoke_virtual: /* 0x6e */
3219/* File: mips/op_invoke_virtual.S */
3220/* File: mips/invoke.S */
3221 /*
3222 * Generic invoke handler wrapper.
3223 */
3224 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3225 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3226 .extern MterpInvokeVirtual
3227 EXPORT_PC()
3228 move a0, rSELF
3229 addu a1, rFP, OFF_FP_SHADOWFRAME
3230 move a2, rPC
3231 move a3, rINST
3232 JAL(MterpInvokeVirtual)
3233 beqz v0, MterpException
3234 FETCH_ADVANCE_INST(3)
3235 JAL(MterpShouldSwitchInterpreters)
3236 bnez v0, MterpFallback
3237 GET_INST_OPCODE(t0)
3238 GOTO_OPCODE(t0)
3239
3240
3241/* ------------------------------ */
3242 .balign 128
3243.L_op_invoke_super: /* 0x6f */
3244/* File: mips/op_invoke_super.S */
3245/* File: mips/invoke.S */
3246 /*
3247 * Generic invoke handler wrapper.
3248 */
3249 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3250 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3251 .extern MterpInvokeSuper
3252 EXPORT_PC()
3253 move a0, rSELF
3254 addu a1, rFP, OFF_FP_SHADOWFRAME
3255 move a2, rPC
3256 move a3, rINST
3257 JAL(MterpInvokeSuper)
3258 beqz v0, MterpException
3259 FETCH_ADVANCE_INST(3)
3260 JAL(MterpShouldSwitchInterpreters)
3261 bnez v0, MterpFallback
3262 GET_INST_OPCODE(t0)
3263 GOTO_OPCODE(t0)
3264
3265
3266/* ------------------------------ */
3267 .balign 128
3268.L_op_invoke_direct: /* 0x70 */
3269/* File: mips/op_invoke_direct.S */
3270/* File: mips/invoke.S */
3271 /*
3272 * Generic invoke handler wrapper.
3273 */
3274 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3275 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3276 .extern MterpInvokeDirect
3277 EXPORT_PC()
3278 move a0, rSELF
3279 addu a1, rFP, OFF_FP_SHADOWFRAME
3280 move a2, rPC
3281 move a3, rINST
3282 JAL(MterpInvokeDirect)
3283 beqz v0, MterpException
3284 FETCH_ADVANCE_INST(3)
3285 JAL(MterpShouldSwitchInterpreters)
3286 bnez v0, MterpFallback
3287 GET_INST_OPCODE(t0)
3288 GOTO_OPCODE(t0)
3289
3290
3291/* ------------------------------ */
3292 .balign 128
3293.L_op_invoke_static: /* 0x71 */
3294/* File: mips/op_invoke_static.S */
3295/* File: mips/invoke.S */
3296 /*
3297 * Generic invoke handler wrapper.
3298 */
3299 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3300 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3301 .extern MterpInvokeStatic
3302 EXPORT_PC()
3303 move a0, rSELF
3304 addu a1, rFP, OFF_FP_SHADOWFRAME
3305 move a2, rPC
3306 move a3, rINST
3307 JAL(MterpInvokeStatic)
3308 beqz v0, MterpException
3309 FETCH_ADVANCE_INST(3)
3310 JAL(MterpShouldSwitchInterpreters)
3311 bnez v0, MterpFallback
3312 GET_INST_OPCODE(t0)
3313 GOTO_OPCODE(t0)
3314
3315
3316/* ------------------------------ */
3317 .balign 128
3318.L_op_invoke_interface: /* 0x72 */
3319/* File: mips/op_invoke_interface.S */
3320/* File: mips/invoke.S */
3321 /*
3322 * Generic invoke handler wrapper.
3323 */
3324 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3325 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3326 .extern MterpInvokeInterface
3327 EXPORT_PC()
3328 move a0, rSELF
3329 addu a1, rFP, OFF_FP_SHADOWFRAME
3330 move a2, rPC
3331 move a3, rINST
3332 JAL(MterpInvokeInterface)
3333 beqz v0, MterpException
3334 FETCH_ADVANCE_INST(3)
3335 JAL(MterpShouldSwitchInterpreters)
3336 bnez v0, MterpFallback
3337 GET_INST_OPCODE(t0)
3338 GOTO_OPCODE(t0)
3339
3340
3341/* ------------------------------ */
3342 .balign 128
3343.L_op_return_void_no_barrier: /* 0x73 */
3344/* File: mips/op_return_void_no_barrier.S */
3345 lw ra, THREAD_FLAGS_OFFSET(rSELF)
3346 move a0, rSELF
3347 and ra, (THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST)
3348 beqz ra, 1f
3349 JAL(MterpSuspendCheck) # (self)
33501:
3351 move v0, zero
3352 move v1, zero
3353 b MterpReturn
3354
3355/* ------------------------------ */
3356 .balign 128
3357.L_op_invoke_virtual_range: /* 0x74 */
3358/* File: mips/op_invoke_virtual_range.S */
3359/* File: mips/invoke.S */
3360 /*
3361 * Generic invoke handler wrapper.
3362 */
3363 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3364 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3365 .extern MterpInvokeVirtualRange
3366 EXPORT_PC()
3367 move a0, rSELF
3368 addu a1, rFP, OFF_FP_SHADOWFRAME
3369 move a2, rPC
3370 move a3, rINST
3371 JAL(MterpInvokeVirtualRange)
3372 beqz v0, MterpException
3373 FETCH_ADVANCE_INST(3)
3374 JAL(MterpShouldSwitchInterpreters)
3375 bnez v0, MterpFallback
3376 GET_INST_OPCODE(t0)
3377 GOTO_OPCODE(t0)
3378
3379
3380/* ------------------------------ */
3381 .balign 128
3382.L_op_invoke_super_range: /* 0x75 */
3383/* File: mips/op_invoke_super_range.S */
3384/* File: mips/invoke.S */
3385 /*
3386 * Generic invoke handler wrapper.
3387 */
3388 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3389 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3390 .extern MterpInvokeSuperRange
3391 EXPORT_PC()
3392 move a0, rSELF
3393 addu a1, rFP, OFF_FP_SHADOWFRAME
3394 move a2, rPC
3395 move a3, rINST
3396 JAL(MterpInvokeSuperRange)
3397 beqz v0, MterpException
3398 FETCH_ADVANCE_INST(3)
3399 JAL(MterpShouldSwitchInterpreters)
3400 bnez v0, MterpFallback
3401 GET_INST_OPCODE(t0)
3402 GOTO_OPCODE(t0)
3403
3404
3405/* ------------------------------ */
3406 .balign 128
3407.L_op_invoke_direct_range: /* 0x76 */
3408/* File: mips/op_invoke_direct_range.S */
3409/* File: mips/invoke.S */
3410 /*
3411 * Generic invoke handler wrapper.
3412 */
3413 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3414 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3415 .extern MterpInvokeDirectRange
3416 EXPORT_PC()
3417 move a0, rSELF
3418 addu a1, rFP, OFF_FP_SHADOWFRAME
3419 move a2, rPC
3420 move a3, rINST
3421 JAL(MterpInvokeDirectRange)
3422 beqz v0, MterpException
3423 FETCH_ADVANCE_INST(3)
3424 JAL(MterpShouldSwitchInterpreters)
3425 bnez v0, MterpFallback
3426 GET_INST_OPCODE(t0)
3427 GOTO_OPCODE(t0)
3428
3429
3430/* ------------------------------ */
3431 .balign 128
3432.L_op_invoke_static_range: /* 0x77 */
3433/* File: mips/op_invoke_static_range.S */
3434/* File: mips/invoke.S */
3435 /*
3436 * Generic invoke handler wrapper.
3437 */
3438 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3439 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3440 .extern MterpInvokeStaticRange
3441 EXPORT_PC()
3442 move a0, rSELF
3443 addu a1, rFP, OFF_FP_SHADOWFRAME
3444 move a2, rPC
3445 move a3, rINST
3446 JAL(MterpInvokeStaticRange)
3447 beqz v0, MterpException
3448 FETCH_ADVANCE_INST(3)
3449 JAL(MterpShouldSwitchInterpreters)
3450 bnez v0, MterpFallback
3451 GET_INST_OPCODE(t0)
3452 GOTO_OPCODE(t0)
3453
3454
3455/* ------------------------------ */
3456 .balign 128
3457.L_op_invoke_interface_range: /* 0x78 */
3458/* File: mips/op_invoke_interface_range.S */
3459/* File: mips/invoke.S */
3460 /*
3461 * Generic invoke handler wrapper.
3462 */
3463 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
3464 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
3465 .extern MterpInvokeInterfaceRange
3466 EXPORT_PC()
3467 move a0, rSELF
3468 addu a1, rFP, OFF_FP_SHADOWFRAME
3469 move a2, rPC
3470 move a3, rINST
3471 JAL(MterpInvokeInterfaceRange)
3472 beqz v0, MterpException
3473 FETCH_ADVANCE_INST(3)
3474 JAL(MterpShouldSwitchInterpreters)
3475 bnez v0, MterpFallback
3476 GET_INST_OPCODE(t0)
3477 GOTO_OPCODE(t0)
3478
3479
3480/* ------------------------------ */
3481 .balign 128
3482.L_op_unused_79: /* 0x79 */
3483/* File: mips/op_unused_79.S */
3484/* File: mips/unused.S */
3485/*
3486 * Bail to reference interpreter to throw.
3487 */
3488 b MterpFallback
3489
3490
3491/* ------------------------------ */
3492 .balign 128
3493.L_op_unused_7a: /* 0x7a */
3494/* File: mips/op_unused_7a.S */
3495/* File: mips/unused.S */
3496/*
3497 * Bail to reference interpreter to throw.
3498 */
3499 b MterpFallback
3500
3501
3502/* ------------------------------ */
3503 .balign 128
3504.L_op_neg_int: /* 0x7b */
3505/* File: mips/op_neg_int.S */
3506/* File: mips/unop.S */
3507 /*
3508 * Generic 32-bit unary operation. Provide an "instr" line that
3509 * specifies an instruction that performs "result = op a0".
3510 * This could be a MIPS instruction or a function call.
3511 *
3512 * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3513 * int-to-byte, int-to-char, int-to-short
3514 */
3515 /* unop vA, vB */
3516 GET_OPB(a3) # a3 <- B
3517 GET_OPA4(t0) # t0 <- A+
3518 GET_VREG(a0, a3) # a0 <- vB
3519 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3520 # optional op
3521 negu a0, a0 # a0 <- op, a0-a3 changed
3522 GET_INST_OPCODE(t1) # extract opcode from rINST
3523 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0
3524 /* 9-10 instructions */
3525
3526
3527/* ------------------------------ */
3528 .balign 128
3529.L_op_not_int: /* 0x7c */
3530/* File: mips/op_not_int.S */
3531/* File: mips/unop.S */
3532 /*
3533 * Generic 32-bit unary operation. Provide an "instr" line that
3534 * specifies an instruction that performs "result = op a0".
3535 * This could be a MIPS instruction or a function call.
3536 *
3537 * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3538 * int-to-byte, int-to-char, int-to-short
3539 */
3540 /* unop vA, vB */
3541 GET_OPB(a3) # a3 <- B
3542 GET_OPA4(t0) # t0 <- A+
3543 GET_VREG(a0, a3) # a0 <- vB
3544 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3545 # optional op
3546 not a0, a0 # a0 <- op, a0-a3 changed
3547 GET_INST_OPCODE(t1) # extract opcode from rINST
3548 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0
3549 /* 9-10 instructions */
3550
3551
3552/* ------------------------------ */
3553 .balign 128
3554.L_op_neg_long: /* 0x7d */
3555/* File: mips/op_neg_long.S */
3556/* File: mips/unopWide.S */
3557 /*
3558 * Generic 64-bit unary operation. Provide an "instr" line that
3559 * specifies an instruction that performs "result = op a0/a1".
3560 * This could be MIPS instruction or a function call.
3561 *
3562 * For: neg-long, not-long, neg-double,
3563 */
3564 /* unop vA, vB */
3565 GET_OPA4(rOBJ) # rOBJ <- A+
3566 GET_OPB(a3) # a3 <- B
3567 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3568 LOAD64(a0, a1, a3) # a0/a1 <- vAA
3569 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3570 negu v0, a0 # optional op
3571 negu v1, a1; sltu a0, zero, v0; subu v1, v1, a0 # a0/a1 <- op, a2-a3 changed
3572 GET_INST_OPCODE(t0) # extract opcode from rINST
3573 SET_VREG64(v0, v1, rOBJ) # vAA <- a0/a1
3574 GOTO_OPCODE(t0) # jump to next instruction
3575 /* 12-13 instructions */
3576
3577
3578/* ------------------------------ */
3579 .balign 128
3580.L_op_not_long: /* 0x7e */
3581/* File: mips/op_not_long.S */
3582/* File: mips/unopWide.S */
3583 /*
3584 * Generic 64-bit unary operation. Provide an "instr" line that
3585 * specifies an instruction that performs "result = op a0/a1".
3586 * This could be MIPS instruction or a function call.
3587 *
3588 * For: neg-long, not-long, neg-double,
3589 */
3590 /* unop vA, vB */
3591 GET_OPA4(rOBJ) # rOBJ <- A+
3592 GET_OPB(a3) # a3 <- B
3593 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3594 LOAD64(a0, a1, a3) # a0/a1 <- vAA
3595 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3596 not a0, a0 # optional op
3597 not a1, a1 # a0/a1 <- op, a2-a3 changed
3598 GET_INST_OPCODE(t0) # extract opcode from rINST
3599 SET_VREG64(a0, a1, rOBJ) # vAA <- a0/a1
3600 GOTO_OPCODE(t0) # jump to next instruction
3601 /* 12-13 instructions */
3602
3603
3604/* ------------------------------ */
3605 .balign 128
3606.L_op_neg_float: /* 0x7f */
3607/* File: mips/op_neg_float.S */
3608/* File: mips/unop.S */
3609 /*
3610 * Generic 32-bit unary operation. Provide an "instr" line that
3611 * specifies an instruction that performs "result = op a0".
3612 * This could be a MIPS instruction or a function call.
3613 *
3614 * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3615 * int-to-byte, int-to-char, int-to-short
3616 */
3617 /* unop vA, vB */
3618 GET_OPB(a3) # a3 <- B
3619 GET_OPA4(t0) # t0 <- A+
3620 GET_VREG(a0, a3) # a0 <- vB
3621 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3622 # optional op
3623 addu a0, a0, 0x80000000 # a0 <- op, a0-a3 changed
3624 GET_INST_OPCODE(t1) # extract opcode from rINST
3625 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0
3626 /* 9-10 instructions */
3627
3628
3629/* ------------------------------ */
3630 .balign 128
3631.L_op_neg_double: /* 0x80 */
3632/* File: mips/op_neg_double.S */
3633/* File: mips/unopWide.S */
3634 /*
3635 * Generic 64-bit unary operation. Provide an "instr" line that
3636 * specifies an instruction that performs "result = op a0/a1".
3637 * This could be MIPS instruction or a function call.
3638 *
3639 * For: neg-long, not-long, neg-double,
3640 */
3641 /* unop vA, vB */
3642 GET_OPA4(rOBJ) # rOBJ <- A+
3643 GET_OPB(a3) # a3 <- B
3644 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3645 LOAD64(a0, a1, a3) # a0/a1 <- vAA
3646 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3647 # optional op
3648 addu a1, a1, 0x80000000 # a0/a1 <- op, a2-a3 changed
3649 GET_INST_OPCODE(t0) # extract opcode from rINST
3650 SET_VREG64(a0, a1, rOBJ) # vAA <- a0/a1
3651 GOTO_OPCODE(t0) # jump to next instruction
3652 /* 12-13 instructions */
3653
3654
3655/* ------------------------------ */
3656 .balign 128
3657.L_op_int_to_long: /* 0x81 */
3658/* File: mips/op_int_to_long.S */
3659/* File: mips/unopWider.S */
3660 /*
3661 * Generic 32bit-to-64bit unary operation. Provide an "instr" line
3662 * that specifies an instruction that performs "result = op a0", where
3663 * "result" is a 64-bit quantity in a0/a1.
3664 *
3665 * For: int-to-long
3666 */
3667 /* unop vA, vB */
3668 GET_OPA4(rOBJ) # rOBJ <- A+
3669 GET_OPB(a3) # a3 <- B
3670 GET_VREG(a0, a3) # a0 <- vB
3671 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3672 # optional op
3673 sra a1, a0, 31 # result <- op, a0-a3 changed
3674 GET_INST_OPCODE(t0) # extract opcode from rINST
3675 SET_VREG64(a0, a1, rOBJ) # vA/vA+1 <- a0/a1
3676 GOTO_OPCODE(t0) # jump to next instruction
3677 /* 10-11 instructions */
3678
3679
3680/* ------------------------------ */
3681 .balign 128
3682.L_op_int_to_float: /* 0x82 */
3683/* File: mips/op_int_to_float.S */
3684/* File: mips/funop.S */
3685 /*
3686 * Generic 32-bit unary operation. Provide an "instr" line that
3687 * specifies an instruction that performs "result = op a0".
3688 * This could be a MIPS instruction or a function call.
3689 *
3690 * for: int-to-float, float-to-int
3691 */
3692 /* unop vA, vB */
3693 GET_OPB(a3) # a3 <- B
3694 GET_OPA4(rOBJ) # t0 <- A+
3695 GET_VREG_F(fa0, a3)
3696 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3697 cvt.s.w fv0, fa0
3698
3699.Lop_int_to_float_set_vreg_f:
3700 SET_VREG_F(fv0, rOBJ)
3701 GET_INST_OPCODE(t1) # extract opcode from rINST
3702 GOTO_OPCODE(t1) # jump to next instruction
3703
3704
3705/* ------------------------------ */
3706 .balign 128
3707.L_op_int_to_double: /* 0x83 */
3708/* File: mips/op_int_to_double.S */
3709/* File: mips/funopWider.S */
3710 /*
3711 * Generic 32bit-to-64bit unary operation. Provide an "instr" line
3712 * that specifies an instruction that performs "result = op a0", where
3713 * "result" is a 64-bit quantity in a0/a1.
3714 *
3715 * For: int-to-double, float-to-long, float-to-double
3716 */
3717 /* unop vA, vB */
3718 GET_OPA4(rOBJ) # rOBJ <- A+
3719 GET_OPB(a3) # a3 <- B
3720 GET_VREG_F(fa0, a3)
3721 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3722 cvt.d.w fv0, fa0
3723
3724.Lop_int_to_double_set_vreg:
3725 SET_VREG64_F(fv0, fv0f, rOBJ) # vA/vA+1 <- a0/a1
3726 GET_INST_OPCODE(t0) # extract opcode from rINST
3727 GOTO_OPCODE(t0) # jump to next instruction
3728
3729
3730/* ------------------------------ */
3731 .balign 128
3732.L_op_long_to_int: /* 0x84 */
3733/* File: mips/op_long_to_int.S */
3734/* we ignore the high word, making this equivalent to a 32-bit reg move */
3735/* File: mips/op_move.S */
3736 /* for move, move-object, long-to-int */
3737 /* op vA, vB */
3738 GET_OPB(a1) # a1 <- B from 15:12
3739 GET_OPA4(a0) # a0 <- A from 11:8
3740 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3741 GET_VREG(a2, a1) # a2 <- fp[B]
3742 GET_INST_OPCODE(t0) # t0 <- opcode from rINST
3743 .if 0
3744 SET_VREG_OBJECT(a2, a0) # fp[A] <- a2
3745 .else
3746 SET_VREG(a2, a0) # fp[A] <- a2
3747 .endif
3748 GOTO_OPCODE(t0) # jump to next instruction
3749
3750
3751/* ------------------------------ */
3752 .balign 128
3753.L_op_long_to_float: /* 0x85 */
3754/* File: mips/op_long_to_float.S */
3755/* File: mips/unopNarrower.S */
3756 /*
3757 * Generic 64bit-to-32bit unary operation. Provide an "instr" line
3758 * that specifies an instruction that performs "result = op a0/a1", where
3759 * "result" is a 32-bit quantity in a0.
3760 *
3761 * For: long-to-float, double-to-int, double-to-float
3762 * If hard floating point support is available, use fa0 as the parameter,
3763 * except for long-to-float opcode.
3764 * (This would work for long-to-int, but that instruction is actually
3765 * an exact match for OP_MOVE.)
3766 */
3767 /* unop vA, vB */
3768 GET_OPB(a3) # a3 <- B
3769 GET_OPA4(rOBJ) # t1 <- A+
3770 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3771 LOAD64(rARG0, rARG1, a3)
3772 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3773 JAL(__floatdisf)
3774
3775.Lop_long_to_float_set_vreg_f:
3776 SET_VREG_F(fv0, rOBJ) # vA <- result0
3777 GET_INST_OPCODE(t0) # extract opcode from rINST
3778 GOTO_OPCODE(t0) # jump to next instruction
3779
3780
3781/* ------------------------------ */
3782 .balign 128
3783.L_op_long_to_double: /* 0x86 */
3784/* File: mips/op_long_to_double.S */
3785/* File: mips/funopWide.S */
3786 /*
3787 * Generic 64-bit unary operation. Provide an "instr" line that
3788 * specifies an instruction that performs "result = op a0/a1".
3789 * This could be a MIPS instruction or a function call.
3790 *
3791 * long-to-double, double-to-long
3792 */
3793 /* unop vA, vB */
3794 GET_OPA4(rOBJ) # t1 <- A+
3795 GET_OPB(a3) # a3 <- B
3796 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3797 LOAD64(rARG0, rARG1, a3)
3798 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3799 # optional op
3800 JAL(__floatdidf) # a0/a1 <- op, a2-a3 changed
3801
3802.Lop_long_to_double_set_vreg:
3803 SET_VREG64_F(fv0, fv0f, rOBJ) # vAA <- a0/a1
3804 GET_INST_OPCODE(t0) # extract opcode from rINST
3805 GOTO_OPCODE(t0) # jump to next instruction
3806 /* 12-13 instructions */
3807
3808
3809/* ------------------------------ */
3810 .balign 128
3811.L_op_float_to_int: /* 0x87 */
3812/* File: mips/op_float_to_int.S */
3813/* File: mips/funop.S */
3814 /*
3815 * Generic 32-bit unary operation. Provide an "instr" line that
3816 * specifies an instruction that performs "result = op a0".
3817 * This could be a MIPS instruction or a function call.
3818 *
3819 * for: int-to-float, float-to-int
3820 */
3821 /* unop vA, vB */
3822 GET_OPB(a3) # a3 <- B
3823 GET_OPA4(rOBJ) # t0 <- A+
3824 GET_VREG_F(fa0, a3)
3825 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3826 b f2i_doconv
3827
3828.Lop_float_to_int_set_vreg_f:
3829 SET_VREG_F(fv0, rOBJ)
3830 GET_INST_OPCODE(t1) # extract opcode from rINST
3831 GOTO_OPCODE(t1) # jump to next instruction
3832
3833
3834/* ------------------------------ */
3835 .balign 128
3836.L_op_float_to_long: /* 0x88 */
3837/* File: mips/op_float_to_long.S */
3838/* File: mips/funopWider.S */
3839 /*
3840 * Generic 32bit-to-64bit unary operation. Provide an "instr" line
3841 * that specifies an instruction that performs "result = op a0", where
3842 * "result" is a 64-bit quantity in a0/a1.
3843 *
3844 * For: int-to-double, float-to-long, float-to-double
3845 */
3846 /* unop vA, vB */
3847 GET_OPA4(rOBJ) # rOBJ <- A+
3848 GET_OPB(a3) # a3 <- B
3849 GET_VREG_F(fa0, a3)
3850 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3851 b f2l_doconv
3852
3853.Lop_float_to_long_set_vreg:
3854 SET_VREG64(rRESULT0, rRESULT1, rOBJ) # vA/vA+1 <- a0/a1
3855 GET_INST_OPCODE(t0) # extract opcode from rINST
3856 GOTO_OPCODE(t0) # jump to next instruction
3857
3858
3859/* ------------------------------ */
3860 .balign 128
3861.L_op_float_to_double: /* 0x89 */
3862/* File: mips/op_float_to_double.S */
3863/* File: mips/funopWider.S */
3864 /*
3865 * Generic 32bit-to-64bit unary operation. Provide an "instr" line
3866 * that specifies an instruction that performs "result = op a0", where
3867 * "result" is a 64-bit quantity in a0/a1.
3868 *
3869 * For: int-to-double, float-to-long, float-to-double
3870 */
3871 /* unop vA, vB */
3872 GET_OPA4(rOBJ) # rOBJ <- A+
3873 GET_OPB(a3) # a3 <- B
3874 GET_VREG_F(fa0, a3)
3875 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3876 cvt.d.s fv0, fa0
3877
3878.Lop_float_to_double_set_vreg:
3879 SET_VREG64_F(fv0, fv0f, rOBJ) # vA/vA+1 <- a0/a1
3880 GET_INST_OPCODE(t0) # extract opcode from rINST
3881 GOTO_OPCODE(t0) # jump to next instruction
3882
3883
3884/* ------------------------------ */
3885 .balign 128
3886.L_op_double_to_int: /* 0x8a */
3887/* File: mips/op_double_to_int.S */
3888/* File: mips/unopNarrower.S */
3889 /*
3890 * Generic 64bit-to-32bit unary operation. Provide an "instr" line
3891 * that specifies an instruction that performs "result = op a0/a1", where
3892 * "result" is a 32-bit quantity in a0.
3893 *
3894 * For: long-to-float, double-to-int, double-to-float
3895 * If hard floating point support is available, use fa0 as the parameter,
3896 * except for long-to-float opcode.
3897 * (This would work for long-to-int, but that instruction is actually
3898 * an exact match for OP_MOVE.)
3899 */
3900 /* unop vA, vB */
3901 GET_OPB(a3) # a3 <- B
3902 GET_OPA4(rOBJ) # t1 <- A+
3903 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3904 LOAD64_F(fa0, fa0f, a3)
3905 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3906 b d2i_doconv
3907
3908.Lop_double_to_int_set_vreg_f:
3909 SET_VREG_F(fv0, rOBJ) # vA <- result0
3910 GET_INST_OPCODE(t0) # extract opcode from rINST
3911 GOTO_OPCODE(t0) # jump to next instruction
3912
3913/*
3914 * Convert the double in a0/a1 to an int in a0.
3915 *
3916 * We have to clip values to int min/max per the specification. The
3917 * expected common case is a "reasonable" value that converts directly
3918 * to modest integer. The EABI convert function isn't doing this for us.
3919 */
3920
3921/* ------------------------------ */
3922 .balign 128
3923.L_op_double_to_long: /* 0x8b */
3924/* File: mips/op_double_to_long.S */
3925/* File: mips/funopWide.S */
3926 /*
3927 * Generic 64-bit unary operation. Provide an "instr" line that
3928 * specifies an instruction that performs "result = op a0/a1".
3929 * This could be a MIPS instruction or a function call.
3930 *
3931 * long-to-double, double-to-long
3932 */
3933 /* unop vA, vB */
3934 GET_OPA4(rOBJ) # t1 <- A+
3935 GET_OPB(a3) # a3 <- B
3936 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3937 LOAD64_F(fa0, fa0f, a3)
3938 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3939 # optional op
3940 b d2l_doconv # a0/a1 <- op, a2-a3 changed
3941
3942.Lop_double_to_long_set_vreg:
3943 SET_VREG64(rRESULT0, rRESULT1, rOBJ) # vAA <- a0/a1
3944 GET_INST_OPCODE(t0) # extract opcode from rINST
3945 GOTO_OPCODE(t0) # jump to next instruction
3946 /* 12-13 instructions */
3947
3948
3949/* ------------------------------ */
3950 .balign 128
3951.L_op_double_to_float: /* 0x8c */
3952/* File: mips/op_double_to_float.S */
3953/* File: mips/unopNarrower.S */
3954 /*
3955 * Generic 64bit-to-32bit unary operation. Provide an "instr" line
3956 * that specifies an instruction that performs "result = op a0/a1", where
3957 * "result" is a 32-bit quantity in a0.
3958 *
3959 * For: long-to-float, double-to-int, double-to-float
3960 * If hard floating point support is available, use fa0 as the parameter,
3961 * except for long-to-float opcode.
3962 * (This would work for long-to-int, but that instruction is actually
3963 * an exact match for OP_MOVE.)
3964 */
3965 /* unop vA, vB */
3966 GET_OPB(a3) # a3 <- B
3967 GET_OPA4(rOBJ) # t1 <- A+
3968 EAS2(a3, rFP, a3) # a3 <- &fp[B]
3969 LOAD64_F(fa0, fa0f, a3)
3970 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3971 cvt.s.d fv0, fa0
3972
3973.Lop_double_to_float_set_vreg_f:
3974 SET_VREG_F(fv0, rOBJ) # vA <- result0
3975 GET_INST_OPCODE(t0) # extract opcode from rINST
3976 GOTO_OPCODE(t0) # jump to next instruction
3977
3978
3979/* ------------------------------ */
3980 .balign 128
3981.L_op_int_to_byte: /* 0x8d */
3982/* File: mips/op_int_to_byte.S */
3983/* File: mips/unop.S */
3984 /*
3985 * Generic 32-bit unary operation. Provide an "instr" line that
3986 * specifies an instruction that performs "result = op a0".
3987 * This could be a MIPS instruction or a function call.
3988 *
3989 * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
3990 * int-to-byte, int-to-char, int-to-short
3991 */
3992 /* unop vA, vB */
3993 GET_OPB(a3) # a3 <- B
3994 GET_OPA4(t0) # t0 <- A+
3995 GET_VREG(a0, a3) # a0 <- vB
3996 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
3997 sll a0, a0, 24 # optional op
3998 sra a0, a0, 24 # a0 <- op, a0-a3 changed
3999 GET_INST_OPCODE(t1) # extract opcode from rINST
4000 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0
4001 /* 9-10 instructions */
4002
4003
4004/* ------------------------------ */
4005 .balign 128
4006.L_op_int_to_char: /* 0x8e */
4007/* File: mips/op_int_to_char.S */
4008/* File: mips/unop.S */
4009 /*
4010 * Generic 32-bit unary operation. Provide an "instr" line that
4011 * specifies an instruction that performs "result = op a0".
4012 * This could be a MIPS instruction or a function call.
4013 *
4014 * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
4015 * int-to-byte, int-to-char, int-to-short
4016 */
4017 /* unop vA, vB */
4018 GET_OPB(a3) # a3 <- B
4019 GET_OPA4(t0) # t0 <- A+
4020 GET_VREG(a0, a3) # a0 <- vB
4021 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
4022 # optional op
4023 and a0, 0xffff # a0 <- op, a0-a3 changed
4024 GET_INST_OPCODE(t1) # extract opcode from rINST
4025 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0
4026 /* 9-10 instructions */
4027
4028
4029/* ------------------------------ */
4030 .balign 128
4031.L_op_int_to_short: /* 0x8f */
4032/* File: mips/op_int_to_short.S */
4033/* File: mips/unop.S */
4034 /*
4035 * Generic 32-bit unary operation. Provide an "instr" line that
4036 * specifies an instruction that performs "result = op a0".
4037 * This could be a MIPS instruction or a function call.
4038 *
4039 * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
4040 * int-to-byte, int-to-char, int-to-short
4041 */
4042 /* unop vA, vB */
4043 GET_OPB(a3) # a3 <- B
4044 GET_OPA4(t0) # t0 <- A+
4045 GET_VREG(a0, a3) # a0 <- vB
4046 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
4047 sll a0, 16 # optional op
4048 sra a0, 16 # a0 <- op, a0-a3 changed
4049 GET_INST_OPCODE(t1) # extract opcode from rINST
4050 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0
4051 /* 9-10 instructions */
4052
4053
4054/* ------------------------------ */
4055 .balign 128
4056.L_op_add_int: /* 0x90 */
4057/* File: mips/op_add_int.S */
4058/* File: mips/binop.S */
4059 /*
4060 * Generic 32-bit binary operation. Provide an "instr" line that
4061 * specifies an instruction that performs "result = a0 op a1".
4062 * This could be a MIPS instruction or a function call. (If the result
4063 * comes back in a register other than a0, you can override "result".)
4064 *
4065 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4066 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004067 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4068 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004069 *
4070 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4071 * xor-int, shl-int, shr-int, ushr-int
4072 */
4073 /* binop vAA, vBB, vCC */
4074 FETCH(a0, 1) # a0 <- CCBB
4075 GET_OPA(rOBJ) # rOBJ <- AA
4076 srl a3, a0, 8 # a3 <- CC
4077 and a2, a0, 255 # a2 <- BB
4078 GET_VREG(a1, a3) # a1 <- vCC
4079 GET_VREG(a0, a2) # a0 <- vBB
4080 .if 0
4081 # is second operand zero?
4082 beqz a1, common_errDivideByZero
4083 .endif
4084
4085 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4086 # optional op
4087 addu a0, a0, a1 # a0 <- op, a0-a3 changed
4088 GET_INST_OPCODE(t0) # extract opcode from rINST
4089 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4090 /* 11-14 instructions */
4091
4092
4093/* ------------------------------ */
4094 .balign 128
4095.L_op_sub_int: /* 0x91 */
4096/* File: mips/op_sub_int.S */
4097/* File: mips/binop.S */
4098 /*
4099 * Generic 32-bit binary operation. Provide an "instr" line that
4100 * specifies an instruction that performs "result = a0 op a1".
4101 * This could be a MIPS instruction or a function call. (If the result
4102 * comes back in a register other than a0, you can override "result".)
4103 *
4104 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4105 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004106 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4107 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004108 *
4109 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4110 * xor-int, shl-int, shr-int, ushr-int
4111 */
4112 /* binop vAA, vBB, vCC */
4113 FETCH(a0, 1) # a0 <- CCBB
4114 GET_OPA(rOBJ) # rOBJ <- AA
4115 srl a3, a0, 8 # a3 <- CC
4116 and a2, a0, 255 # a2 <- BB
4117 GET_VREG(a1, a3) # a1 <- vCC
4118 GET_VREG(a0, a2) # a0 <- vBB
4119 .if 0
4120 # is second operand zero?
4121 beqz a1, common_errDivideByZero
4122 .endif
4123
4124 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4125 # optional op
4126 subu a0, a0, a1 # a0 <- op, a0-a3 changed
4127 GET_INST_OPCODE(t0) # extract opcode from rINST
4128 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4129 /* 11-14 instructions */
4130
4131
4132/* ------------------------------ */
4133 .balign 128
4134.L_op_mul_int: /* 0x92 */
4135/* File: mips/op_mul_int.S */
4136/* File: mips/binop.S */
4137 /*
4138 * Generic 32-bit binary operation. Provide an "instr" line that
4139 * specifies an instruction that performs "result = a0 op a1".
4140 * This could be a MIPS instruction or a function call. (If the result
4141 * comes back in a register other than a0, you can override "result".)
4142 *
4143 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4144 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004145 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4146 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004147 *
4148 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4149 * xor-int, shl-int, shr-int, ushr-int
4150 */
4151 /* binop vAA, vBB, vCC */
4152 FETCH(a0, 1) # a0 <- CCBB
4153 GET_OPA(rOBJ) # rOBJ <- AA
4154 srl a3, a0, 8 # a3 <- CC
4155 and a2, a0, 255 # a2 <- BB
4156 GET_VREG(a1, a3) # a1 <- vCC
4157 GET_VREG(a0, a2) # a0 <- vBB
4158 .if 0
4159 # is second operand zero?
4160 beqz a1, common_errDivideByZero
4161 .endif
4162
4163 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4164 # optional op
4165 mul a0, a0, a1 # a0 <- op, a0-a3 changed
4166 GET_INST_OPCODE(t0) # extract opcode from rINST
4167 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4168 /* 11-14 instructions */
4169
4170
4171/* ------------------------------ */
4172 .balign 128
4173.L_op_div_int: /* 0x93 */
4174/* File: mips/op_div_int.S */
4175#ifdef MIPS32REVGE6
4176/* File: mips/binop.S */
4177 /*
4178 * Generic 32-bit binary operation. Provide an "instr" line that
4179 * specifies an instruction that performs "result = a0 op a1".
4180 * This could be a MIPS instruction or a function call. (If the result
4181 * comes back in a register other than a0, you can override "result".)
4182 *
4183 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4184 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004185 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4186 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004187 *
4188 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4189 * xor-int, shl-int, shr-int, ushr-int
4190 */
4191 /* binop vAA, vBB, vCC */
4192 FETCH(a0, 1) # a0 <- CCBB
4193 GET_OPA(rOBJ) # rOBJ <- AA
4194 srl a3, a0, 8 # a3 <- CC
4195 and a2, a0, 255 # a2 <- BB
4196 GET_VREG(a1, a3) # a1 <- vCC
4197 GET_VREG(a0, a2) # a0 <- vBB
4198 .if 1
4199 # is second operand zero?
4200 beqz a1, common_errDivideByZero
4201 .endif
4202
4203 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4204 # optional op
4205 div a0, a0, a1 # a0 <- op, a0-a3 changed
4206 GET_INST_OPCODE(t0) # extract opcode from rINST
4207 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4208 /* 11-14 instructions */
4209
4210#else
4211/* File: mips/binop.S */
4212 /*
4213 * Generic 32-bit binary operation. Provide an "instr" line that
4214 * specifies an instruction that performs "result = a0 op a1".
4215 * This could be a MIPS instruction or a function call. (If the result
4216 * comes back in a register other than a0, you can override "result".)
4217 *
4218 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4219 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004220 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4221 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004222 *
4223 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4224 * xor-int, shl-int, shr-int, ushr-int
4225 */
4226 /* binop vAA, vBB, vCC */
4227 FETCH(a0, 1) # a0 <- CCBB
4228 GET_OPA(rOBJ) # rOBJ <- AA
4229 srl a3, a0, 8 # a3 <- CC
4230 and a2, a0, 255 # a2 <- BB
4231 GET_VREG(a1, a3) # a1 <- vCC
4232 GET_VREG(a0, a2) # a0 <- vBB
4233 .if 1
4234 # is second operand zero?
4235 beqz a1, common_errDivideByZero
4236 .endif
4237
4238 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4239 div zero, a0, a1 # optional op
4240 mflo a0 # a0 <- op, a0-a3 changed
4241 GET_INST_OPCODE(t0) # extract opcode from rINST
4242 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4243 /* 11-14 instructions */
4244
4245#endif
4246
4247/* ------------------------------ */
4248 .balign 128
4249.L_op_rem_int: /* 0x94 */
4250/* File: mips/op_rem_int.S */
4251#ifdef MIPS32REVGE6
4252/* File: mips/binop.S */
4253 /*
4254 * Generic 32-bit binary operation. Provide an "instr" line that
4255 * specifies an instruction that performs "result = a0 op a1".
4256 * This could be a MIPS instruction or a function call. (If the result
4257 * comes back in a register other than a0, you can override "result".)
4258 *
4259 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4260 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004261 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4262 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004263 *
4264 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4265 * xor-int, shl-int, shr-int, ushr-int
4266 */
4267 /* binop vAA, vBB, vCC */
4268 FETCH(a0, 1) # a0 <- CCBB
4269 GET_OPA(rOBJ) # rOBJ <- AA
4270 srl a3, a0, 8 # a3 <- CC
4271 and a2, a0, 255 # a2 <- BB
4272 GET_VREG(a1, a3) # a1 <- vCC
4273 GET_VREG(a0, a2) # a0 <- vBB
4274 .if 1
4275 # is second operand zero?
4276 beqz a1, common_errDivideByZero
4277 .endif
4278
4279 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4280 # optional op
4281 mod a0, a0, a1 # a0 <- op, a0-a3 changed
4282 GET_INST_OPCODE(t0) # extract opcode from rINST
4283 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4284 /* 11-14 instructions */
4285
4286#else
4287/* File: mips/binop.S */
4288 /*
4289 * Generic 32-bit binary operation. Provide an "instr" line that
4290 * specifies an instruction that performs "result = a0 op a1".
4291 * This could be a MIPS instruction or a function call. (If the result
4292 * comes back in a register other than a0, you can override "result".)
4293 *
4294 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4295 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004296 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4297 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004298 *
4299 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4300 * xor-int, shl-int, shr-int, ushr-int
4301 */
4302 /* binop vAA, vBB, vCC */
4303 FETCH(a0, 1) # a0 <- CCBB
4304 GET_OPA(rOBJ) # rOBJ <- AA
4305 srl a3, a0, 8 # a3 <- CC
4306 and a2, a0, 255 # a2 <- BB
4307 GET_VREG(a1, a3) # a1 <- vCC
4308 GET_VREG(a0, a2) # a0 <- vBB
4309 .if 1
4310 # is second operand zero?
4311 beqz a1, common_errDivideByZero
4312 .endif
4313
4314 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4315 div zero, a0, a1 # optional op
4316 mfhi a0 # a0 <- op, a0-a3 changed
4317 GET_INST_OPCODE(t0) # extract opcode from rINST
4318 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4319 /* 11-14 instructions */
4320
4321#endif
4322
4323/* ------------------------------ */
4324 .balign 128
4325.L_op_and_int: /* 0x95 */
4326/* File: mips/op_and_int.S */
4327/* File: mips/binop.S */
4328 /*
4329 * Generic 32-bit binary operation. Provide an "instr" line that
4330 * specifies an instruction that performs "result = a0 op a1".
4331 * This could be a MIPS instruction or a function call. (If the result
4332 * comes back in a register other than a0, you can override "result".)
4333 *
4334 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4335 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004336 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4337 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004338 *
4339 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4340 * xor-int, shl-int, shr-int, ushr-int
4341 */
4342 /* binop vAA, vBB, vCC */
4343 FETCH(a0, 1) # a0 <- CCBB
4344 GET_OPA(rOBJ) # rOBJ <- AA
4345 srl a3, a0, 8 # a3 <- CC
4346 and a2, a0, 255 # a2 <- BB
4347 GET_VREG(a1, a3) # a1 <- vCC
4348 GET_VREG(a0, a2) # a0 <- vBB
4349 .if 0
4350 # is second operand zero?
4351 beqz a1, common_errDivideByZero
4352 .endif
4353
4354 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4355 # optional op
4356 and a0, a0, a1 # a0 <- op, a0-a3 changed
4357 GET_INST_OPCODE(t0) # extract opcode from rINST
4358 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4359 /* 11-14 instructions */
4360
4361
4362/* ------------------------------ */
4363 .balign 128
4364.L_op_or_int: /* 0x96 */
4365/* File: mips/op_or_int.S */
4366/* File: mips/binop.S */
4367 /*
4368 * Generic 32-bit binary operation. Provide an "instr" line that
4369 * specifies an instruction that performs "result = a0 op a1".
4370 * This could be a MIPS instruction or a function call. (If the result
4371 * comes back in a register other than a0, you can override "result".)
4372 *
4373 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4374 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004375 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4376 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004377 *
4378 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4379 * xor-int, shl-int, shr-int, ushr-int
4380 */
4381 /* binop vAA, vBB, vCC */
4382 FETCH(a0, 1) # a0 <- CCBB
4383 GET_OPA(rOBJ) # rOBJ <- AA
4384 srl a3, a0, 8 # a3 <- CC
4385 and a2, a0, 255 # a2 <- BB
4386 GET_VREG(a1, a3) # a1 <- vCC
4387 GET_VREG(a0, a2) # a0 <- vBB
4388 .if 0
4389 # is second operand zero?
4390 beqz a1, common_errDivideByZero
4391 .endif
4392
4393 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4394 # optional op
4395 or a0, a0, a1 # a0 <- op, a0-a3 changed
4396 GET_INST_OPCODE(t0) # extract opcode from rINST
4397 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4398 /* 11-14 instructions */
4399
4400
4401/* ------------------------------ */
4402 .balign 128
4403.L_op_xor_int: /* 0x97 */
4404/* File: mips/op_xor_int.S */
4405/* File: mips/binop.S */
4406 /*
4407 * Generic 32-bit binary operation. Provide an "instr" line that
4408 * specifies an instruction that performs "result = a0 op a1".
4409 * This could be a MIPS instruction or a function call. (If the result
4410 * comes back in a register other than a0, you can override "result".)
4411 *
4412 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4413 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004414 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4415 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004416 *
4417 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4418 * xor-int, shl-int, shr-int, ushr-int
4419 */
4420 /* binop vAA, vBB, vCC */
4421 FETCH(a0, 1) # a0 <- CCBB
4422 GET_OPA(rOBJ) # rOBJ <- AA
4423 srl a3, a0, 8 # a3 <- CC
4424 and a2, a0, 255 # a2 <- BB
4425 GET_VREG(a1, a3) # a1 <- vCC
4426 GET_VREG(a0, a2) # a0 <- vBB
4427 .if 0
4428 # is second operand zero?
4429 beqz a1, common_errDivideByZero
4430 .endif
4431
4432 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4433 # optional op
4434 xor a0, a0, a1 # a0 <- op, a0-a3 changed
4435 GET_INST_OPCODE(t0) # extract opcode from rINST
4436 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4437 /* 11-14 instructions */
4438
4439
4440/* ------------------------------ */
4441 .balign 128
4442.L_op_shl_int: /* 0x98 */
4443/* File: mips/op_shl_int.S */
4444/* File: mips/binop.S */
4445 /*
4446 * Generic 32-bit binary operation. Provide an "instr" line that
4447 * specifies an instruction that performs "result = a0 op a1".
4448 * This could be a MIPS instruction or a function call. (If the result
4449 * comes back in a register other than a0, you can override "result".)
4450 *
4451 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4452 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004453 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4454 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004455 *
4456 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4457 * xor-int, shl-int, shr-int, ushr-int
4458 */
4459 /* binop vAA, vBB, vCC */
4460 FETCH(a0, 1) # a0 <- CCBB
4461 GET_OPA(rOBJ) # rOBJ <- AA
4462 srl a3, a0, 8 # a3 <- CC
4463 and a2, a0, 255 # a2 <- BB
4464 GET_VREG(a1, a3) # a1 <- vCC
4465 GET_VREG(a0, a2) # a0 <- vBB
4466 .if 0
4467 # is second operand zero?
4468 beqz a1, common_errDivideByZero
4469 .endif
4470
4471 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4472 # optional op
4473 sll a0, a0, a1 # a0 <- op, a0-a3 changed
4474 GET_INST_OPCODE(t0) # extract opcode from rINST
4475 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4476 /* 11-14 instructions */
4477
4478
4479/* ------------------------------ */
4480 .balign 128
4481.L_op_shr_int: /* 0x99 */
4482/* File: mips/op_shr_int.S */
4483/* File: mips/binop.S */
4484 /*
4485 * Generic 32-bit binary operation. Provide an "instr" line that
4486 * specifies an instruction that performs "result = a0 op a1".
4487 * This could be a MIPS instruction or a function call. (If the result
4488 * comes back in a register other than a0, you can override "result".)
4489 *
4490 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4491 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004492 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4493 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004494 *
4495 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4496 * xor-int, shl-int, shr-int, ushr-int
4497 */
4498 /* binop vAA, vBB, vCC */
4499 FETCH(a0, 1) # a0 <- CCBB
4500 GET_OPA(rOBJ) # rOBJ <- AA
4501 srl a3, a0, 8 # a3 <- CC
4502 and a2, a0, 255 # a2 <- BB
4503 GET_VREG(a1, a3) # a1 <- vCC
4504 GET_VREG(a0, a2) # a0 <- vBB
4505 .if 0
4506 # is second operand zero?
4507 beqz a1, common_errDivideByZero
4508 .endif
4509
4510 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4511 # optional op
4512 sra a0, a0, a1 # a0 <- op, a0-a3 changed
4513 GET_INST_OPCODE(t0) # extract opcode from rINST
4514 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4515 /* 11-14 instructions */
4516
4517
4518/* ------------------------------ */
4519 .balign 128
4520.L_op_ushr_int: /* 0x9a */
4521/* File: mips/op_ushr_int.S */
4522/* File: mips/binop.S */
4523 /*
4524 * Generic 32-bit binary operation. Provide an "instr" line that
4525 * specifies an instruction that performs "result = a0 op a1".
4526 * This could be a MIPS instruction or a function call. (If the result
4527 * comes back in a register other than a0, you can override "result".)
4528 *
4529 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4530 * vCC (a1). Useful for integer division and modulus. Note that we
buzbeeace690f2016-03-11 09:51:11 -08004531 * *don't* check for (INT_MIN / -1) here, because the CPU handles it
4532 * correctly.
Douglas Leung200f0402016-02-25 20:05:47 -08004533 *
4534 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int,
4535 * xor-int, shl-int, shr-int, ushr-int
4536 */
4537 /* binop vAA, vBB, vCC */
4538 FETCH(a0, 1) # a0 <- CCBB
4539 GET_OPA(rOBJ) # rOBJ <- AA
4540 srl a3, a0, 8 # a3 <- CC
4541 and a2, a0, 255 # a2 <- BB
4542 GET_VREG(a1, a3) # a1 <- vCC
4543 GET_VREG(a0, a2) # a0 <- vBB
4544 .if 0
4545 # is second operand zero?
4546 beqz a1, common_errDivideByZero
4547 .endif
4548
4549 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4550 # optional op
4551 srl a0, a0, a1 # a0 <- op, a0-a3 changed
4552 GET_INST_OPCODE(t0) # extract opcode from rINST
4553 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
4554 /* 11-14 instructions */
4555
4556
4557/* ------------------------------ */
4558 .balign 128
4559.L_op_add_long: /* 0x9b */
4560/* File: mips/op_add_long.S */
4561/*
4562 * The compiler generates the following sequence for
4563 * [v1 v0] = [a1 a0] + [a3 a2];
4564 * addu v0,a2,a0
4565 * addu a1,a3,a1
4566 * sltu v1,v0,a2
4567 * addu v1,v1,a1
4568 */
4569/* File: mips/binopWide.S */
4570 /*
4571 * Generic 64-bit binary operation. Provide an "instr" line that
4572 * specifies an instruction that performs "result = a0-a1 op a2-a3".
4573 * This could be a MIPS instruction or a function call. (If the result
4574 * comes back in a register other than a0, you can override "result".)
4575 *
4576 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4577 * vCC (a1). Useful for integer division and modulus.
4578 *
4579 * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4580 * xor-long
4581 *
4582 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4583 */
4584 /* binop vAA, vBB, vCC */
4585 FETCH(a0, 1) # a0 <- CCBB
4586 GET_OPA(rOBJ) # rOBJ <- AA
4587 and a2, a0, 255 # a2 <- BB
4588 srl a3, a0, 8 # a3 <- CC
4589 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
4590 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
4591 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
4592 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4593 .if 0
4594 or t0, a2, a3 # second arg (a2-a3) is zero?
4595 beqz t0, common_errDivideByZero
4596 .endif
4597 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4598
4599 addu v0, a2, a0 # optional op
4600 addu a1, a3, a1; sltu v1, v0, a2; addu v1, v1, a1 # result <- op, a0-a3 changed
4601 GET_INST_OPCODE(t0) # extract opcode from rINST
4602 SET_VREG64_GOTO(v0, v1, rOBJ, t0) # vAA/vAA+1 <- v0/v1
4603 /* 14-17 instructions */
4604
4605
4606/* ------------------------------ */
4607 .balign 128
4608.L_op_sub_long: /* 0x9c */
4609/* File: mips/op_sub_long.S */
4610/*
4611 * For little endian the code sequence looks as follows:
4612 * subu v0,a0,a2
4613 * subu v1,a1,a3
4614 * sltu a0,a0,v0
4615 * subu v1,v1,a0
4616 */
4617/* File: mips/binopWide.S */
4618 /*
4619 * Generic 64-bit binary operation. Provide an "instr" line that
4620 * specifies an instruction that performs "result = a0-a1 op a2-a3".
4621 * This could be a MIPS instruction or a function call. (If the result
4622 * comes back in a register other than a0, you can override "result".)
4623 *
4624 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4625 * vCC (a1). Useful for integer division and modulus.
4626 *
4627 * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4628 * xor-long
4629 *
4630 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4631 */
4632 /* binop vAA, vBB, vCC */
4633 FETCH(a0, 1) # a0 <- CCBB
4634 GET_OPA(rOBJ) # rOBJ <- AA
4635 and a2, a0, 255 # a2 <- BB
4636 srl a3, a0, 8 # a3 <- CC
4637 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
4638 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
4639 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
4640 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4641 .if 0
4642 or t0, a2, a3 # second arg (a2-a3) is zero?
4643 beqz t0, common_errDivideByZero
4644 .endif
4645 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4646
4647 subu v0, a0, a2 # optional op
4648 subu v1, a1, a3; sltu a0, a0, v0; subu v1, v1, a0 # result <- op, a0-a3 changed
4649 GET_INST_OPCODE(t0) # extract opcode from rINST
4650 SET_VREG64_GOTO(v0, v1, rOBJ, t0) # vAA/vAA+1 <- v0/v1
4651 /* 14-17 instructions */
4652
4653
4654/* ------------------------------ */
4655 .balign 128
4656.L_op_mul_long: /* 0x9d */
4657/* File: mips/op_mul_long.S */
4658 /*
4659 * Signed 64-bit integer multiply.
4660 * a1 a0
4661 * x a3 a2
4662 * -------------
4663 * a2a1 a2a0
4664 * a3a0
4665 * a3a1 (<= unused)
4666 * ---------------
4667 * v1 v0
4668 */
4669 /* mul-long vAA, vBB, vCC */
4670 FETCH(a0, 1) # a0 <- CCBB
4671 and t0, a0, 255 # a2 <- BB
4672 srl t1, a0, 8 # a3 <- CC
4673 EAS2(t0, rFP, t0) # t0 <- &fp[BB]
4674 LOAD64(a0, a1, t0) # a0/a1 <- vBB/vBB+1
4675
4676 EAS2(t1, rFP, t1) # t0 <- &fp[CC]
4677 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4678
4679 mul v1, a3, a0 # v1= a3a0
4680#ifdef MIPS32REVGE6
4681 mulu v0, a2, a0 # v0= a2a0
4682 muhu t1, a2, a0
4683#else
4684 multu a2, a0
4685 mfhi t1
4686 mflo v0 # v0= a2a0
4687#endif
4688 mul t0, a2, a1 # t0= a2a1
4689 addu v1, v1, t1 # v1+= hi(a2a0)
4690 addu v1, v1, t0 # v1= a3a0 + a2a1;
4691
4692 GET_OPA(a0) # a0 <- AA
4693 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4694 b .Lop_mul_long_finish
4695
4696/* ------------------------------ */
4697 .balign 128
4698.L_op_div_long: /* 0x9e */
4699/* File: mips/op_div_long.S */
4700/* File: mips/binopWide.S */
4701 /*
4702 * Generic 64-bit binary operation. Provide an "instr" line that
4703 * specifies an instruction that performs "result = a0-a1 op a2-a3".
4704 * This could be a MIPS instruction or a function call. (If the result
4705 * comes back in a register other than a0, you can override "result".)
4706 *
4707 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4708 * vCC (a1). Useful for integer division and modulus.
4709 *
4710 * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4711 * xor-long
4712 *
4713 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4714 */
4715 /* binop vAA, vBB, vCC */
4716 FETCH(a0, 1) # a0 <- CCBB
4717 GET_OPA(rOBJ) # rOBJ <- AA
4718 and a2, a0, 255 # a2 <- BB
4719 srl a3, a0, 8 # a3 <- CC
4720 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
4721 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
4722 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
4723 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4724 .if 1
4725 or t0, a2, a3 # second arg (a2-a3) is zero?
4726 beqz t0, common_errDivideByZero
4727 .endif
4728 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4729
4730 # optional op
4731 JAL(__divdi3) # result <- op, a0-a3 changed
4732 GET_INST_OPCODE(t0) # extract opcode from rINST
4733 SET_VREG64_GOTO(v0, v1, rOBJ, t0) # vAA/vAA+1 <- v0/v1
4734 /* 14-17 instructions */
4735
4736
4737/* ------------------------------ */
4738 .balign 128
4739.L_op_rem_long: /* 0x9f */
4740/* File: mips/op_rem_long.S */
4741/* File: mips/binopWide.S */
4742 /*
4743 * Generic 64-bit binary operation. Provide an "instr" line that
4744 * specifies an instruction that performs "result = a0-a1 op a2-a3".
4745 * This could be a MIPS instruction or a function call. (If the result
4746 * comes back in a register other than a0, you can override "result".)
4747 *
4748 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4749 * vCC (a1). Useful for integer division and modulus.
4750 *
4751 * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4752 * xor-long
4753 *
4754 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4755 */
4756 /* binop vAA, vBB, vCC */
4757 FETCH(a0, 1) # a0 <- CCBB
4758 GET_OPA(rOBJ) # rOBJ <- AA
4759 and a2, a0, 255 # a2 <- BB
4760 srl a3, a0, 8 # a3 <- CC
4761 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
4762 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
4763 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
4764 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4765 .if 1
4766 or t0, a2, a3 # second arg (a2-a3) is zero?
4767 beqz t0, common_errDivideByZero
4768 .endif
4769 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4770
4771 # optional op
4772 JAL(__moddi3) # result <- op, a0-a3 changed
4773 GET_INST_OPCODE(t0) # extract opcode from rINST
4774 SET_VREG64_GOTO(v0, v1, rOBJ, t0) # vAA/vAA+1 <- v0/v1
4775 /* 14-17 instructions */
4776
4777
4778/* ------------------------------ */
4779 .balign 128
4780.L_op_and_long: /* 0xa0 */
4781/* File: mips/op_and_long.S */
4782/* File: mips/binopWide.S */
4783 /*
4784 * Generic 64-bit binary operation. Provide an "instr" line that
4785 * specifies an instruction that performs "result = a0-a1 op a2-a3".
4786 * This could be a MIPS instruction or a function call. (If the result
4787 * comes back in a register other than a0, you can override "result".)
4788 *
4789 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4790 * vCC (a1). Useful for integer division and modulus.
4791 *
4792 * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4793 * xor-long
4794 *
4795 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4796 */
4797 /* binop vAA, vBB, vCC */
4798 FETCH(a0, 1) # a0 <- CCBB
4799 GET_OPA(rOBJ) # rOBJ <- AA
4800 and a2, a0, 255 # a2 <- BB
4801 srl a3, a0, 8 # a3 <- CC
4802 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
4803 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
4804 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
4805 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4806 .if 0
4807 or t0, a2, a3 # second arg (a2-a3) is zero?
4808 beqz t0, common_errDivideByZero
4809 .endif
4810 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4811
4812 and a0, a0, a2 # optional op
4813 and a1, a1, a3 # result <- op, a0-a3 changed
4814 GET_INST_OPCODE(t0) # extract opcode from rINST
4815 SET_VREG64_GOTO(a0, a1, rOBJ, t0) # vAA/vAA+1 <- a0/a1
4816 /* 14-17 instructions */
4817
4818
4819/* ------------------------------ */
4820 .balign 128
4821.L_op_or_long: /* 0xa1 */
4822/* File: mips/op_or_long.S */
4823/* File: mips/binopWide.S */
4824 /*
4825 * Generic 64-bit binary operation. Provide an "instr" line that
4826 * specifies an instruction that performs "result = a0-a1 op a2-a3".
4827 * This could be a MIPS instruction or a function call. (If the result
4828 * comes back in a register other than a0, you can override "result".)
4829 *
4830 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4831 * vCC (a1). Useful for integer division and modulus.
4832 *
4833 * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4834 * xor-long
4835 *
4836 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4837 */
4838 /* binop vAA, vBB, vCC */
4839 FETCH(a0, 1) # a0 <- CCBB
4840 GET_OPA(rOBJ) # rOBJ <- AA
4841 and a2, a0, 255 # a2 <- BB
4842 srl a3, a0, 8 # a3 <- CC
4843 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
4844 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
4845 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
4846 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4847 .if 0
4848 or t0, a2, a3 # second arg (a2-a3) is zero?
4849 beqz t0, common_errDivideByZero
4850 .endif
4851 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4852
4853 or a0, a0, a2 # optional op
4854 or a1, a1, a3 # result <- op, a0-a3 changed
4855 GET_INST_OPCODE(t0) # extract opcode from rINST
4856 SET_VREG64_GOTO(a0, a1, rOBJ, t0) # vAA/vAA+1 <- a0/a1
4857 /* 14-17 instructions */
4858
4859
4860/* ------------------------------ */
4861 .balign 128
4862.L_op_xor_long: /* 0xa2 */
4863/* File: mips/op_xor_long.S */
4864/* File: mips/binopWide.S */
4865 /*
4866 * Generic 64-bit binary operation. Provide an "instr" line that
4867 * specifies an instruction that performs "result = a0-a1 op a2-a3".
4868 * This could be a MIPS instruction or a function call. (If the result
4869 * comes back in a register other than a0, you can override "result".)
4870 *
4871 * If "chkzero" is set to 1, we perform a divide-by-zero check on
4872 * vCC (a1). Useful for integer division and modulus.
4873 *
4874 * for: add-long, sub-long, div-long, rem-long, and-long, or-long,
4875 * xor-long
4876 *
4877 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both.
4878 */
4879 /* binop vAA, vBB, vCC */
4880 FETCH(a0, 1) # a0 <- CCBB
4881 GET_OPA(rOBJ) # rOBJ <- AA
4882 and a2, a0, 255 # a2 <- BB
4883 srl a3, a0, 8 # a3 <- CC
4884 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
4885 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
4886 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1
4887 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1
4888 .if 0
4889 or t0, a2, a3 # second arg (a2-a3) is zero?
4890 beqz t0, common_errDivideByZero
4891 .endif
4892 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4893
4894 xor a0, a0, a2 # optional op
4895 xor a1, a1, a3 # result <- op, a0-a3 changed
4896 GET_INST_OPCODE(t0) # extract opcode from rINST
4897 SET_VREG64_GOTO(a0, a1, rOBJ, t0) # vAA/vAA+1 <- a0/a1
4898 /* 14-17 instructions */
4899
4900
4901/* ------------------------------ */
4902 .balign 128
4903.L_op_shl_long: /* 0xa3 */
4904/* File: mips/op_shl_long.S */
4905 /*
4906 * Long integer shift. This is different from the generic 32/64-bit
4907 * binary operations because vAA/vBB are 64-bit but vCC (the shift
4908 * distance) is 32-bit. Also, Dalvik requires us to mask off the low
4909 * 6 bits of the shift distance.
4910 */
4911 /* shl-long vAA, vBB, vCC */
4912 FETCH(a0, 1) # a0 <- CCBB
4913 GET_OPA(t2) # t2 <- AA
4914 and a3, a0, 255 # a3 <- BB
4915 srl a0, a0, 8 # a0 <- CC
4916 EAS2(a3, rFP, a3) # a3 <- &fp[BB]
4917 GET_VREG(a2, a0) # a2 <- vCC
4918 LOAD64(a0, a1, a3) # a0/a1 <- vBB/vBB+1
4919
4920 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4921 GET_INST_OPCODE(t0) # extract opcode from rINST
4922
4923 andi v1, a2, 0x20 # shift< shift & 0x20
4924 sll v0, a0, a2 # rlo<- alo << (shift&31)
4925 bnez v1, .Lop_shl_long_finish
4926 not v1, a2 # rhi<- 31-shift (shift is 5b)
4927 srl a0, 1
4928 srl a0, v1 # alo<- alo >> (32-(shift&31))
4929 sll v1, a1, a2 # rhi<- ahi << (shift&31)
4930 or v1, a0 # rhi<- rhi | alo
4931 SET_VREG64_GOTO(v0, v1, t2, t0) # vAA/vAA+1 <- a0/a1
4932
4933/* ------------------------------ */
4934 .balign 128
4935.L_op_shr_long: /* 0xa4 */
4936/* File: mips/op_shr_long.S */
4937 /*
4938 * Long integer shift. This is different from the generic 32/64-bit
4939 * binary operations because vAA/vBB are 64-bit but vCC (the shift
4940 * distance) is 32-bit. Also, Dalvik requires us to mask off the low
4941 * 6 bits of the shift distance.
4942 */
4943 /* shr-long vAA, vBB, vCC */
4944 FETCH(a0, 1) # a0 <- CCBB
4945 GET_OPA(t3) # t3 <- AA
4946 and a3, a0, 255 # a3 <- BB
4947 srl a0, a0, 8 # a0 <- CC
4948 EAS2(a3, rFP, a3) # a3 <- &fp[BB]
4949 GET_VREG(a2, a0) # a2 <- vCC
4950 LOAD64(a0, a1, a3) # a0/a1 <- vBB/vBB+1
4951 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4952 GET_INST_OPCODE(t0) # extract opcode from rINST
4953
4954 andi v0, a2, 0x20 # shift & 0x20
4955 sra v1, a1, a2 # rhi<- ahi >> (shift&31)
4956 bnez v0, .Lop_shr_long_finish
4957 srl v0, a0, a2 # rlo<- alo >> (shift&31)
4958 not a0, a2 # alo<- 31-shift (shift is 5b)
4959 sll a1, 1
4960 sll a1, a0 # ahi<- ahi << (32-(shift&31))
4961 or v0, a1 # rlo<- rlo | ahi
4962 SET_VREG64_GOTO(v0, v1, t3, t0) # vAA/VAA+1 <- v0/v0
4963
4964/* ------------------------------ */
4965 .balign 128
4966.L_op_ushr_long: /* 0xa5 */
4967/* File: mips/op_ushr_long.S */
4968 /*
4969 * Long integer shift. This is different from the generic 32/64-bit
4970 * binary operations because vAA/vBB are 64-bit but vCC (the shift
4971 * distance) is 32-bit. Also, Dalvik requires us to mask off the low
4972 * 6 bits of the shift distance.
4973 */
4974 /* ushr-long vAA, vBB, vCC */
4975 FETCH(a0, 1) # a0 <- CCBB
4976 GET_OPA(rOBJ) # rOBJ <- AA
4977 and a3, a0, 255 # a3 <- BB
4978 srl a0, a0, 8 # a0 <- CC
4979 EAS2(a3, rFP, a3) # a3 <- &fp[BB]
4980 GET_VREG(a2, a0) # a2 <- vCC
4981 LOAD64(a0, a1, a3) # a0/a1 <- vBB/vBB+1
4982
4983 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
4984 GET_INST_OPCODE(t0) # extract opcode from rINST
4985
4986 andi v0, a2, 0x20 # shift & 0x20
4987 srl v1, a1, a2 # rhi<- ahi >> (shift&31)
4988 bnez v0, .Lop_ushr_long_finish
4989 srl v0, a0, a2 # rlo<- alo >> (shift&31)
4990 not a0, a2 # alo<- 31-n (shift is 5b)
4991 sll a1, 1
4992 sll a1, a0 # ahi<- ahi << (32-(shift&31))
4993 or v0, a1 # rlo<- rlo | ahi
4994 SET_VREG64_GOTO(v0, v1, rOBJ, t0) # vAA/vAA+1 <- v0/v1
4995
4996/* ------------------------------ */
4997 .balign 128
4998.L_op_add_float: /* 0xa6 */
4999/* File: mips/op_add_float.S */
5000/* File: mips/fbinop.S */
5001 /*
5002 * Generic 32-bit binary float operation.
5003 *
5004 * For: add-fp, sub-fp, mul-fp, div-fp, rem-fp
5005 */
5006
5007 /* binop vAA, vBB, vCC */
5008 FETCH(a0, 1) # a0 <- CCBB
5009 GET_OPA(rOBJ) # s5 <- AA
5010 srl a3, a0, 8 # a3 <- CC
5011 and a2, a0, 255 # a2 <- BB
5012 GET_VREG_F(fa1, a3) # a1 <- vCC
5013 GET_VREG_F(fa0, a2) # a0 <- vBB
5014
5015 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5016 add.s fv0, fa0, fa1 # f0 = result
5017 SET_VREG_F(fv0, rOBJ) # vAA <- fv0
5018 GET_INST_OPCODE(t0) # extract opcode from rINST
5019 GOTO_OPCODE(t0) # jump to next instruction
5020
5021
5022/* ------------------------------ */
5023 .balign 128
5024.L_op_sub_float: /* 0xa7 */
5025/* File: mips/op_sub_float.S */
5026/* File: mips/fbinop.S */
5027 /*
5028 * Generic 32-bit binary float operation.
5029 *
5030 * For: add-fp, sub-fp, mul-fp, div-fp, rem-fp
5031 */
5032
5033 /* binop vAA, vBB, vCC */
5034 FETCH(a0, 1) # a0 <- CCBB
5035 GET_OPA(rOBJ) # s5 <- AA
5036 srl a3, a0, 8 # a3 <- CC
5037 and a2, a0, 255 # a2 <- BB
5038 GET_VREG_F(fa1, a3) # a1 <- vCC
5039 GET_VREG_F(fa0, a2) # a0 <- vBB
5040
5041 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5042 sub.s fv0, fa0, fa1 # f0 = result
5043 SET_VREG_F(fv0, rOBJ) # vAA <- fv0
5044 GET_INST_OPCODE(t0) # extract opcode from rINST
5045 GOTO_OPCODE(t0) # jump to next instruction
5046
5047
5048/* ------------------------------ */
5049 .balign 128
5050.L_op_mul_float: /* 0xa8 */
5051/* File: mips/op_mul_float.S */
5052/* File: mips/fbinop.S */
5053 /*
5054 * Generic 32-bit binary float operation.
5055 *
5056 * For: add-fp, sub-fp, mul-fp, div-fp, rem-fp
5057 */
5058
5059 /* binop vAA, vBB, vCC */
5060 FETCH(a0, 1) # a0 <- CCBB
5061 GET_OPA(rOBJ) # s5 <- AA
5062 srl a3, a0, 8 # a3 <- CC
5063 and a2, a0, 255 # a2 <- BB
5064 GET_VREG_F(fa1, a3) # a1 <- vCC
5065 GET_VREG_F(fa0, a2) # a0 <- vBB
5066
5067 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5068 mul.s fv0, fa0, fa1 # f0 = result
5069 SET_VREG_F(fv0, rOBJ) # vAA <- fv0
5070 GET_INST_OPCODE(t0) # extract opcode from rINST
5071 GOTO_OPCODE(t0) # jump to next instruction
5072
5073
5074/* ------------------------------ */
5075 .balign 128
5076.L_op_div_float: /* 0xa9 */
5077/* File: mips/op_div_float.S */
5078/* File: mips/fbinop.S */
5079 /*
5080 * Generic 32-bit binary float operation.
5081 *
5082 * For: add-fp, sub-fp, mul-fp, div-fp, rem-fp
5083 */
5084
5085 /* binop vAA, vBB, vCC */
5086 FETCH(a0, 1) # a0 <- CCBB
5087 GET_OPA(rOBJ) # s5 <- AA
5088 srl a3, a0, 8 # a3 <- CC
5089 and a2, a0, 255 # a2 <- BB
5090 GET_VREG_F(fa1, a3) # a1 <- vCC
5091 GET_VREG_F(fa0, a2) # a0 <- vBB
5092
5093 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5094 div.s fv0, fa0, fa1 # f0 = result
5095 SET_VREG_F(fv0, rOBJ) # vAA <- fv0
5096 GET_INST_OPCODE(t0) # extract opcode from rINST
5097 GOTO_OPCODE(t0) # jump to next instruction
5098
5099
5100/* ------------------------------ */
5101 .balign 128
5102.L_op_rem_float: /* 0xaa */
5103/* File: mips/op_rem_float.S */
5104/* File: mips/fbinop.S */
5105 /*
5106 * Generic 32-bit binary float operation.
5107 *
5108 * For: add-fp, sub-fp, mul-fp, div-fp, rem-fp
5109 */
5110
5111 /* binop vAA, vBB, vCC */
5112 FETCH(a0, 1) # a0 <- CCBB
5113 GET_OPA(rOBJ) # s5 <- AA
5114 srl a3, a0, 8 # a3 <- CC
5115 and a2, a0, 255 # a2 <- BB
5116 GET_VREG_F(fa1, a3) # a1 <- vCC
5117 GET_VREG_F(fa0, a2) # a0 <- vBB
5118
5119 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5120 JAL(fmodf) # f0 = result
5121 SET_VREG_F(fv0, rOBJ) # vAA <- fv0
5122 GET_INST_OPCODE(t0) # extract opcode from rINST
5123 GOTO_OPCODE(t0) # jump to next instruction
5124
5125
5126/* ------------------------------ */
5127 .balign 128
5128.L_op_add_double: /* 0xab */
5129/* File: mips/op_add_double.S */
5130/* File: mips/fbinopWide.S */
5131 /*
5132 * Generic 64-bit binary operation. Provide an "instr" line that
5133 * specifies an instruction that performs "result = a0-a1 op a2-a3".
5134 * This could be an MIPS instruction or a function call.
5135 *
5136 * for: add-double, sub-double, mul-double, div-double,
5137 * rem-double
5138 *
5139 */
5140 /* binop vAA, vBB, vCC */
5141 FETCH(a0, 1) # a0 <- CCBB
5142 GET_OPA(rOBJ) # s5 <- AA
5143 and a2, a0, 255 # a2 <- BB
5144 srl a3, a0, 8 # a3 <- CC
5145 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
5146 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
5147 LOAD64_F(fa0, fa0f, a2)
5148 LOAD64_F(fa1, fa1f, t1)
5149
5150 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5151 add.d fv0, fa0, fa1
5152 SET_VREG64_F(fv0, fv0f, rOBJ)
5153 b .Lop_add_double_finish
5154
5155
5156/* ------------------------------ */
5157 .balign 128
5158.L_op_sub_double: /* 0xac */
5159/* File: mips/op_sub_double.S */
5160/* File: mips/fbinopWide.S */
5161 /*
5162 * Generic 64-bit binary operation. Provide an "instr" line that
5163 * specifies an instruction that performs "result = a0-a1 op a2-a3".
5164 * This could be an MIPS instruction or a function call.
5165 *
5166 * for: add-double, sub-double, mul-double, div-double,
5167 * rem-double
5168 *
5169 */
5170 /* binop vAA, vBB, vCC */
5171 FETCH(a0, 1) # a0 <- CCBB
5172 GET_OPA(rOBJ) # s5 <- AA
5173 and a2, a0, 255 # a2 <- BB
5174 srl a3, a0, 8 # a3 <- CC
5175 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
5176 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
5177 LOAD64_F(fa0, fa0f, a2)
5178 LOAD64_F(fa1, fa1f, t1)
5179
5180 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5181 sub.d fv0, fa0, fa1
5182 SET_VREG64_F(fv0, fv0f, rOBJ)
5183 b .Lop_sub_double_finish
5184
5185
5186/* ------------------------------ */
5187 .balign 128
5188.L_op_mul_double: /* 0xad */
5189/* File: mips/op_mul_double.S */
5190/* File: mips/fbinopWide.S */
5191 /*
5192 * Generic 64-bit binary operation. Provide an "instr" line that
5193 * specifies an instruction that performs "result = a0-a1 op a2-a3".
5194 * This could be an MIPS instruction or a function call.
5195 *
5196 * for: add-double, sub-double, mul-double, div-double,
5197 * rem-double
5198 *
5199 */
5200 /* binop vAA, vBB, vCC */
5201 FETCH(a0, 1) # a0 <- CCBB
5202 GET_OPA(rOBJ) # s5 <- AA
5203 and a2, a0, 255 # a2 <- BB
5204 srl a3, a0, 8 # a3 <- CC
5205 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
5206 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
5207 LOAD64_F(fa0, fa0f, a2)
5208 LOAD64_F(fa1, fa1f, t1)
5209
5210 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5211 mul.d fv0, fa0, fa1
5212 SET_VREG64_F(fv0, fv0f, rOBJ)
5213 b .Lop_mul_double_finish
5214
5215
5216/* ------------------------------ */
5217 .balign 128
5218.L_op_div_double: /* 0xae */
5219/* File: mips/op_div_double.S */
5220/* File: mips/fbinopWide.S */
5221 /*
5222 * Generic 64-bit binary operation. Provide an "instr" line that
5223 * specifies an instruction that performs "result = a0-a1 op a2-a3".
5224 * This could be an MIPS instruction or a function call.
5225 *
5226 * for: add-double, sub-double, mul-double, div-double,
5227 * rem-double
5228 *
5229 */
5230 /* binop vAA, vBB, vCC */
5231 FETCH(a0, 1) # a0 <- CCBB
5232 GET_OPA(rOBJ) # s5 <- AA
5233 and a2, a0, 255 # a2 <- BB
5234 srl a3, a0, 8 # a3 <- CC
5235 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
5236 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
5237 LOAD64_F(fa0, fa0f, a2)
5238 LOAD64_F(fa1, fa1f, t1)
5239
5240 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5241 div.d fv0, fa0, fa1
5242 SET_VREG64_F(fv0, fv0f, rOBJ)
5243 b .Lop_div_double_finish
5244
5245
5246/* ------------------------------ */
5247 .balign 128
5248.L_op_rem_double: /* 0xaf */
5249/* File: mips/op_rem_double.S */
5250/* File: mips/fbinopWide.S */
5251 /*
5252 * Generic 64-bit binary operation. Provide an "instr" line that
5253 * specifies an instruction that performs "result = a0-a1 op a2-a3".
5254 * This could be an MIPS instruction or a function call.
5255 *
5256 * for: add-double, sub-double, mul-double, div-double,
5257 * rem-double
5258 *
5259 */
5260 /* binop vAA, vBB, vCC */
5261 FETCH(a0, 1) # a0 <- CCBB
5262 GET_OPA(rOBJ) # s5 <- AA
5263 and a2, a0, 255 # a2 <- BB
5264 srl a3, a0, 8 # a3 <- CC
5265 EAS2(a2, rFP, a2) # a2 <- &fp[BB]
5266 EAS2(t1, rFP, a3) # a3 <- &fp[CC]
5267 LOAD64_F(fa0, fa0f, a2)
5268 LOAD64_F(fa1, fa1f, t1)
5269
5270 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
5271 JAL(fmod)
5272 SET_VREG64_F(fv0, fv0f, rOBJ)
5273 b .Lop_rem_double_finish
5274
5275
5276/* ------------------------------ */
5277 .balign 128
5278.L_op_add_int_2addr: /* 0xb0 */
5279/* File: mips/op_add_int_2addr.S */
5280/* File: mips/binop2addr.S */
5281 /*
5282 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5283 * that specifies an instruction that performs "result = a0 op a1".
5284 * This could be an MIPS instruction or a function call.
5285 *
5286 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5287 * vCC (a1). Useful for integer division and modulus.
5288 *
5289 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5290 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5291 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5292 */
5293 /* binop/2addr vA, vB */
5294 GET_OPA4(rOBJ) # rOBJ <- A+
5295 GET_OPB(a3) # a3 <- B
5296 GET_VREG(a0, rOBJ) # a0 <- vA
5297 GET_VREG(a1, a3) # a1 <- vB
5298 .if 0
5299 # is second operand zero?
5300 beqz a1, common_errDivideByZero
5301 .endif
5302 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5303
5304 # optional op
5305 addu a0, a0, a1 # a0 <- op, a0-a3 changed
5306 GET_INST_OPCODE(t0) # extract opcode from rINST
5307 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5308 /* 10-13 instructions */
5309
5310
5311/* ------------------------------ */
5312 .balign 128
5313.L_op_sub_int_2addr: /* 0xb1 */
5314/* File: mips/op_sub_int_2addr.S */
5315/* File: mips/binop2addr.S */
5316 /*
5317 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5318 * that specifies an instruction that performs "result = a0 op a1".
5319 * This could be an MIPS instruction or a function call.
5320 *
5321 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5322 * vCC (a1). Useful for integer division and modulus.
5323 *
5324 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5325 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5326 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5327 */
5328 /* binop/2addr vA, vB */
5329 GET_OPA4(rOBJ) # rOBJ <- A+
5330 GET_OPB(a3) # a3 <- B
5331 GET_VREG(a0, rOBJ) # a0 <- vA
5332 GET_VREG(a1, a3) # a1 <- vB
5333 .if 0
5334 # is second operand zero?
5335 beqz a1, common_errDivideByZero
5336 .endif
5337 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5338
5339 # optional op
5340 subu a0, a0, a1 # a0 <- op, a0-a3 changed
5341 GET_INST_OPCODE(t0) # extract opcode from rINST
5342 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5343 /* 10-13 instructions */
5344
5345
5346/* ------------------------------ */
5347 .balign 128
5348.L_op_mul_int_2addr: /* 0xb2 */
5349/* File: mips/op_mul_int_2addr.S */
5350/* File: mips/binop2addr.S */
5351 /*
5352 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5353 * that specifies an instruction that performs "result = a0 op a1".
5354 * This could be an MIPS instruction or a function call.
5355 *
5356 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5357 * vCC (a1). Useful for integer division and modulus.
5358 *
5359 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5360 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5361 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5362 */
5363 /* binop/2addr vA, vB */
5364 GET_OPA4(rOBJ) # rOBJ <- A+
5365 GET_OPB(a3) # a3 <- B
5366 GET_VREG(a0, rOBJ) # a0 <- vA
5367 GET_VREG(a1, a3) # a1 <- vB
5368 .if 0
5369 # is second operand zero?
5370 beqz a1, common_errDivideByZero
5371 .endif
5372 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5373
5374 # optional op
5375 mul a0, a0, a1 # a0 <- op, a0-a3 changed
5376 GET_INST_OPCODE(t0) # extract opcode from rINST
5377 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5378 /* 10-13 instructions */
5379
5380
5381/* ------------------------------ */
5382 .balign 128
5383.L_op_div_int_2addr: /* 0xb3 */
5384/* File: mips/op_div_int_2addr.S */
5385#ifdef MIPS32REVGE6
5386/* File: mips/binop2addr.S */
5387 /*
5388 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5389 * that specifies an instruction that performs "result = a0 op a1".
5390 * This could be an MIPS instruction or a function call.
5391 *
5392 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5393 * vCC (a1). Useful for integer division and modulus.
5394 *
5395 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5396 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5397 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5398 */
5399 /* binop/2addr vA, vB */
5400 GET_OPA4(rOBJ) # rOBJ <- A+
5401 GET_OPB(a3) # a3 <- B
5402 GET_VREG(a0, rOBJ) # a0 <- vA
5403 GET_VREG(a1, a3) # a1 <- vB
5404 .if 1
5405 # is second operand zero?
5406 beqz a1, common_errDivideByZero
5407 .endif
5408 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5409
5410 # optional op
5411 div a0, a0, a1 # a0 <- op, a0-a3 changed
5412 GET_INST_OPCODE(t0) # extract opcode from rINST
5413 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5414 /* 10-13 instructions */
5415
5416#else
5417/* File: mips/binop2addr.S */
5418 /*
5419 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5420 * that specifies an instruction that performs "result = a0 op a1".
5421 * This could be an MIPS instruction or a function call.
5422 *
5423 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5424 * vCC (a1). Useful for integer division and modulus.
5425 *
5426 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5427 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5428 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5429 */
5430 /* binop/2addr vA, vB */
5431 GET_OPA4(rOBJ) # rOBJ <- A+
5432 GET_OPB(a3) # a3 <- B
5433 GET_VREG(a0, rOBJ) # a0 <- vA
5434 GET_VREG(a1, a3) # a1 <- vB
5435 .if 1
5436 # is second operand zero?
5437 beqz a1, common_errDivideByZero
5438 .endif
5439 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5440
5441 div zero, a0, a1 # optional op
5442 mflo a0 # a0 <- op, a0-a3 changed
5443 GET_INST_OPCODE(t0) # extract opcode from rINST
5444 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5445 /* 10-13 instructions */
5446
5447#endif
5448
5449/* ------------------------------ */
5450 .balign 128
5451.L_op_rem_int_2addr: /* 0xb4 */
5452/* File: mips/op_rem_int_2addr.S */
5453#ifdef MIPS32REVGE6
5454/* File: mips/binop2addr.S */
5455 /*
5456 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5457 * that specifies an instruction that performs "result = a0 op a1".
5458 * This could be an MIPS instruction or a function call.
5459 *
5460 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5461 * vCC (a1). Useful for integer division and modulus.
5462 *
5463 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5464 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5465 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5466 */
5467 /* binop/2addr vA, vB */
5468 GET_OPA4(rOBJ) # rOBJ <- A+
5469 GET_OPB(a3) # a3 <- B
5470 GET_VREG(a0, rOBJ) # a0 <- vA
5471 GET_VREG(a1, a3) # a1 <- vB
5472 .if 1
5473 # is second operand zero?
5474 beqz a1, common_errDivideByZero
5475 .endif
5476 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5477
5478 # optional op
5479 mod a0, a0, a1 # a0 <- op, a0-a3 changed
5480 GET_INST_OPCODE(t0) # extract opcode from rINST
5481 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5482 /* 10-13 instructions */
5483
5484#else
5485/* File: mips/binop2addr.S */
5486 /*
5487 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5488 * that specifies an instruction that performs "result = a0 op a1".
5489 * This could be an MIPS instruction or a function call.
5490 *
5491 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5492 * vCC (a1). Useful for integer division and modulus.
5493 *
5494 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5495 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5496 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5497 */
5498 /* binop/2addr vA, vB */
5499 GET_OPA4(rOBJ) # rOBJ <- A+
5500 GET_OPB(a3) # a3 <- B
5501 GET_VREG(a0, rOBJ) # a0 <- vA
5502 GET_VREG(a1, a3) # a1 <- vB
5503 .if 1
5504 # is second operand zero?
5505 beqz a1, common_errDivideByZero
5506 .endif
5507 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5508
5509 div zero, a0, a1 # optional op
5510 mfhi a0 # a0 <- op, a0-a3 changed
5511 GET_INST_OPCODE(t0) # extract opcode from rINST
5512 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5513 /* 10-13 instructions */
5514
5515#endif
5516
5517/* ------------------------------ */
5518 .balign 128
5519.L_op_and_int_2addr: /* 0xb5 */
5520/* File: mips/op_and_int_2addr.S */
5521/* File: mips/binop2addr.S */
5522 /*
5523 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5524 * that specifies an instruction that performs "result = a0 op a1".
5525 * This could be an MIPS instruction or a function call.
5526 *
5527 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5528 * vCC (a1). Useful for integer division and modulus.
5529 *
5530 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5531 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5532 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5533 */
5534 /* binop/2addr vA, vB */
5535 GET_OPA4(rOBJ) # rOBJ <- A+
5536 GET_OPB(a3) # a3 <- B
5537 GET_VREG(a0, rOBJ) # a0 <- vA
5538 GET_VREG(a1, a3) # a1 <- vB
5539 .if 0
5540 # is second operand zero?
5541 beqz a1, common_errDivideByZero
5542 .endif
5543 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5544
5545 # optional op
5546 and a0, a0, a1 # a0 <- op, a0-a3 changed
5547 GET_INST_OPCODE(t0) # extract opcode from rINST
5548 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5549 /* 10-13 instructions */
5550
5551
5552/* ------------------------------ */
5553 .balign 128
5554.L_op_or_int_2addr: /* 0xb6 */
5555/* File: mips/op_or_int_2addr.S */
5556/* File: mips/binop2addr.S */
5557 /*
5558 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5559 * that specifies an instruction that performs "result = a0 op a1".
5560 * This could be an MIPS instruction or a function call.
5561 *
5562 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5563 * vCC (a1). Useful for integer division and modulus.
5564 *
5565 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5566 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5567 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5568 */
5569 /* binop/2addr vA, vB */
5570 GET_OPA4(rOBJ) # rOBJ <- A+
5571 GET_OPB(a3) # a3 <- B
5572 GET_VREG(a0, rOBJ) # a0 <- vA
5573 GET_VREG(a1, a3) # a1 <- vB
5574 .if 0
5575 # is second operand zero?
5576 beqz a1, common_errDivideByZero
5577 .endif
5578 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5579
5580 # optional op
5581 or a0, a0, a1 # a0 <- op, a0-a3 changed
5582 GET_INST_OPCODE(t0) # extract opcode from rINST
5583 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5584 /* 10-13 instructions */
5585
5586
5587/* ------------------------------ */
5588 .balign 128
5589.L_op_xor_int_2addr: /* 0xb7 */
5590/* File: mips/op_xor_int_2addr.S */
5591/* File: mips/binop2addr.S */
5592 /*
5593 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5594 * that specifies an instruction that performs "result = a0 op a1".
5595 * This could be an MIPS instruction or a function call.
5596 *
5597 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5598 * vCC (a1). Useful for integer division and modulus.
5599 *
5600 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5601 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5602 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5603 */
5604 /* binop/2addr vA, vB */
5605 GET_OPA4(rOBJ) # rOBJ <- A+
5606 GET_OPB(a3) # a3 <- B
5607 GET_VREG(a0, rOBJ) # a0 <- vA
5608 GET_VREG(a1, a3) # a1 <- vB
5609 .if 0
5610 # is second operand zero?
5611 beqz a1, common_errDivideByZero
5612 .endif
5613 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5614
5615 # optional op
5616 xor a0, a0, a1 # a0 <- op, a0-a3 changed
5617 GET_INST_OPCODE(t0) # extract opcode from rINST
5618 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5619 /* 10-13 instructions */
5620
5621
5622/* ------------------------------ */
5623 .balign 128
5624.L_op_shl_int_2addr: /* 0xb8 */
5625/* File: mips/op_shl_int_2addr.S */
5626/* File: mips/binop2addr.S */
5627 /*
5628 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5629 * that specifies an instruction that performs "result = a0 op a1".
5630 * This could be an MIPS instruction or a function call.
5631 *
5632 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5633 * vCC (a1). Useful for integer division and modulus.
5634 *
5635 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5636 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5637 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5638 */
5639 /* binop/2addr vA, vB */
5640 GET_OPA4(rOBJ) # rOBJ <- A+
5641 GET_OPB(a3) # a3 <- B
5642 GET_VREG(a0, rOBJ) # a0 <- vA
5643 GET_VREG(a1, a3) # a1 <- vB
5644 .if 0
5645 # is second operand zero?
5646 beqz a1, common_errDivideByZero
5647 .endif
5648 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5649
5650 # optional op
5651 sll a0, a0, a1 # a0 <- op, a0-a3 changed
5652 GET_INST_OPCODE(t0) # extract opcode from rINST
5653 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5654 /* 10-13 instructions */
5655
5656
5657/* ------------------------------ */
5658 .balign 128
5659.L_op_shr_int_2addr: /* 0xb9 */
5660/* File: mips/op_shr_int_2addr.S */
5661/* File: mips/binop2addr.S */
5662 /*
5663 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5664 * that specifies an instruction that performs "result = a0 op a1".
5665 * This could be an MIPS instruction or a function call.
5666 *
5667 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5668 * vCC (a1). Useful for integer division and modulus.
5669 *
5670 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5671 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5672 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5673 */
5674 /* binop/2addr vA, vB */
5675 GET_OPA4(rOBJ) # rOBJ <- A+
5676 GET_OPB(a3) # a3 <- B
5677 GET_VREG(a0, rOBJ) # a0 <- vA
5678 GET_VREG(a1, a3) # a1 <- vB
5679 .if 0
5680 # is second operand zero?
5681 beqz a1, common_errDivideByZero
5682 .endif
5683 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5684
5685 # optional op
5686 sra a0, a0, a1 # a0 <- op, a0-a3 changed
5687 GET_INST_OPCODE(t0) # extract opcode from rINST
5688 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5689 /* 10-13 instructions */
5690
5691
5692/* ------------------------------ */
5693 .balign 128
5694.L_op_ushr_int_2addr: /* 0xba */
5695/* File: mips/op_ushr_int_2addr.S */
5696/* File: mips/binop2addr.S */
5697 /*
5698 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
5699 * that specifies an instruction that performs "result = a0 op a1".
5700 * This could be an MIPS instruction or a function call.
5701 *
5702 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5703 * vCC (a1). Useful for integer division and modulus.
5704 *
5705 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
5706 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
5707 * shl-int/2addr, shr-int/2addr, ushr-int/2addr
5708 */
5709 /* binop/2addr vA, vB */
5710 GET_OPA4(rOBJ) # rOBJ <- A+
5711 GET_OPB(a3) # a3 <- B
5712 GET_VREG(a0, rOBJ) # a0 <- vA
5713 GET_VREG(a1, a3) # a1 <- vB
5714 .if 0
5715 # is second operand zero?
5716 beqz a1, common_errDivideByZero
5717 .endif
5718 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5719
5720 # optional op
5721 srl a0, a0, a1 # a0 <- op, a0-a3 changed
5722 GET_INST_OPCODE(t0) # extract opcode from rINST
5723 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
5724 /* 10-13 instructions */
5725
5726
5727/* ------------------------------ */
5728 .balign 128
5729.L_op_add_long_2addr: /* 0xbb */
5730/* File: mips/op_add_long_2addr.S */
5731/*
5732 * See op_add_long.S for details
5733 */
5734/* File: mips/binopWide2addr.S */
5735 /*
5736 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
5737 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
5738 * This could be a MIPS instruction or a function call. (If the result
5739 * comes back in a register other than a0, you can override "result".)
5740 *
5741 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5742 * vCC (a1). Useful for integer division and modulus.
5743 *
5744 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5745 * and-long/2addr, or-long/2addr, xor-long/2addr
5746 * rem-double/2addr
5747 */
5748 /* binop/2addr vA, vB */
5749 GET_OPA4(rOBJ) # rOBJ <- A+
5750 GET_OPB(a1) # a1 <- B
5751 EAS2(a1, rFP, a1) # a1 <- &fp[B]
5752 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
5753 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1
5754 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
5755 .if 0
5756 or t0, a2, a3 # second arg (a2-a3) is zero?
5757 beqz t0, common_errDivideByZero
5758 .endif
5759 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5760
5761 addu v0, a2, a0 # optional op
5762 addu a1, a3, a1; sltu v1, v0, a2; addu v1, v1, a1 # result <- op, a0-a3 changed
5763 GET_INST_OPCODE(t0) # extract opcode from rINST
5764 SET_VREG64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1
5765 GOTO_OPCODE(t0) # jump to next instruction
5766 /* 12-15 instructions */
5767
5768
5769/* ------------------------------ */
5770 .balign 128
5771.L_op_sub_long_2addr: /* 0xbc */
5772/* File: mips/op_sub_long_2addr.S */
5773/*
5774 * See op_sub_long.S for more details
5775 */
5776/* File: mips/binopWide2addr.S */
5777 /*
5778 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
5779 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
5780 * This could be a MIPS instruction or a function call. (If the result
5781 * comes back in a register other than a0, you can override "result".)
5782 *
5783 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5784 * vCC (a1). Useful for integer division and modulus.
5785 *
5786 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5787 * and-long/2addr, or-long/2addr, xor-long/2addr
5788 * rem-double/2addr
5789 */
5790 /* binop/2addr vA, vB */
5791 GET_OPA4(rOBJ) # rOBJ <- A+
5792 GET_OPB(a1) # a1 <- B
5793 EAS2(a1, rFP, a1) # a1 <- &fp[B]
5794 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
5795 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1
5796 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
5797 .if 0
5798 or t0, a2, a3 # second arg (a2-a3) is zero?
5799 beqz t0, common_errDivideByZero
5800 .endif
5801 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5802
5803 subu v0, a0, a2 # optional op
5804 subu v1, a1, a3; sltu a0, a0, v0; subu v1, v1, a0 # result <- op, a0-a3 changed
5805 GET_INST_OPCODE(t0) # extract opcode from rINST
5806 SET_VREG64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1
5807 GOTO_OPCODE(t0) # jump to next instruction
5808 /* 12-15 instructions */
5809
5810
5811/* ------------------------------ */
5812 .balign 128
5813.L_op_mul_long_2addr: /* 0xbd */
5814/* File: mips/op_mul_long_2addr.S */
5815 /*
5816 * See op_mul_long.S for more details
5817 */
5818 /* mul-long/2addr vA, vB */
5819 GET_OPA4(rOBJ) # rOBJ <- A+
5820
5821 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
5822 LOAD64(a0, a1, t0) # vAA.low / high
5823
5824 GET_OPB(t1) # t1 <- B
5825 EAS2(t1, rFP, t1) # t1 <- &fp[B]
5826 LOAD64(a2, a3, t1) # vBB.low / high
5827
5828 mul v1, a3, a0 # v1= a3a0
5829#ifdef MIPS32REVGE6
5830 mulu v0, a2, a0 # v0= a2a0
5831 muhu t1, a2, a0
5832#else
5833 multu a2, a0
5834 mfhi t1
5835 mflo v0 # v0= a2a0
5836 #endif
5837 mul t2, a2, a1 # t2= a2a1
5838 addu v1, v1, t1 # v1= a3a0 + hi(a2a0)
5839 addu v1, v1, t2 # v1= v1 + a2a1;
5840
5841 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5842 GET_INST_OPCODE(t1) # extract opcode from rINST
5843 # vAA <- v0 (low)
5844 SET_VREG64(v0, v1, rOBJ) # vAA+1 <- v1 (high)
5845 GOTO_OPCODE(t1) # jump to next instruction
5846
5847/* ------------------------------ */
5848 .balign 128
5849.L_op_div_long_2addr: /* 0xbe */
5850/* File: mips/op_div_long_2addr.S */
5851/* File: mips/binopWide2addr.S */
5852 /*
5853 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
5854 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
5855 * This could be a MIPS instruction or a function call. (If the result
5856 * comes back in a register other than a0, you can override "result".)
5857 *
5858 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5859 * vCC (a1). Useful for integer division and modulus.
5860 *
5861 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5862 * and-long/2addr, or-long/2addr, xor-long/2addr
5863 * rem-double/2addr
5864 */
5865 /* binop/2addr vA, vB */
5866 GET_OPA4(rOBJ) # rOBJ <- A+
5867 GET_OPB(a1) # a1 <- B
5868 EAS2(a1, rFP, a1) # a1 <- &fp[B]
5869 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
5870 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1
5871 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
5872 .if 1
5873 or t0, a2, a3 # second arg (a2-a3) is zero?
5874 beqz t0, common_errDivideByZero
5875 .endif
5876 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5877
5878 # optional op
5879 JAL(__divdi3) # result <- op, a0-a3 changed
5880 GET_INST_OPCODE(t0) # extract opcode from rINST
5881 SET_VREG64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1
5882 GOTO_OPCODE(t0) # jump to next instruction
5883 /* 12-15 instructions */
5884
5885
5886/* ------------------------------ */
5887 .balign 128
5888.L_op_rem_long_2addr: /* 0xbf */
5889/* File: mips/op_rem_long_2addr.S */
5890/* File: mips/binopWide2addr.S */
5891 /*
5892 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
5893 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
5894 * This could be a MIPS instruction or a function call. (If the result
5895 * comes back in a register other than a0, you can override "result".)
5896 *
5897 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5898 * vCC (a1). Useful for integer division and modulus.
5899 *
5900 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5901 * and-long/2addr, or-long/2addr, xor-long/2addr
5902 * rem-double/2addr
5903 */
5904 /* binop/2addr vA, vB */
5905 GET_OPA4(rOBJ) # rOBJ <- A+
5906 GET_OPB(a1) # a1 <- B
5907 EAS2(a1, rFP, a1) # a1 <- &fp[B]
5908 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
5909 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1
5910 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
5911 .if 1
5912 or t0, a2, a3 # second arg (a2-a3) is zero?
5913 beqz t0, common_errDivideByZero
5914 .endif
5915 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5916
5917 # optional op
5918 JAL(__moddi3) # result <- op, a0-a3 changed
5919 GET_INST_OPCODE(t0) # extract opcode from rINST
5920 SET_VREG64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1
5921 GOTO_OPCODE(t0) # jump to next instruction
5922 /* 12-15 instructions */
5923
5924
5925/* ------------------------------ */
5926 .balign 128
5927.L_op_and_long_2addr: /* 0xc0 */
5928/* File: mips/op_and_long_2addr.S */
5929/* File: mips/binopWide2addr.S */
5930 /*
5931 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
5932 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
5933 * This could be a MIPS instruction or a function call. (If the result
5934 * comes back in a register other than a0, you can override "result".)
5935 *
5936 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5937 * vCC (a1). Useful for integer division and modulus.
5938 *
5939 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5940 * and-long/2addr, or-long/2addr, xor-long/2addr
5941 * rem-double/2addr
5942 */
5943 /* binop/2addr vA, vB */
5944 GET_OPA4(rOBJ) # rOBJ <- A+
5945 GET_OPB(a1) # a1 <- B
5946 EAS2(a1, rFP, a1) # a1 <- &fp[B]
5947 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
5948 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1
5949 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
5950 .if 0
5951 or t0, a2, a3 # second arg (a2-a3) is zero?
5952 beqz t0, common_errDivideByZero
5953 .endif
5954 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5955
5956 and a0, a0, a2 # optional op
5957 and a1, a1, a3 # result <- op, a0-a3 changed
5958 GET_INST_OPCODE(t0) # extract opcode from rINST
5959 SET_VREG64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1
5960 GOTO_OPCODE(t0) # jump to next instruction
5961 /* 12-15 instructions */
5962
5963
5964/* ------------------------------ */
5965 .balign 128
5966.L_op_or_long_2addr: /* 0xc1 */
5967/* File: mips/op_or_long_2addr.S */
5968/* File: mips/binopWide2addr.S */
5969 /*
5970 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
5971 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
5972 * This could be a MIPS instruction or a function call. (If the result
5973 * comes back in a register other than a0, you can override "result".)
5974 *
5975 * If "chkzero" is set to 1, we perform a divide-by-zero check on
5976 * vCC (a1). Useful for integer division and modulus.
5977 *
5978 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
5979 * and-long/2addr, or-long/2addr, xor-long/2addr
5980 * rem-double/2addr
5981 */
5982 /* binop/2addr vA, vB */
5983 GET_OPA4(rOBJ) # rOBJ <- A+
5984 GET_OPB(a1) # a1 <- B
5985 EAS2(a1, rFP, a1) # a1 <- &fp[B]
5986 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
5987 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1
5988 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
5989 .if 0
5990 or t0, a2, a3 # second arg (a2-a3) is zero?
5991 beqz t0, common_errDivideByZero
5992 .endif
5993 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
5994
5995 or a0, a0, a2 # optional op
5996 or a1, a1, a3 # result <- op, a0-a3 changed
5997 GET_INST_OPCODE(t0) # extract opcode from rINST
5998 SET_VREG64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1
5999 GOTO_OPCODE(t0) # jump to next instruction
6000 /* 12-15 instructions */
6001
6002
6003/* ------------------------------ */
6004 .balign 128
6005.L_op_xor_long_2addr: /* 0xc2 */
6006/* File: mips/op_xor_long_2addr.S */
6007/* File: mips/binopWide2addr.S */
6008 /*
6009 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
6010 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
6011 * This could be a MIPS instruction or a function call. (If the result
6012 * comes back in a register other than a0, you can override "result".)
6013 *
6014 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6015 * vCC (a1). Useful for integer division and modulus.
6016 *
6017 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr,
6018 * and-long/2addr, or-long/2addr, xor-long/2addr
6019 * rem-double/2addr
6020 */
6021 /* binop/2addr vA, vB */
6022 GET_OPA4(rOBJ) # rOBJ <- A+
6023 GET_OPB(a1) # a1 <- B
6024 EAS2(a1, rFP, a1) # a1 <- &fp[B]
6025 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
6026 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1
6027 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
6028 .if 0
6029 or t0, a2, a3 # second arg (a2-a3) is zero?
6030 beqz t0, common_errDivideByZero
6031 .endif
6032 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6033
6034 xor a0, a0, a2 # optional op
6035 xor a1, a1, a3 # result <- op, a0-a3 changed
6036 GET_INST_OPCODE(t0) # extract opcode from rINST
6037 SET_VREG64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1
6038 GOTO_OPCODE(t0) # jump to next instruction
6039 /* 12-15 instructions */
6040
6041
6042/* ------------------------------ */
6043 .balign 128
6044.L_op_shl_long_2addr: /* 0xc3 */
6045/* File: mips/op_shl_long_2addr.S */
6046 /*
6047 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is
6048 * 32-bit shift distance.
6049 */
6050 /* shl-long/2addr vA, vB */
6051 GET_OPA4(rOBJ) # rOBJ <- A+
6052 GET_OPB(a3) # a3 <- B
6053 GET_VREG(a2, a3) # a2 <- vB
6054 EAS2(t2, rFP, rOBJ) # t2 <- &fp[A]
6055 LOAD64(a0, a1, t2) # a0/a1 <- vAA/vAA+1
6056
6057 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6058 GET_INST_OPCODE(t0) # extract opcode from rINST
6059
6060 andi v1, a2, 0x20 # shift< shift & 0x20
6061 sll v0, a0, a2 # rlo<- alo << (shift&31)
6062 bnez v1, .Lop_shl_long_2addr_finish
6063 not v1, a2 # rhi<- 31-shift (shift is 5b)
6064 srl a0, 1
6065 srl a0, v1 # alo<- alo >> (32-(shift&31))
6066 sll v1, a1, a2 # rhi<- ahi << (shift&31)
6067 or v1, a0 # rhi<- rhi | alo
6068 SET_VREG64_GOTO(v0, v1, rOBJ, t0) # vAA/vAA+1 <- a0/a1
6069
6070/* ------------------------------ */
6071 .balign 128
6072.L_op_shr_long_2addr: /* 0xc4 */
6073/* File: mips/op_shr_long_2addr.S */
6074 /*
6075 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is
6076 * 32-bit shift distance.
6077 */
6078 /* shr-long/2addr vA, vB */
6079 GET_OPA4(t2) # t2 <- A+
6080 GET_OPB(a3) # a3 <- B
6081 GET_VREG(a2, a3) # a2 <- vB
6082 EAS2(t0, rFP, t2) # t0 <- &fp[A]
6083 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
6084 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6085 GET_INST_OPCODE(t0) # extract opcode from rINST
6086
6087 andi v0, a2, 0x20 # shift & 0x20
6088 sra v1, a1, a2 # rhi<- ahi >> (shift&31)
6089 bnez v0, .Lop_shr_long_2addr_finish
6090 srl v0, a0, a2 # rlo<- alo >> (shift&31)
6091 not a0, a2 # alo<- 31-shift (shift is 5b)
6092 sll a1, 1
6093 sll a1, a0 # ahi<- ahi << (32-(shift&31))
6094 or v0, a1 # rlo<- rlo | ahi
6095 SET_VREG64_GOTO(v0, v1, t2, t0) # vAA/vAA+1 <- a0/a1
6096
6097/* ------------------------------ */
6098 .balign 128
6099.L_op_ushr_long_2addr: /* 0xc5 */
6100/* File: mips/op_ushr_long_2addr.S */
6101 /*
6102 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is
6103 * 32-bit shift distance.
6104 */
6105 /* ushr-long/2addr vA, vB */
6106 GET_OPA4(t3) # t3 <- A+
6107 GET_OPB(a3) # a3 <- B
6108 GET_VREG(a2, a3) # a2 <- vB
6109 EAS2(t0, rFP, t3) # t0 <- &fp[A]
6110 LOAD64(a0, a1, t0) # a0/a1 <- vAA/vAA+1
6111
6112 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6113 GET_INST_OPCODE(t0) # extract opcode from rINST
6114
6115 andi v0, a2, 0x20 # shift & 0x20
6116 srl v1, a1, a2 # rhi<- ahi >> (shift&31)
6117 bnez v0, .Lop_ushr_long_2addr_finish
6118 srl v0, a0, a2 # rlo<- alo >> (shift&31)
6119 not a0, a2 # alo<- 31-n (shift is 5b)
6120 sll a1, 1
6121 sll a1, a0 # ahi<- ahi << (32-(shift&31))
6122 or v0, a1 # rlo<- rlo | ahi
6123 SET_VREG64_GOTO(v0, v1, t3, t0) # vAA/vAA+1 <- a0/a1
6124
6125/* ------------------------------ */
6126 .balign 128
6127.L_op_add_float_2addr: /* 0xc6 */
6128/* File: mips/op_add_float_2addr.S */
6129/* File: mips/fbinop2addr.S */
6130 /*
6131 * Generic 32-bit "/2addr" binary operation. Provide an "instr"
6132 * that specifies an instruction that performs "result = a0 op a1".
6133 * This could be an MIPS instruction or a function call.
6134 *
6135 * For: add-float/2addr, sub-float/2addr, mul-float/2addr,
6136 * div-float/2addr, rem-float/2addr
6137 */
6138 /* binop/2addr vA, vB */
6139 GET_OPA4(rOBJ) # t1 <- A+
6140 GET_OPB(a3) # a3 <- B
6141 GET_VREG_F(fa0, rOBJ)
6142 GET_VREG_F(fa1, a3)
6143 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6144
6145 add.s fv0, fa0, fa1
6146 SET_VREG_F(fv0, rOBJ) # vAA <- result
6147 GET_INST_OPCODE(t0) # extract opcode from rINST
6148 GOTO_OPCODE(t0) # jump to next instruction
6149
6150
6151/* ------------------------------ */
6152 .balign 128
6153.L_op_sub_float_2addr: /* 0xc7 */
6154/* File: mips/op_sub_float_2addr.S */
6155/* File: mips/fbinop2addr.S */
6156 /*
6157 * Generic 32-bit "/2addr" binary operation. Provide an "instr"
6158 * that specifies an instruction that performs "result = a0 op a1".
6159 * This could be an MIPS instruction or a function call.
6160 *
6161 * For: add-float/2addr, sub-float/2addr, mul-float/2addr,
6162 * div-float/2addr, rem-float/2addr
6163 */
6164 /* binop/2addr vA, vB */
6165 GET_OPA4(rOBJ) # t1 <- A+
6166 GET_OPB(a3) # a3 <- B
6167 GET_VREG_F(fa0, rOBJ)
6168 GET_VREG_F(fa1, a3)
6169 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6170
6171 sub.s fv0, fa0, fa1
6172 SET_VREG_F(fv0, rOBJ) # vAA <- result
6173 GET_INST_OPCODE(t0) # extract opcode from rINST
6174 GOTO_OPCODE(t0) # jump to next instruction
6175
6176
6177/* ------------------------------ */
6178 .balign 128
6179.L_op_mul_float_2addr: /* 0xc8 */
6180/* File: mips/op_mul_float_2addr.S */
6181/* File: mips/fbinop2addr.S */
6182 /*
6183 * Generic 32-bit "/2addr" binary operation. Provide an "instr"
6184 * that specifies an instruction that performs "result = a0 op a1".
6185 * This could be an MIPS instruction or a function call.
6186 *
6187 * For: add-float/2addr, sub-float/2addr, mul-float/2addr,
6188 * div-float/2addr, rem-float/2addr
6189 */
6190 /* binop/2addr vA, vB */
6191 GET_OPA4(rOBJ) # t1 <- A+
6192 GET_OPB(a3) # a3 <- B
6193 GET_VREG_F(fa0, rOBJ)
6194 GET_VREG_F(fa1, a3)
6195 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6196
6197 mul.s fv0, fa0, fa1
6198 SET_VREG_F(fv0, rOBJ) # vAA <- result
6199 GET_INST_OPCODE(t0) # extract opcode from rINST
6200 GOTO_OPCODE(t0) # jump to next instruction
6201
6202
6203/* ------------------------------ */
6204 .balign 128
6205.L_op_div_float_2addr: /* 0xc9 */
6206/* File: mips/op_div_float_2addr.S */
6207/* File: mips/fbinop2addr.S */
6208 /*
6209 * Generic 32-bit "/2addr" binary operation. Provide an "instr"
6210 * that specifies an instruction that performs "result = a0 op a1".
6211 * This could be an MIPS instruction or a function call.
6212 *
6213 * For: add-float/2addr, sub-float/2addr, mul-float/2addr,
6214 * div-float/2addr, rem-float/2addr
6215 */
6216 /* binop/2addr vA, vB */
6217 GET_OPA4(rOBJ) # t1 <- A+
6218 GET_OPB(a3) # a3 <- B
6219 GET_VREG_F(fa0, rOBJ)
6220 GET_VREG_F(fa1, a3)
6221 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6222
6223 div.s fv0, fa0, fa1
6224 SET_VREG_F(fv0, rOBJ) # vAA <- result
6225 GET_INST_OPCODE(t0) # extract opcode from rINST
6226 GOTO_OPCODE(t0) # jump to next instruction
6227
6228
6229/* ------------------------------ */
6230 .balign 128
6231.L_op_rem_float_2addr: /* 0xca */
6232/* File: mips/op_rem_float_2addr.S */
6233/* File: mips/fbinop2addr.S */
6234 /*
6235 * Generic 32-bit "/2addr" binary operation. Provide an "instr"
6236 * that specifies an instruction that performs "result = a0 op a1".
6237 * This could be an MIPS instruction or a function call.
6238 *
6239 * For: add-float/2addr, sub-float/2addr, mul-float/2addr,
6240 * div-float/2addr, rem-float/2addr
6241 */
6242 /* binop/2addr vA, vB */
6243 GET_OPA4(rOBJ) # t1 <- A+
6244 GET_OPB(a3) # a3 <- B
6245 GET_VREG_F(fa0, rOBJ)
6246 GET_VREG_F(fa1, a3)
6247 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6248
6249 JAL(fmodf)
6250 SET_VREG_F(fv0, rOBJ) # vAA <- result
6251 GET_INST_OPCODE(t0) # extract opcode from rINST
6252 GOTO_OPCODE(t0) # jump to next instruction
6253
6254
6255/* ------------------------------ */
6256 .balign 128
6257.L_op_add_double_2addr: /* 0xcb */
6258/* File: mips/op_add_double_2addr.S */
6259/* File: mips/fbinopWide2addr.S */
6260 /*
6261 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
6262 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
6263 * This could be an MIPS instruction or a function call.
6264 *
6265 * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6266 * div-double/2addr, rem-double/2addr
6267 */
6268 /* binop/2addr vA, vB */
6269 GET_OPA4(rOBJ) # rOBJ <- A+
6270 GET_OPB(a1) # a1 <- B
6271 EAS2(a1, rFP, a1) # a1 <- &fp[B]
6272 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
6273 LOAD64_F(fa0, fa0f, t0)
6274 LOAD64_F(fa1, fa1f, a1)
6275
6276 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6277 add.d fv0, fa0, fa1
6278 SET_VREG64_F(fv0, fv0f, rOBJ)
6279 GET_INST_OPCODE(t0) # extract opcode from rINST
6280 GOTO_OPCODE(t0) # jump to next instruction
6281
6282
6283/* ------------------------------ */
6284 .balign 128
6285.L_op_sub_double_2addr: /* 0xcc */
6286/* File: mips/op_sub_double_2addr.S */
6287/* File: mips/fbinopWide2addr.S */
6288 /*
6289 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
6290 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
6291 * This could be an MIPS instruction or a function call.
6292 *
6293 * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6294 * div-double/2addr, rem-double/2addr
6295 */
6296 /* binop/2addr vA, vB */
6297 GET_OPA4(rOBJ) # rOBJ <- A+
6298 GET_OPB(a1) # a1 <- B
6299 EAS2(a1, rFP, a1) # a1 <- &fp[B]
6300 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
6301 LOAD64_F(fa0, fa0f, t0)
6302 LOAD64_F(fa1, fa1f, a1)
6303
6304 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6305 sub.d fv0, fa0, fa1
6306 SET_VREG64_F(fv0, fv0f, rOBJ)
6307 GET_INST_OPCODE(t0) # extract opcode from rINST
6308 GOTO_OPCODE(t0) # jump to next instruction
6309
6310
6311/* ------------------------------ */
6312 .balign 128
6313.L_op_mul_double_2addr: /* 0xcd */
6314/* File: mips/op_mul_double_2addr.S */
6315/* File: mips/fbinopWide2addr.S */
6316 /*
6317 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
6318 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
6319 * This could be an MIPS instruction or a function call.
6320 *
6321 * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6322 * div-double/2addr, rem-double/2addr
6323 */
6324 /* binop/2addr vA, vB */
6325 GET_OPA4(rOBJ) # rOBJ <- A+
6326 GET_OPB(a1) # a1 <- B
6327 EAS2(a1, rFP, a1) # a1 <- &fp[B]
6328 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
6329 LOAD64_F(fa0, fa0f, t0)
6330 LOAD64_F(fa1, fa1f, a1)
6331
6332 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6333 mul.d fv0, fa0, fa1
6334 SET_VREG64_F(fv0, fv0f, rOBJ)
6335 GET_INST_OPCODE(t0) # extract opcode from rINST
6336 GOTO_OPCODE(t0) # jump to next instruction
6337
6338
6339/* ------------------------------ */
6340 .balign 128
6341.L_op_div_double_2addr: /* 0xce */
6342/* File: mips/op_div_double_2addr.S */
6343/* File: mips/fbinopWide2addr.S */
6344 /*
6345 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
6346 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
6347 * This could be an MIPS instruction or a function call.
6348 *
6349 * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6350 * div-double/2addr, rem-double/2addr
6351 */
6352 /* binop/2addr vA, vB */
6353 GET_OPA4(rOBJ) # rOBJ <- A+
6354 GET_OPB(a1) # a1 <- B
6355 EAS2(a1, rFP, a1) # a1 <- &fp[B]
6356 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
6357 LOAD64_F(fa0, fa0f, t0)
6358 LOAD64_F(fa1, fa1f, a1)
6359
6360 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6361 div.d fv0, fa0, fa1
6362 SET_VREG64_F(fv0, fv0f, rOBJ)
6363 GET_INST_OPCODE(t0) # extract opcode from rINST
6364 GOTO_OPCODE(t0) # jump to next instruction
6365
6366
6367/* ------------------------------ */
6368 .balign 128
6369.L_op_rem_double_2addr: /* 0xcf */
6370/* File: mips/op_rem_double_2addr.S */
6371/* File: mips/fbinopWide2addr.S */
6372 /*
6373 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line
6374 * that specifies an instruction that performs "result = a0-a1 op a2-a3".
6375 * This could be an MIPS instruction or a function call.
6376 *
6377 * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
6378 * div-double/2addr, rem-double/2addr
6379 */
6380 /* binop/2addr vA, vB */
6381 GET_OPA4(rOBJ) # rOBJ <- A+
6382 GET_OPB(a1) # a1 <- B
6383 EAS2(a1, rFP, a1) # a1 <- &fp[B]
6384 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
6385 LOAD64_F(fa0, fa0f, t0)
6386 LOAD64_F(fa1, fa1f, a1)
6387
6388 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
6389 JAL(fmod)
6390 SET_VREG64_F(fv0, fv0f, rOBJ)
6391 GET_INST_OPCODE(t0) # extract opcode from rINST
6392 GOTO_OPCODE(t0) # jump to next instruction
6393
6394
6395/* ------------------------------ */
6396 .balign 128
6397.L_op_add_int_lit16: /* 0xd0 */
6398/* File: mips/op_add_int_lit16.S */
6399/* File: mips/binopLit16.S */
6400 /*
6401 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6402 * that specifies an instruction that performs "result = a0 op a1".
6403 * This could be an MIPS instruction or a function call. (If the result
6404 * comes back in a register other than a0, you can override "result".)
6405 *
6406 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6407 * vCC (a1). Useful for integer division and modulus.
6408 *
6409 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6410 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6411 */
6412 # binop/lit16 vA, vB, /* +CCCC */
6413 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6414 GET_OPB(a2) # a2 <- B
6415 GET_OPA(rOBJ) # rOBJ <- A+
6416 GET_VREG(a0, a2) # a0 <- vB
6417 and rOBJ, rOBJ, 15
6418 .if 0
6419 # cmp a1, 0; is second operand zero?
6420 beqz a1, common_errDivideByZero
6421 .endif
6422 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6423
6424 # optional op
6425 addu a0, a0, a1 # a0 <- op, a0-a3 changed
6426 GET_INST_OPCODE(t0) # extract opcode from rINST
6427 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6428 /* 10-13 instructions */
6429
6430
6431/* ------------------------------ */
6432 .balign 128
6433.L_op_rsub_int: /* 0xd1 */
6434/* File: mips/op_rsub_int.S */
6435/* this op is "rsub-int", but can be thought of as "rsub-int/lit16" */
6436/* File: mips/binopLit16.S */
6437 /*
6438 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6439 * that specifies an instruction that performs "result = a0 op a1".
6440 * This could be an MIPS instruction or a function call. (If the result
6441 * comes back in a register other than a0, you can override "result".)
6442 *
6443 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6444 * vCC (a1). Useful for integer division and modulus.
6445 *
6446 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6447 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6448 */
6449 # binop/lit16 vA, vB, /* +CCCC */
6450 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6451 GET_OPB(a2) # a2 <- B
6452 GET_OPA(rOBJ) # rOBJ <- A+
6453 GET_VREG(a0, a2) # a0 <- vB
6454 and rOBJ, rOBJ, 15
6455 .if 0
6456 # cmp a1, 0; is second operand zero?
6457 beqz a1, common_errDivideByZero
6458 .endif
6459 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6460
6461 # optional op
6462 subu a0, a1, a0 # a0 <- op, a0-a3 changed
6463 GET_INST_OPCODE(t0) # extract opcode from rINST
6464 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6465 /* 10-13 instructions */
6466
6467
6468/* ------------------------------ */
6469 .balign 128
6470.L_op_mul_int_lit16: /* 0xd2 */
6471/* File: mips/op_mul_int_lit16.S */
6472/* File: mips/binopLit16.S */
6473 /*
6474 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6475 * that specifies an instruction that performs "result = a0 op a1".
6476 * This could be an MIPS instruction or a function call. (If the result
6477 * comes back in a register other than a0, you can override "result".)
6478 *
6479 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6480 * vCC (a1). Useful for integer division and modulus.
6481 *
6482 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6483 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6484 */
6485 # binop/lit16 vA, vB, /* +CCCC */
6486 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6487 GET_OPB(a2) # a2 <- B
6488 GET_OPA(rOBJ) # rOBJ <- A+
6489 GET_VREG(a0, a2) # a0 <- vB
6490 and rOBJ, rOBJ, 15
6491 .if 0
6492 # cmp a1, 0; is second operand zero?
6493 beqz a1, common_errDivideByZero
6494 .endif
6495 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6496
6497 # optional op
6498 mul a0, a0, a1 # a0 <- op, a0-a3 changed
6499 GET_INST_OPCODE(t0) # extract opcode from rINST
6500 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6501 /* 10-13 instructions */
6502
6503
6504/* ------------------------------ */
6505 .balign 128
6506.L_op_div_int_lit16: /* 0xd3 */
6507/* File: mips/op_div_int_lit16.S */
6508#ifdef MIPS32REVGE6
6509/* File: mips/binopLit16.S */
6510 /*
6511 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6512 * that specifies an instruction that performs "result = a0 op a1".
6513 * This could be an MIPS instruction or a function call. (If the result
6514 * comes back in a register other than a0, you can override "result".)
6515 *
6516 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6517 * vCC (a1). Useful for integer division and modulus.
6518 *
6519 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6520 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6521 */
6522 # binop/lit16 vA, vB, /* +CCCC */
6523 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6524 GET_OPB(a2) # a2 <- B
6525 GET_OPA(rOBJ) # rOBJ <- A+
6526 GET_VREG(a0, a2) # a0 <- vB
6527 and rOBJ, rOBJ, 15
6528 .if 1
6529 # cmp a1, 0; is second operand zero?
6530 beqz a1, common_errDivideByZero
6531 .endif
6532 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6533
6534 # optional op
6535 div a0, a0, a1 # a0 <- op, a0-a3 changed
6536 GET_INST_OPCODE(t0) # extract opcode from rINST
6537 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6538 /* 10-13 instructions */
6539
6540#else
6541/* File: mips/binopLit16.S */
6542 /*
6543 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6544 * that specifies an instruction that performs "result = a0 op a1".
6545 * This could be an MIPS instruction or a function call. (If the result
6546 * comes back in a register other than a0, you can override "result".)
6547 *
6548 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6549 * vCC (a1). Useful for integer division and modulus.
6550 *
6551 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6552 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6553 */
6554 # binop/lit16 vA, vB, /* +CCCC */
6555 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6556 GET_OPB(a2) # a2 <- B
6557 GET_OPA(rOBJ) # rOBJ <- A+
6558 GET_VREG(a0, a2) # a0 <- vB
6559 and rOBJ, rOBJ, 15
6560 .if 1
6561 # cmp a1, 0; is second operand zero?
6562 beqz a1, common_errDivideByZero
6563 .endif
6564 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6565
6566 div zero, a0, a1 # optional op
6567 mflo a0 # a0 <- op, a0-a3 changed
6568 GET_INST_OPCODE(t0) # extract opcode from rINST
6569 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6570 /* 10-13 instructions */
6571
6572#endif
6573
6574/* ------------------------------ */
6575 .balign 128
6576.L_op_rem_int_lit16: /* 0xd4 */
6577/* File: mips/op_rem_int_lit16.S */
6578#ifdef MIPS32REVGE6
6579/* File: mips/binopLit16.S */
6580 /*
6581 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6582 * that specifies an instruction that performs "result = a0 op a1".
6583 * This could be an MIPS instruction or a function call. (If the result
6584 * comes back in a register other than a0, you can override "result".)
6585 *
6586 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6587 * vCC (a1). Useful for integer division and modulus.
6588 *
6589 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6590 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6591 */
6592 # binop/lit16 vA, vB, /* +CCCC */
6593 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6594 GET_OPB(a2) # a2 <- B
6595 GET_OPA(rOBJ) # rOBJ <- A+
6596 GET_VREG(a0, a2) # a0 <- vB
6597 and rOBJ, rOBJ, 15
6598 .if 1
6599 # cmp a1, 0; is second operand zero?
6600 beqz a1, common_errDivideByZero
6601 .endif
6602 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6603
6604 # optional op
6605 mod a0, a0, a1 # a0 <- op, a0-a3 changed
6606 GET_INST_OPCODE(t0) # extract opcode from rINST
6607 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6608 /* 10-13 instructions */
6609
6610#else
6611/* File: mips/binopLit16.S */
6612 /*
6613 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6614 * that specifies an instruction that performs "result = a0 op a1".
6615 * This could be an MIPS instruction or a function call. (If the result
6616 * comes back in a register other than a0, you can override "result".)
6617 *
6618 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6619 * vCC (a1). Useful for integer division and modulus.
6620 *
6621 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6622 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6623 */
6624 # binop/lit16 vA, vB, /* +CCCC */
6625 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6626 GET_OPB(a2) # a2 <- B
6627 GET_OPA(rOBJ) # rOBJ <- A+
6628 GET_VREG(a0, a2) # a0 <- vB
6629 and rOBJ, rOBJ, 15
6630 .if 1
6631 # cmp a1, 0; is second operand zero?
6632 beqz a1, common_errDivideByZero
6633 .endif
6634 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6635
6636 div zero, a0, a1 # optional op
6637 mfhi a0 # a0 <- op, a0-a3 changed
6638 GET_INST_OPCODE(t0) # extract opcode from rINST
6639 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6640 /* 10-13 instructions */
6641
6642#endif
6643
6644/* ------------------------------ */
6645 .balign 128
6646.L_op_and_int_lit16: /* 0xd5 */
6647/* File: mips/op_and_int_lit16.S */
6648/* File: mips/binopLit16.S */
6649 /*
6650 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6651 * that specifies an instruction that performs "result = a0 op a1".
6652 * This could be an MIPS instruction or a function call. (If the result
6653 * comes back in a register other than a0, you can override "result".)
6654 *
6655 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6656 * vCC (a1). Useful for integer division and modulus.
6657 *
6658 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6659 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6660 */
6661 # binop/lit16 vA, vB, /* +CCCC */
6662 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6663 GET_OPB(a2) # a2 <- B
6664 GET_OPA(rOBJ) # rOBJ <- A+
6665 GET_VREG(a0, a2) # a0 <- vB
6666 and rOBJ, rOBJ, 15
6667 .if 0
6668 # cmp a1, 0; is second operand zero?
6669 beqz a1, common_errDivideByZero
6670 .endif
6671 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6672
6673 # optional op
6674 and a0, a0, a1 # a0 <- op, a0-a3 changed
6675 GET_INST_OPCODE(t0) # extract opcode from rINST
6676 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6677 /* 10-13 instructions */
6678
6679
6680/* ------------------------------ */
6681 .balign 128
6682.L_op_or_int_lit16: /* 0xd6 */
6683/* File: mips/op_or_int_lit16.S */
6684/* File: mips/binopLit16.S */
6685 /*
6686 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6687 * that specifies an instruction that performs "result = a0 op a1".
6688 * This could be an MIPS instruction or a function call. (If the result
6689 * comes back in a register other than a0, you can override "result".)
6690 *
6691 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6692 * vCC (a1). Useful for integer division and modulus.
6693 *
6694 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6695 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6696 */
6697 # binop/lit16 vA, vB, /* +CCCC */
6698 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6699 GET_OPB(a2) # a2 <- B
6700 GET_OPA(rOBJ) # rOBJ <- A+
6701 GET_VREG(a0, a2) # a0 <- vB
6702 and rOBJ, rOBJ, 15
6703 .if 0
6704 # cmp a1, 0; is second operand zero?
6705 beqz a1, common_errDivideByZero
6706 .endif
6707 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6708
6709 # optional op
6710 or a0, a0, a1 # a0 <- op, a0-a3 changed
6711 GET_INST_OPCODE(t0) # extract opcode from rINST
6712 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6713 /* 10-13 instructions */
6714
6715
6716/* ------------------------------ */
6717 .balign 128
6718.L_op_xor_int_lit16: /* 0xd7 */
6719/* File: mips/op_xor_int_lit16.S */
6720/* File: mips/binopLit16.S */
6721 /*
6722 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
6723 * that specifies an instruction that performs "result = a0 op a1".
6724 * This could be an MIPS instruction or a function call. (If the result
6725 * comes back in a register other than a0, you can override "result".)
6726 *
6727 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6728 * vCC (a1). Useful for integer division and modulus.
6729 *
6730 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16,
6731 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16
6732 */
6733 # binop/lit16 vA, vB, /* +CCCC */
6734 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended)
6735 GET_OPB(a2) # a2 <- B
6736 GET_OPA(rOBJ) # rOBJ <- A+
6737 GET_VREG(a0, a2) # a0 <- vB
6738 and rOBJ, rOBJ, 15
6739 .if 0
6740 # cmp a1, 0; is second operand zero?
6741 beqz a1, common_errDivideByZero
6742 .endif
6743 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6744
6745 # optional op
6746 xor a0, a0, a1 # a0 <- op, a0-a3 changed
6747 GET_INST_OPCODE(t0) # extract opcode from rINST
6748 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6749 /* 10-13 instructions */
6750
6751
6752/* ------------------------------ */
6753 .balign 128
6754.L_op_add_int_lit8: /* 0xd8 */
6755/* File: mips/op_add_int_lit8.S */
6756/* File: mips/binopLit8.S */
6757 /*
6758 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
6759 * that specifies an instruction that performs "result = a0 op a1".
6760 * This could be an MIPS instruction or a function call. (If the result
6761 * comes back in a register other than a0, you can override "result".)
6762 *
6763 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6764 * vCC (a1). Useful for integer division and modulus.
6765 *
6766 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6767 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6768 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
6769 */
6770 # binop/lit8 vAA, vBB, /* +CC */
6771 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
6772 GET_OPA(rOBJ) # rOBJ <- AA
6773 and a2, a3, 255 # a2 <- BB
6774 GET_VREG(a0, a2) # a0 <- vBB
6775 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
6776 .if 0
6777 # is second operand zero?
6778 beqz a1, common_errDivideByZero
6779 .endif
6780 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6781
6782 # optional op
6783 addu a0, a0, a1 # a0 <- op, a0-a3 changed
6784 GET_INST_OPCODE(t0) # extract opcode from rINST
6785 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6786 /* 10-12 instructions */
6787
6788
6789/* ------------------------------ */
6790 .balign 128
6791.L_op_rsub_int_lit8: /* 0xd9 */
6792/* File: mips/op_rsub_int_lit8.S */
6793/* File: mips/binopLit8.S */
6794 /*
6795 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
6796 * that specifies an instruction that performs "result = a0 op a1".
6797 * This could be an MIPS instruction or a function call. (If the result
6798 * comes back in a register other than a0, you can override "result".)
6799 *
6800 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6801 * vCC (a1). Useful for integer division and modulus.
6802 *
6803 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6804 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6805 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
6806 */
6807 # binop/lit8 vAA, vBB, /* +CC */
6808 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
6809 GET_OPA(rOBJ) # rOBJ <- AA
6810 and a2, a3, 255 # a2 <- BB
6811 GET_VREG(a0, a2) # a0 <- vBB
6812 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
6813 .if 0
6814 # is second operand zero?
6815 beqz a1, common_errDivideByZero
6816 .endif
6817 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6818
6819 # optional op
6820 subu a0, a1, a0 # a0 <- op, a0-a3 changed
6821 GET_INST_OPCODE(t0) # extract opcode from rINST
6822 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6823 /* 10-12 instructions */
6824
6825
6826/* ------------------------------ */
6827 .balign 128
6828.L_op_mul_int_lit8: /* 0xda */
6829/* File: mips/op_mul_int_lit8.S */
6830/* File: mips/binopLit8.S */
6831 /*
6832 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
6833 * that specifies an instruction that performs "result = a0 op a1".
6834 * This could be an MIPS instruction or a function call. (If the result
6835 * comes back in a register other than a0, you can override "result".)
6836 *
6837 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6838 * vCC (a1). Useful for integer division and modulus.
6839 *
6840 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6841 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6842 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
6843 */
6844 # binop/lit8 vAA, vBB, /* +CC */
6845 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
6846 GET_OPA(rOBJ) # rOBJ <- AA
6847 and a2, a3, 255 # a2 <- BB
6848 GET_VREG(a0, a2) # a0 <- vBB
6849 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
6850 .if 0
6851 # is second operand zero?
6852 beqz a1, common_errDivideByZero
6853 .endif
6854 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6855
6856 # optional op
6857 mul a0, a0, a1 # a0 <- op, a0-a3 changed
6858 GET_INST_OPCODE(t0) # extract opcode from rINST
6859 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6860 /* 10-12 instructions */
6861
6862
6863/* ------------------------------ */
6864 .balign 128
6865.L_op_div_int_lit8: /* 0xdb */
6866/* File: mips/op_div_int_lit8.S */
6867#ifdef MIPS32REVGE6
6868/* File: mips/binopLit8.S */
6869 /*
6870 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
6871 * that specifies an instruction that performs "result = a0 op a1".
6872 * This could be an MIPS instruction or a function call. (If the result
6873 * comes back in a register other than a0, you can override "result".)
6874 *
6875 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6876 * vCC (a1). Useful for integer division and modulus.
6877 *
6878 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6879 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6880 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
6881 */
6882 # binop/lit8 vAA, vBB, /* +CC */
6883 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
6884 GET_OPA(rOBJ) # rOBJ <- AA
6885 and a2, a3, 255 # a2 <- BB
6886 GET_VREG(a0, a2) # a0 <- vBB
6887 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
6888 .if 1
6889 # is second operand zero?
6890 beqz a1, common_errDivideByZero
6891 .endif
6892 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6893
6894 # optional op
6895 div a0, a0, a1 # a0 <- op, a0-a3 changed
6896 GET_INST_OPCODE(t0) # extract opcode from rINST
6897 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6898 /* 10-12 instructions */
6899
6900#else
6901/* File: mips/binopLit8.S */
6902 /*
6903 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
6904 * that specifies an instruction that performs "result = a0 op a1".
6905 * This could be an MIPS instruction or a function call. (If the result
6906 * comes back in a register other than a0, you can override "result".)
6907 *
6908 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6909 * vCC (a1). Useful for integer division and modulus.
6910 *
6911 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6912 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6913 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
6914 */
6915 # binop/lit8 vAA, vBB, /* +CC */
6916 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
6917 GET_OPA(rOBJ) # rOBJ <- AA
6918 and a2, a3, 255 # a2 <- BB
6919 GET_VREG(a0, a2) # a0 <- vBB
6920 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
6921 .if 1
6922 # is second operand zero?
6923 beqz a1, common_errDivideByZero
6924 .endif
6925 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6926
6927 div zero, a0, a1 # optional op
6928 mflo a0 # a0 <- op, a0-a3 changed
6929 GET_INST_OPCODE(t0) # extract opcode from rINST
6930 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6931 /* 10-12 instructions */
6932
6933#endif
6934
6935/* ------------------------------ */
6936 .balign 128
6937.L_op_rem_int_lit8: /* 0xdc */
6938/* File: mips/op_rem_int_lit8.S */
6939#ifdef MIPS32REVGE6
6940/* File: mips/binopLit8.S */
6941 /*
6942 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
6943 * that specifies an instruction that performs "result = a0 op a1".
6944 * This could be an MIPS instruction or a function call. (If the result
6945 * comes back in a register other than a0, you can override "result".)
6946 *
6947 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6948 * vCC (a1). Useful for integer division and modulus.
6949 *
6950 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6951 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6952 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
6953 */
6954 # binop/lit8 vAA, vBB, /* +CC */
6955 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
6956 GET_OPA(rOBJ) # rOBJ <- AA
6957 and a2, a3, 255 # a2 <- BB
6958 GET_VREG(a0, a2) # a0 <- vBB
6959 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
6960 .if 1
6961 # is second operand zero?
6962 beqz a1, common_errDivideByZero
6963 .endif
6964 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6965
6966 # optional op
6967 mod a0, a0, a1 # a0 <- op, a0-a3 changed
6968 GET_INST_OPCODE(t0) # extract opcode from rINST
6969 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
6970 /* 10-12 instructions */
6971
6972#else
6973/* File: mips/binopLit8.S */
6974 /*
6975 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
6976 * that specifies an instruction that performs "result = a0 op a1".
6977 * This could be an MIPS instruction or a function call. (If the result
6978 * comes back in a register other than a0, you can override "result".)
6979 *
6980 * If "chkzero" is set to 1, we perform a divide-by-zero check on
6981 * vCC (a1). Useful for integer division and modulus.
6982 *
6983 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
6984 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
6985 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
6986 */
6987 # binop/lit8 vAA, vBB, /* +CC */
6988 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
6989 GET_OPA(rOBJ) # rOBJ <- AA
6990 and a2, a3, 255 # a2 <- BB
6991 GET_VREG(a0, a2) # a0 <- vBB
6992 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
6993 .if 1
6994 # is second operand zero?
6995 beqz a1, common_errDivideByZero
6996 .endif
6997 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
6998
6999 div zero, a0, a1 # optional op
7000 mfhi a0 # a0 <- op, a0-a3 changed
7001 GET_INST_OPCODE(t0) # extract opcode from rINST
7002 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
7003 /* 10-12 instructions */
7004
7005#endif
7006
7007/* ------------------------------ */
7008 .balign 128
7009.L_op_and_int_lit8: /* 0xdd */
7010/* File: mips/op_and_int_lit8.S */
7011/* File: mips/binopLit8.S */
7012 /*
7013 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
7014 * that specifies an instruction that performs "result = a0 op a1".
7015 * This could be an MIPS instruction or a function call. (If the result
7016 * comes back in a register other than a0, you can override "result".)
7017 *
7018 * If "chkzero" is set to 1, we perform a divide-by-zero check on
7019 * vCC (a1). Useful for integer division and modulus.
7020 *
7021 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
7022 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
7023 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
7024 */
7025 # binop/lit8 vAA, vBB, /* +CC */
7026 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
7027 GET_OPA(rOBJ) # rOBJ <- AA
7028 and a2, a3, 255 # a2 <- BB
7029 GET_VREG(a0, a2) # a0 <- vBB
7030 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
7031 .if 0
7032 # is second operand zero?
7033 beqz a1, common_errDivideByZero
7034 .endif
7035 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7036
7037 # optional op
7038 and a0, a0, a1 # a0 <- op, a0-a3 changed
7039 GET_INST_OPCODE(t0) # extract opcode from rINST
7040 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
7041 /* 10-12 instructions */
7042
7043
7044/* ------------------------------ */
7045 .balign 128
7046.L_op_or_int_lit8: /* 0xde */
7047/* File: mips/op_or_int_lit8.S */
7048/* File: mips/binopLit8.S */
7049 /*
7050 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
7051 * that specifies an instruction that performs "result = a0 op a1".
7052 * This could be an MIPS instruction or a function call. (If the result
7053 * comes back in a register other than a0, you can override "result".)
7054 *
7055 * If "chkzero" is set to 1, we perform a divide-by-zero check on
7056 * vCC (a1). Useful for integer division and modulus.
7057 *
7058 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
7059 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
7060 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
7061 */
7062 # binop/lit8 vAA, vBB, /* +CC */
7063 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
7064 GET_OPA(rOBJ) # rOBJ <- AA
7065 and a2, a3, 255 # a2 <- BB
7066 GET_VREG(a0, a2) # a0 <- vBB
7067 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
7068 .if 0
7069 # is second operand zero?
7070 beqz a1, common_errDivideByZero
7071 .endif
7072 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7073
7074 # optional op
7075 or a0, a0, a1 # a0 <- op, a0-a3 changed
7076 GET_INST_OPCODE(t0) # extract opcode from rINST
7077 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
7078 /* 10-12 instructions */
7079
7080
7081/* ------------------------------ */
7082 .balign 128
7083.L_op_xor_int_lit8: /* 0xdf */
7084/* File: mips/op_xor_int_lit8.S */
7085/* File: mips/binopLit8.S */
7086 /*
7087 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
7088 * that specifies an instruction that performs "result = a0 op a1".
7089 * This could be an MIPS instruction or a function call. (If the result
7090 * comes back in a register other than a0, you can override "result".)
7091 *
7092 * If "chkzero" is set to 1, we perform a divide-by-zero check on
7093 * vCC (a1). Useful for integer division and modulus.
7094 *
7095 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
7096 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
7097 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
7098 */
7099 # binop/lit8 vAA, vBB, /* +CC */
7100 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
7101 GET_OPA(rOBJ) # rOBJ <- AA
7102 and a2, a3, 255 # a2 <- BB
7103 GET_VREG(a0, a2) # a0 <- vBB
7104 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
7105 .if 0
7106 # is second operand zero?
7107 beqz a1, common_errDivideByZero
7108 .endif
7109 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7110
7111 # optional op
7112 xor a0, a0, a1 # a0 <- op, a0-a3 changed
7113 GET_INST_OPCODE(t0) # extract opcode from rINST
7114 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
7115 /* 10-12 instructions */
7116
7117
7118/* ------------------------------ */
7119 .balign 128
7120.L_op_shl_int_lit8: /* 0xe0 */
7121/* File: mips/op_shl_int_lit8.S */
7122/* File: mips/binopLit8.S */
7123 /*
7124 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
7125 * that specifies an instruction that performs "result = a0 op a1".
7126 * This could be an MIPS instruction or a function call. (If the result
7127 * comes back in a register other than a0, you can override "result".)
7128 *
7129 * If "chkzero" is set to 1, we perform a divide-by-zero check on
7130 * vCC (a1). Useful for integer division and modulus.
7131 *
7132 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
7133 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
7134 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
7135 */
7136 # binop/lit8 vAA, vBB, /* +CC */
7137 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
7138 GET_OPA(rOBJ) # rOBJ <- AA
7139 and a2, a3, 255 # a2 <- BB
7140 GET_VREG(a0, a2) # a0 <- vBB
7141 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
7142 .if 0
7143 # is second operand zero?
7144 beqz a1, common_errDivideByZero
7145 .endif
7146 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7147
7148 # optional op
7149 sll a0, a0, a1 # a0 <- op, a0-a3 changed
7150 GET_INST_OPCODE(t0) # extract opcode from rINST
7151 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
7152 /* 10-12 instructions */
7153
7154
7155/* ------------------------------ */
7156 .balign 128
7157.L_op_shr_int_lit8: /* 0xe1 */
7158/* File: mips/op_shr_int_lit8.S */
7159/* File: mips/binopLit8.S */
7160 /*
7161 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
7162 * that specifies an instruction that performs "result = a0 op a1".
7163 * This could be an MIPS instruction or a function call. (If the result
7164 * comes back in a register other than a0, you can override "result".)
7165 *
7166 * If "chkzero" is set to 1, we perform a divide-by-zero check on
7167 * vCC (a1). Useful for integer division and modulus.
7168 *
7169 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
7170 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
7171 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
7172 */
7173 # binop/lit8 vAA, vBB, /* +CC */
7174 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
7175 GET_OPA(rOBJ) # rOBJ <- AA
7176 and a2, a3, 255 # a2 <- BB
7177 GET_VREG(a0, a2) # a0 <- vBB
7178 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
7179 .if 0
7180 # is second operand zero?
7181 beqz a1, common_errDivideByZero
7182 .endif
7183 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7184
7185 # optional op
7186 sra a0, a0, a1 # a0 <- op, a0-a3 changed
7187 GET_INST_OPCODE(t0) # extract opcode from rINST
7188 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
7189 /* 10-12 instructions */
7190
7191
7192/* ------------------------------ */
7193 .balign 128
7194.L_op_ushr_int_lit8: /* 0xe2 */
7195/* File: mips/op_ushr_int_lit8.S */
7196/* File: mips/binopLit8.S */
7197 /*
7198 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
7199 * that specifies an instruction that performs "result = a0 op a1".
7200 * This could be an MIPS instruction or a function call. (If the result
7201 * comes back in a register other than a0, you can override "result".)
7202 *
7203 * If "chkzero" is set to 1, we perform a divide-by-zero check on
7204 * vCC (a1). Useful for integer division and modulus.
7205 *
7206 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8,
7207 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8,
7208 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
7209 */
7210 # binop/lit8 vAA, vBB, /* +CC */
7211 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC)
7212 GET_OPA(rOBJ) # rOBJ <- AA
7213 and a2, a3, 255 # a2 <- BB
7214 GET_VREG(a0, a2) # a0 <- vBB
7215 sra a1, a3, 8 # a1 <- ssssssCC (sign extended)
7216 .if 0
7217 # is second operand zero?
7218 beqz a1, common_errDivideByZero
7219 .endif
7220 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7221
7222 # optional op
7223 srl a0, a0, a1 # a0 <- op, a0-a3 changed
7224 GET_INST_OPCODE(t0) # extract opcode from rINST
7225 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0
7226 /* 10-12 instructions */
7227
7228
7229/* ------------------------------ */
7230 .balign 128
7231.L_op_iget_quick: /* 0xe3 */
7232/* File: mips/op_iget_quick.S */
7233 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
7234 # op vA, vB, offset /* CCCC */
7235 GET_OPB(a2) # a2 <- B
7236 GET_VREG(a3, a2) # a3 <- object we're operating on
7237 FETCH(a1, 1) # a1 <- field byte offset
7238 GET_OPA4(a2) # a2 <- A(+)
7239 # check object for null
7240 beqz a3, common_errNullObject # object was null
7241 addu t0, a3, a1
7242 lw a0, 0(t0) # a0 <- obj.field (8/16/32 bits)
7243 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7244 GET_INST_OPCODE(t0) # extract opcode from rINST
7245 SET_VREG_GOTO(a0, a2, t0) # fp[A] <- a0
7246
7247/* ------------------------------ */
7248 .balign 128
7249.L_op_iget_wide_quick: /* 0xe4 */
7250/* File: mips/op_iget_wide_quick.S */
7251 # iget-wide-quick vA, vB, offset /* CCCC */
7252 GET_OPB(a2) # a2 <- B
7253 GET_VREG(a3, a2) # a3 <- object we're operating on
7254 FETCH(a1, 1) # a1 <- field byte offset
7255 GET_OPA4(a2) # a2 <- A(+)
7256 # check object for null
7257 beqz a3, common_errNullObject # object was null
7258 addu t0, a3, a1 # t0 <- a3 + a1
7259 LOAD64(a0, a1, t0) # a0 <- obj.field (64 bits, aligned)
7260 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7261 GET_INST_OPCODE(t0) # extract opcode from rINST
7262 SET_VREG64(a0, a1, a2) # fp[A] <- a0/a1
7263 GOTO_OPCODE(t0) # jump to next instruction
7264
7265/* ------------------------------ */
7266 .balign 128
7267.L_op_iget_object_quick: /* 0xe5 */
7268/* File: mips/op_iget_object_quick.S */
7269 /* For: iget-object-quick */
7270 /* op vA, vB, offset@CCCC */
7271 GET_OPB(a2) # a2 <- B
7272 FETCH(a1, 1) # a1 <- field byte offset
7273 EXPORT_PC()
7274 GET_VREG(a0, a2) # a0 <- object we're operating on
7275 JAL(artIGetObjectFromMterp) # v0 <- GetObj(obj, offset)
7276 lw a3, THREAD_EXCEPTION_OFFSET(rSELF)
7277 GET_OPA4(a2) # a2<- A+
7278 PREFETCH_INST(2) # load rINST
7279 bnez a3, MterpPossibleException # bail out
7280 SET_VREG_OBJECT(v0, a2) # fp[A] <- v0
7281 ADVANCE(2) # advance rPC
7282 GET_INST_OPCODE(t0) # extract opcode from rINST
7283 GOTO_OPCODE(t0) # jump to next instruction
7284
7285/* ------------------------------ */
7286 .balign 128
7287.L_op_iput_quick: /* 0xe6 */
7288/* File: mips/op_iput_quick.S */
7289 /* For: iput-quick, iput-object-quick */
7290 # op vA, vB, offset /* CCCC */
7291 GET_OPB(a2) # a2 <- B
7292 GET_VREG(a3, a2) # a3 <- fp[B], the object pointer
7293 FETCH(a1, 1) # a1 <- field byte offset
7294 GET_OPA4(a2) # a2 <- A(+)
7295 beqz a3, common_errNullObject # object was null
7296 GET_VREG(a0, a2) # a0 <- fp[A]
7297 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7298 addu t0, a3, a1
7299 sw a0, 0(t0) # obj.field (8/16/32 bits) <- a0
7300 GET_INST_OPCODE(t0) # extract opcode from rINST
7301 GOTO_OPCODE(t0) # jump to next instruction
7302
7303/* ------------------------------ */
7304 .balign 128
7305.L_op_iput_wide_quick: /* 0xe7 */
7306/* File: mips/op_iput_wide_quick.S */
7307 # iput-wide-quick vA, vB, offset /* CCCC */
7308 GET_OPA4(a0) # a0 <- A(+)
7309 GET_OPB(a1) # a1 <- B
7310 GET_VREG(a2, a1) # a2 <- fp[B], the object pointer
7311 # check object for null
7312 beqz a2, common_errNullObject # object was null
7313 EAS2(a3, rFP, a0) # a3 <- &fp[A]
7314 LOAD64(a0, a1, a3) # a0/a1 <- fp[A]
7315 FETCH(a3, 1) # a3 <- field byte offset
7316 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7317 addu a2, a2, a3 # obj.field (64 bits, aligned) <- a0/a1
7318 STORE64(a0, a1, a2) # obj.field (64 bits, aligned) <- a0/a1
7319 GET_INST_OPCODE(t0) # extract opcode from rINST
7320 GOTO_OPCODE(t0) # jump to next instruction
7321
7322/* ------------------------------ */
7323 .balign 128
7324.L_op_iput_object_quick: /* 0xe8 */
7325/* File: mips/op_iput_object_quick.S */
7326 /* For: iput-object-quick */
7327 # op vA, vB, offset /* CCCC */
7328 EXPORT_PC()
7329 addu a0, rFP, OFF_FP_SHADOWFRAME
7330 move a1, rPC
7331 move a2, rINST
7332 JAL(MterpIputObjectQuick)
7333 beqz v0, MterpException
7334 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7335 GET_INST_OPCODE(t0) # extract opcode from rINST
7336 GOTO_OPCODE(t0) # jump to next instruction
7337
7338/* ------------------------------ */
7339 .balign 128
7340.L_op_invoke_virtual_quick: /* 0xe9 */
7341/* File: mips/op_invoke_virtual_quick.S */
7342/* File: mips/invoke.S */
7343 /*
7344 * Generic invoke handler wrapper.
7345 */
7346 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
7347 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
7348 .extern MterpInvokeVirtualQuick
7349 EXPORT_PC()
7350 move a0, rSELF
7351 addu a1, rFP, OFF_FP_SHADOWFRAME
7352 move a2, rPC
7353 move a3, rINST
7354 JAL(MterpInvokeVirtualQuick)
7355 beqz v0, MterpException
7356 FETCH_ADVANCE_INST(3)
7357 JAL(MterpShouldSwitchInterpreters)
7358 bnez v0, MterpFallback
7359 GET_INST_OPCODE(t0)
7360 GOTO_OPCODE(t0)
7361
7362
7363/* ------------------------------ */
7364 .balign 128
7365.L_op_invoke_virtual_range_quick: /* 0xea */
7366/* File: mips/op_invoke_virtual_range_quick.S */
7367/* File: mips/invoke.S */
7368 /*
7369 * Generic invoke handler wrapper.
7370 */
7371 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */
7372 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */
7373 .extern MterpInvokeVirtualQuickRange
7374 EXPORT_PC()
7375 move a0, rSELF
7376 addu a1, rFP, OFF_FP_SHADOWFRAME
7377 move a2, rPC
7378 move a3, rINST
7379 JAL(MterpInvokeVirtualQuickRange)
7380 beqz v0, MterpException
7381 FETCH_ADVANCE_INST(3)
7382 JAL(MterpShouldSwitchInterpreters)
7383 bnez v0, MterpFallback
7384 GET_INST_OPCODE(t0)
7385 GOTO_OPCODE(t0)
7386
7387
7388/* ------------------------------ */
7389 .balign 128
7390.L_op_iput_boolean_quick: /* 0xeb */
7391/* File: mips/op_iput_boolean_quick.S */
7392/* File: mips/op_iput_quick.S */
7393 /* For: iput-quick, iput-object-quick */
7394 # op vA, vB, offset /* CCCC */
7395 GET_OPB(a2) # a2 <- B
7396 GET_VREG(a3, a2) # a3 <- fp[B], the object pointer
7397 FETCH(a1, 1) # a1 <- field byte offset
7398 GET_OPA4(a2) # a2 <- A(+)
7399 beqz a3, common_errNullObject # object was null
7400 GET_VREG(a0, a2) # a0 <- fp[A]
7401 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7402 addu t0, a3, a1
7403 sb a0, 0(t0) # obj.field (8/16/32 bits) <- a0
7404 GET_INST_OPCODE(t0) # extract opcode from rINST
7405 GOTO_OPCODE(t0) # jump to next instruction
7406
7407
7408/* ------------------------------ */
7409 .balign 128
7410.L_op_iput_byte_quick: /* 0xec */
7411/* File: mips/op_iput_byte_quick.S */
7412/* File: mips/op_iput_quick.S */
7413 /* For: iput-quick, iput-object-quick */
7414 # op vA, vB, offset /* CCCC */
7415 GET_OPB(a2) # a2 <- B
7416 GET_VREG(a3, a2) # a3 <- fp[B], the object pointer
7417 FETCH(a1, 1) # a1 <- field byte offset
7418 GET_OPA4(a2) # a2 <- A(+)
7419 beqz a3, common_errNullObject # object was null
7420 GET_VREG(a0, a2) # a0 <- fp[A]
7421 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7422 addu t0, a3, a1
7423 sb a0, 0(t0) # obj.field (8/16/32 bits) <- a0
7424 GET_INST_OPCODE(t0) # extract opcode from rINST
7425 GOTO_OPCODE(t0) # jump to next instruction
7426
7427
7428/* ------------------------------ */
7429 .balign 128
7430.L_op_iput_char_quick: /* 0xed */
7431/* File: mips/op_iput_char_quick.S */
7432/* File: mips/op_iput_quick.S */
7433 /* For: iput-quick, iput-object-quick */
7434 # op vA, vB, offset /* CCCC */
7435 GET_OPB(a2) # a2 <- B
7436 GET_VREG(a3, a2) # a3 <- fp[B], the object pointer
7437 FETCH(a1, 1) # a1 <- field byte offset
7438 GET_OPA4(a2) # a2 <- A(+)
7439 beqz a3, common_errNullObject # object was null
7440 GET_VREG(a0, a2) # a0 <- fp[A]
7441 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7442 addu t0, a3, a1
7443 sh a0, 0(t0) # obj.field (8/16/32 bits) <- a0
7444 GET_INST_OPCODE(t0) # extract opcode from rINST
7445 GOTO_OPCODE(t0) # jump to next instruction
7446
7447
7448/* ------------------------------ */
7449 .balign 128
7450.L_op_iput_short_quick: /* 0xee */
7451/* File: mips/op_iput_short_quick.S */
7452/* File: mips/op_iput_quick.S */
7453 /* For: iput-quick, iput-object-quick */
7454 # op vA, vB, offset /* CCCC */
7455 GET_OPB(a2) # a2 <- B
7456 GET_VREG(a3, a2) # a3 <- fp[B], the object pointer
7457 FETCH(a1, 1) # a1 <- field byte offset
7458 GET_OPA4(a2) # a2 <- A(+)
7459 beqz a3, common_errNullObject # object was null
7460 GET_VREG(a0, a2) # a0 <- fp[A]
7461 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7462 addu t0, a3, a1
7463 sh a0, 0(t0) # obj.field (8/16/32 bits) <- a0
7464 GET_INST_OPCODE(t0) # extract opcode from rINST
7465 GOTO_OPCODE(t0) # jump to next instruction
7466
7467
7468/* ------------------------------ */
7469 .balign 128
7470.L_op_iget_boolean_quick: /* 0xef */
7471/* File: mips/op_iget_boolean_quick.S */
7472/* File: mips/op_iget_quick.S */
7473 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
7474 # op vA, vB, offset /* CCCC */
7475 GET_OPB(a2) # a2 <- B
7476 GET_VREG(a3, a2) # a3 <- object we're operating on
7477 FETCH(a1, 1) # a1 <- field byte offset
7478 GET_OPA4(a2) # a2 <- A(+)
7479 # check object for null
7480 beqz a3, common_errNullObject # object was null
7481 addu t0, a3, a1
7482 lbu a0, 0(t0) # a0 <- obj.field (8/16/32 bits)
7483 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7484 GET_INST_OPCODE(t0) # extract opcode from rINST
7485 SET_VREG_GOTO(a0, a2, t0) # fp[A] <- a0
7486
7487
7488/* ------------------------------ */
7489 .balign 128
7490.L_op_iget_byte_quick: /* 0xf0 */
7491/* File: mips/op_iget_byte_quick.S */
7492/* File: mips/op_iget_quick.S */
7493 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
7494 # op vA, vB, offset /* CCCC */
7495 GET_OPB(a2) # a2 <- B
7496 GET_VREG(a3, a2) # a3 <- object we're operating on
7497 FETCH(a1, 1) # a1 <- field byte offset
7498 GET_OPA4(a2) # a2 <- A(+)
7499 # check object for null
7500 beqz a3, common_errNullObject # object was null
7501 addu t0, a3, a1
7502 lb a0, 0(t0) # a0 <- obj.field (8/16/32 bits)
7503 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7504 GET_INST_OPCODE(t0) # extract opcode from rINST
7505 SET_VREG_GOTO(a0, a2, t0) # fp[A] <- a0
7506
7507
7508/* ------------------------------ */
7509 .balign 128
7510.L_op_iget_char_quick: /* 0xf1 */
7511/* File: mips/op_iget_char_quick.S */
7512/* File: mips/op_iget_quick.S */
7513 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
7514 # op vA, vB, offset /* CCCC */
7515 GET_OPB(a2) # a2 <- B
7516 GET_VREG(a3, a2) # a3 <- object we're operating on
7517 FETCH(a1, 1) # a1 <- field byte offset
7518 GET_OPA4(a2) # a2 <- A(+)
7519 # check object for null
7520 beqz a3, common_errNullObject # object was null
7521 addu t0, a3, a1
7522 lhu a0, 0(t0) # a0 <- obj.field (8/16/32 bits)
7523 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7524 GET_INST_OPCODE(t0) # extract opcode from rINST
7525 SET_VREG_GOTO(a0, a2, t0) # fp[A] <- a0
7526
7527
7528/* ------------------------------ */
7529 .balign 128
7530.L_op_iget_short_quick: /* 0xf2 */
7531/* File: mips/op_iget_short_quick.S */
7532/* File: mips/op_iget_quick.S */
7533 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
7534 # op vA, vB, offset /* CCCC */
7535 GET_OPB(a2) # a2 <- B
7536 GET_VREG(a3, a2) # a3 <- object we're operating on
7537 FETCH(a1, 1) # a1 <- field byte offset
7538 GET_OPA4(a2) # a2 <- A(+)
7539 # check object for null
7540 beqz a3, common_errNullObject # object was null
7541 addu t0, a3, a1
7542 lh a0, 0(t0) # a0 <- obj.field (8/16/32 bits)
7543 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7544 GET_INST_OPCODE(t0) # extract opcode from rINST
7545 SET_VREG_GOTO(a0, a2, t0) # fp[A] <- a0
7546
7547
7548/* ------------------------------ */
7549 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01007550.L_op_unused_f3: /* 0xf3 */
7551/* File: mips/op_unused_f3.S */
7552/* File: mips/unused.S */
7553/*
7554 * Bail to reference interpreter to throw.
7555 */
7556 b MterpFallback
7557
Douglas Leung200f0402016-02-25 20:05:47 -08007558
7559/* ------------------------------ */
7560 .balign 128
7561.L_op_unused_f4: /* 0xf4 */
7562/* File: mips/op_unused_f4.S */
7563/* File: mips/unused.S */
7564/*
7565 * Bail to reference interpreter to throw.
7566 */
7567 b MterpFallback
7568
7569
7570/* ------------------------------ */
7571 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01007572.L_op_unused_f5: /* 0xf5 */
7573/* File: mips/op_unused_f5.S */
7574/* File: mips/unused.S */
7575/*
7576 * Bail to reference interpreter to throw.
7577 */
7578 b MterpFallback
7579
Douglas Leung200f0402016-02-25 20:05:47 -08007580
7581/* ------------------------------ */
7582 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01007583.L_op_unused_f6: /* 0xf6 */
7584/* File: mips/op_unused_f6.S */
7585/* File: mips/unused.S */
7586/*
7587 * Bail to reference interpreter to throw.
7588 */
7589 b MterpFallback
7590
Douglas Leung200f0402016-02-25 20:05:47 -08007591
7592/* ------------------------------ */
7593 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01007594.L_op_unused_f7: /* 0xf7 */
7595/* File: mips/op_unused_f7.S */
7596/* File: mips/unused.S */
7597/*
7598 * Bail to reference interpreter to throw.
7599 */
7600 b MterpFallback
7601
Douglas Leung200f0402016-02-25 20:05:47 -08007602
7603/* ------------------------------ */
7604 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01007605.L_op_unused_f8: /* 0xf8 */
7606/* File: mips/op_unused_f8.S */
7607/* File: mips/unused.S */
7608/*
7609 * Bail to reference interpreter to throw.
7610 */
7611 b MterpFallback
7612
Douglas Leung200f0402016-02-25 20:05:47 -08007613
7614/* ------------------------------ */
7615 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01007616.L_op_unused_f9: /* 0xf9 */
7617/* File: mips/op_unused_f9.S */
7618/* File: mips/unused.S */
7619/*
7620 * Bail to reference interpreter to throw.
7621 */
7622 b MterpFallback
7623
Douglas Leung200f0402016-02-25 20:05:47 -08007624
7625/* ------------------------------ */
7626 .balign 128
buzbee8a287142016-10-07 12:56:32 -07007627.L_op_invoke_polymorphic: /* 0xfa */
7628/* Transfer stub to alternate interpreter */
7629 b MterpFallback
Douglas Leung200f0402016-02-25 20:05:47 -08007630
7631/* ------------------------------ */
7632 .balign 128
buzbee8a287142016-10-07 12:56:32 -07007633.L_op_invoke_polymorphic_range: /* 0xfb */
7634/* Transfer stub to alternate interpreter */
7635 b MterpFallback
Douglas Leung200f0402016-02-25 20:05:47 -08007636
7637/* ------------------------------ */
7638 .balign 128
7639.L_op_unused_fc: /* 0xfc */
7640/* File: mips/op_unused_fc.S */
7641/* File: mips/unused.S */
7642/*
7643 * Bail to reference interpreter to throw.
7644 */
7645 b MterpFallback
7646
7647
7648/* ------------------------------ */
7649 .balign 128
7650.L_op_unused_fd: /* 0xfd */
7651/* File: mips/op_unused_fd.S */
7652/* File: mips/unused.S */
7653/*
7654 * Bail to reference interpreter to throw.
7655 */
7656 b MterpFallback
7657
7658
7659/* ------------------------------ */
7660 .balign 128
7661.L_op_unused_fe: /* 0xfe */
7662/* File: mips/op_unused_fe.S */
7663/* File: mips/unused.S */
7664/*
7665 * Bail to reference interpreter to throw.
7666 */
7667 b MterpFallback
7668
7669
7670/* ------------------------------ */
7671 .balign 128
7672.L_op_unused_ff: /* 0xff */
7673/* File: mips/op_unused_ff.S */
7674/* File: mips/unused.S */
7675/*
7676 * Bail to reference interpreter to throw.
7677 */
7678 b MterpFallback
7679
7680
7681 .balign 128
7682 .size artMterpAsmInstructionStart, .-artMterpAsmInstructionStart
7683 .global artMterpAsmInstructionEnd
7684artMterpAsmInstructionEnd:
7685
7686/*
7687 * ===========================================================================
7688 * Sister implementations
7689 * ===========================================================================
7690 */
7691 .global artMterpAsmSisterStart
7692 .type artMterpAsmSisterStart, %function
7693 .text
7694 .balign 4
7695artMterpAsmSisterStart:
7696
Douglas Leung200f0402016-02-25 20:05:47 -08007697/* continuation for op_cmpl_float */
7698
7699.Lop_cmpl_float_nan:
7700 li rTEMP, -1
7701
7702.Lop_cmpl_float_finish:
7703 GET_OPA(rOBJ)
7704 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7705 GET_INST_OPCODE(t0) # extract opcode from rINST
7706 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7707
7708/* continuation for op_cmpg_float */
7709
7710.Lop_cmpg_float_nan:
7711 li rTEMP, 1
7712
7713.Lop_cmpg_float_finish:
7714 GET_OPA(rOBJ)
7715 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7716 GET_INST_OPCODE(t0) # extract opcode from rINST
7717 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7718
7719/* continuation for op_cmpl_double */
7720
7721.Lop_cmpl_double_nan:
7722 li rTEMP, -1
7723
7724.Lop_cmpl_double_finish:
7725 GET_OPA(rOBJ)
7726 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7727 GET_INST_OPCODE(t0) # extract opcode from rINST
7728 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7729
7730/* continuation for op_cmpg_double */
7731
7732.Lop_cmpg_double_nan:
7733 li rTEMP, 1
7734
7735.Lop_cmpg_double_finish:
7736 GET_OPA(rOBJ)
7737 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7738 GET_INST_OPCODE(t0) # extract opcode from rINST
7739 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7740
Douglas Leung200f0402016-02-25 20:05:47 -08007741/* continuation for op_float_to_int */
7742
7743/*
7744 * Not an entry point as it is used only once !!
7745 */
7746f2i_doconv:
7747#ifdef MIPS32REVGE6
7748 l.s fa1, .LFLOAT_TO_INT_max
7749 cmp.ule.s ft2, fa1, fa0
7750 l.s fv0, .LFLOAT_TO_INT_ret_max
7751 bc1nez ft2, .Lop_float_to_int_set_vreg_f
7752
7753 l.s fa1, .LFLOAT_TO_INT_min
7754 cmp.ule.s ft2, fa0, fa1
7755 l.s fv0, .LFLOAT_TO_INT_ret_min
7756 bc1nez ft2, .Lop_float_to_int_set_vreg_f
7757
7758 mov.s fa1, fa0
7759 cmp.un.s ft2, fa0, fa1
7760 li.s fv0, 0
7761 bc1nez ft2, .Lop_float_to_int_set_vreg_f
7762#else
7763 l.s fa1, .LFLOAT_TO_INT_max
7764 c.ole.s fcc0, fa1, fa0
7765 l.s fv0, .LFLOAT_TO_INT_ret_max
7766 bc1t .Lop_float_to_int_set_vreg_f
7767
7768 l.s fa1, .LFLOAT_TO_INT_min
7769 c.ole.s fcc0, fa0, fa1
7770 l.s fv0, .LFLOAT_TO_INT_ret_min
7771 bc1t .Lop_float_to_int_set_vreg_f
7772
7773 mov.s fa1, fa0
7774 c.un.s fcc0, fa0, fa1
7775 li.s fv0, 0
7776 bc1t .Lop_float_to_int_set_vreg_f
7777#endif
7778
7779 trunc.w.s fv0, fa0
7780 b .Lop_float_to_int_set_vreg_f
7781
7782.LFLOAT_TO_INT_max:
7783 .word 0x4f000000
7784.LFLOAT_TO_INT_min:
7785 .word 0xcf000000
7786.LFLOAT_TO_INT_ret_max:
7787 .word 0x7fffffff
7788.LFLOAT_TO_INT_ret_min:
7789 .word 0x80000000
7790
7791/* continuation for op_float_to_long */
7792
7793f2l_doconv:
7794#ifdef MIPS32REVGE6
7795 l.s fa1, .LLONG_TO_max
7796 cmp.ule.s ft2, fa1, fa0
7797 li rRESULT0, ~0
7798 li rRESULT1, ~0x80000000
7799 bc1nez ft2, .Lop_float_to_long_set_vreg
7800
7801 l.s fa1, .LLONG_TO_min
7802 cmp.ule.s ft2, fa0, fa1
7803 li rRESULT0, 0
7804 li rRESULT1, 0x80000000
7805 bc1nez ft2, .Lop_float_to_long_set_vreg
7806
7807 mov.s fa1, fa0
7808 cmp.un.s ft2, fa0, fa1
7809 li rRESULT0, 0
7810 li rRESULT1, 0
7811 bc1nez ft2, .Lop_float_to_long_set_vreg
7812#else
7813 l.s fa1, .LLONG_TO_max
7814 c.ole.s fcc0, fa1, fa0
7815 li rRESULT0, ~0
7816 li rRESULT1, ~0x80000000
7817 bc1t .Lop_float_to_long_set_vreg
7818
7819 l.s fa1, .LLONG_TO_min
7820 c.ole.s fcc0, fa0, fa1
7821 li rRESULT0, 0
7822 li rRESULT1, 0x80000000
7823 bc1t .Lop_float_to_long_set_vreg
7824
7825 mov.s fa1, fa0
7826 c.un.s fcc0, fa0, fa1
7827 li rRESULT0, 0
7828 li rRESULT1, 0
7829 bc1t .Lop_float_to_long_set_vreg
7830#endif
7831
7832 JAL(__fixsfdi)
7833
7834 b .Lop_float_to_long_set_vreg
7835
7836.LLONG_TO_max:
7837 .word 0x5f000000
7838
7839.LLONG_TO_min:
7840 .word 0xdf000000
7841
7842/* continuation for op_double_to_int */
7843
7844d2i_doconv:
7845#ifdef MIPS32REVGE6
7846 la t0, .LDOUBLE_TO_INT_max
7847 LOAD64_F(fa1, fa1f, t0)
7848 cmp.ule.d ft2, fa1, fa0
7849 l.s fv0, .LDOUBLE_TO_INT_maxret
7850 bc1nez ft2, .Lop_double_to_int_set_vreg_f
7851
7852 la t0, .LDOUBLE_TO_INT_min
7853 LOAD64_F(fa1, fa1f, t0)
7854 cmp.ule.d ft2, fa0, fa1
7855 l.s fv0, .LDOUBLE_TO_INT_minret
7856 bc1nez ft2, .Lop_double_to_int_set_vreg_f
7857
7858 mov.d fa1, fa0
7859 cmp.un.d ft2, fa0, fa1
7860 li.s fv0, 0
7861 bc1nez ft2, .Lop_double_to_int_set_vreg_f
7862#else
7863 la t0, .LDOUBLE_TO_INT_max
7864 LOAD64_F(fa1, fa1f, t0)
7865 c.ole.d fcc0, fa1, fa0
7866 l.s fv0, .LDOUBLE_TO_INT_maxret
7867 bc1t .Lop_double_to_int_set_vreg_f
7868
7869 la t0, .LDOUBLE_TO_INT_min
7870 LOAD64_F(fa1, fa1f, t0)
7871 c.ole.d fcc0, fa0, fa1
7872 l.s fv0, .LDOUBLE_TO_INT_minret
7873 bc1t .Lop_double_to_int_set_vreg_f
7874
7875 mov.d fa1, fa0
7876 c.un.d fcc0, fa0, fa1
7877 li.s fv0, 0
7878 bc1t .Lop_double_to_int_set_vreg_f
7879#endif
7880
7881 trunc.w.d fv0, fa0
7882 b .Lop_double_to_int_set_vreg_f
7883
7884.LDOUBLE_TO_INT_max:
7885 .dword 0x41dfffffffc00000
7886.LDOUBLE_TO_INT_min:
7887 .dword 0xc1e0000000000000 # minint, as a double (high word)
7888.LDOUBLE_TO_INT_maxret:
7889 .word 0x7fffffff
7890.LDOUBLE_TO_INT_minret:
7891 .word 0x80000000
7892
7893/* continuation for op_double_to_long */
7894
7895d2l_doconv:
7896#ifdef MIPS32REVGE6
7897 la t0, .LDOUBLE_TO_LONG_max
7898 LOAD64_F(fa1, fa1f, t0)
7899 cmp.ule.d ft2, fa1, fa0
7900 la t0, .LDOUBLE_TO_LONG_ret_max
7901 LOAD64(rRESULT0, rRESULT1, t0)
7902 bc1nez ft2, .Lop_double_to_long_set_vreg
7903
7904 la t0, .LDOUBLE_TO_LONG_min
7905 LOAD64_F(fa1, fa1f, t0)
7906 cmp.ule.d ft2, fa0, fa1
7907 la t0, .LDOUBLE_TO_LONG_ret_min
7908 LOAD64(rRESULT0, rRESULT1, t0)
7909 bc1nez ft2, .Lop_double_to_long_set_vreg
7910
7911 mov.d fa1, fa0
7912 cmp.un.d ft2, fa0, fa1
7913 li rRESULT0, 0
7914 li rRESULT1, 0
7915 bc1nez ft2, .Lop_double_to_long_set_vreg
7916#else
7917 la t0, .LDOUBLE_TO_LONG_max
7918 LOAD64_F(fa1, fa1f, t0)
7919 c.ole.d fcc0, fa1, fa0
7920 la t0, .LDOUBLE_TO_LONG_ret_max
7921 LOAD64(rRESULT0, rRESULT1, t0)
7922 bc1t .Lop_double_to_long_set_vreg
7923
7924 la t0, .LDOUBLE_TO_LONG_min
7925 LOAD64_F(fa1, fa1f, t0)
7926 c.ole.d fcc0, fa0, fa1
7927 la t0, .LDOUBLE_TO_LONG_ret_min
7928 LOAD64(rRESULT0, rRESULT1, t0)
7929 bc1t .Lop_double_to_long_set_vreg
7930
7931 mov.d fa1, fa0
7932 c.un.d fcc0, fa0, fa1
7933 li rRESULT0, 0
7934 li rRESULT1, 0
7935 bc1t .Lop_double_to_long_set_vreg
7936#endif
7937 JAL(__fixdfdi)
7938 b .Lop_double_to_long_set_vreg
7939
7940.LDOUBLE_TO_LONG_max:
7941 .dword 0x43e0000000000000 # maxlong, as a double (high word)
7942.LDOUBLE_TO_LONG_min:
7943 .dword 0xc3e0000000000000 # minlong, as a double (high word)
7944.LDOUBLE_TO_LONG_ret_max:
7945 .dword 0x7fffffffffffffff
7946.LDOUBLE_TO_LONG_ret_min:
7947 .dword 0x8000000000000000
7948
7949/* continuation for op_mul_long */
7950
7951.Lop_mul_long_finish:
7952 GET_INST_OPCODE(t0) # extract opcode from rINST
7953 SET_VREG64(v0, v1, a0) # vAA::vAA+1 <- v0(low) :: v1(high)
7954 GOTO_OPCODE(t0) # jump to next instruction
7955
7956/* continuation for op_shl_long */
7957
7958.Lop_shl_long_finish:
7959 SET_VREG64_GOTO(zero, v0, t2, t0) # vAA/vAA+1 <- rlo/rhi
7960
7961/* continuation for op_shr_long */
7962
7963.Lop_shr_long_finish:
7964 sra a3, a1, 31 # a3<- sign(ah)
7965 SET_VREG64_GOTO(v1, a3, t3, t0) # vAA/VAA+1 <- rlo/rhi
7966
7967/* continuation for op_ushr_long */
7968
7969.Lop_ushr_long_finish:
7970 SET_VREG64_GOTO(v1, zero, rOBJ, t0) # vAA/vAA+1 <- rlo/rhi
7971
7972/* continuation for op_add_double */
7973
7974.Lop_add_double_finish:
7975 GET_INST_OPCODE(t0) # extract opcode from rINST
7976 GOTO_OPCODE(t0) # jump to next instruction
7977
7978/* continuation for op_sub_double */
7979
7980.Lop_sub_double_finish:
7981 GET_INST_OPCODE(t0) # extract opcode from rINST
7982 GOTO_OPCODE(t0) # jump to next instruction
7983
7984/* continuation for op_mul_double */
7985
7986.Lop_mul_double_finish:
7987 GET_INST_OPCODE(t0) # extract opcode from rINST
7988 GOTO_OPCODE(t0) # jump to next instruction
7989
7990/* continuation for op_div_double */
7991
7992.Lop_div_double_finish:
7993 GET_INST_OPCODE(t0) # extract opcode from rINST
7994 GOTO_OPCODE(t0) # jump to next instruction
7995
7996/* continuation for op_rem_double */
7997
7998.Lop_rem_double_finish:
7999 GET_INST_OPCODE(t0) # extract opcode from rINST
8000 GOTO_OPCODE(t0) # jump to next instruction
8001
8002/* continuation for op_shl_long_2addr */
8003
8004.Lop_shl_long_2addr_finish:
8005 SET_VREG64_GOTO(zero, v0, rOBJ, t0) # vAA/vAA+1 <- rlo/rhi
8006
8007/* continuation for op_shr_long_2addr */
8008
8009.Lop_shr_long_2addr_finish:
8010 sra a3, a1, 31 # a3<- sign(ah)
8011 SET_VREG64_GOTO(v1, a3, t2, t0) # vAA/vAA+1 <- rlo/rhi
8012
8013/* continuation for op_ushr_long_2addr */
8014
8015.Lop_ushr_long_2addr_finish:
8016 SET_VREG64_GOTO(v1, zero, t3, t0) # vAA/vAA+1 <- rlo/rhi
8017
8018 .size artMterpAsmSisterStart, .-artMterpAsmSisterStart
8019 .global artMterpAsmSisterEnd
8020artMterpAsmSisterEnd:
8021
8022
8023 .global artMterpAsmAltInstructionStart
8024 .type artMterpAsmAltInstructionStart, %function
8025 .text
8026
8027artMterpAsmAltInstructionStart = .L_ALT_op_nop
8028/* ------------------------------ */
8029 .balign 128
8030.L_ALT_op_nop: /* 0x00 */
8031/* File: mips/alt_stub.S */
8032/*
8033 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8034 * any interesting requests and then jump to the real instruction
8035 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8036 */
8037 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008038 la ra, artMterpAsmInstructionStart + (0 * 128) # Addr of primary handler
8039 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8040 move a0, rSELF # arg0
8041 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008042 move a2, rPC
8043 la t9, MterpCheckBefore
8044 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008045
8046/* ------------------------------ */
8047 .balign 128
8048.L_ALT_op_move: /* 0x01 */
8049/* File: mips/alt_stub.S */
8050/*
8051 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8052 * any interesting requests and then jump to the real instruction
8053 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8054 */
8055 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008056 la ra, artMterpAsmInstructionStart + (1 * 128) # Addr of primary handler
8057 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8058 move a0, rSELF # arg0
8059 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008060 move a2, rPC
8061 la t9, MterpCheckBefore
8062 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008063
8064/* ------------------------------ */
8065 .balign 128
8066.L_ALT_op_move_from16: /* 0x02 */
8067/* File: mips/alt_stub.S */
8068/*
8069 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8070 * any interesting requests and then jump to the real instruction
8071 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8072 */
8073 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008074 la ra, artMterpAsmInstructionStart + (2 * 128) # Addr of primary handler
8075 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8076 move a0, rSELF # arg0
8077 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008078 move a2, rPC
8079 la t9, MterpCheckBefore
8080 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008081
8082/* ------------------------------ */
8083 .balign 128
8084.L_ALT_op_move_16: /* 0x03 */
8085/* File: mips/alt_stub.S */
8086/*
8087 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8088 * any interesting requests and then jump to the real instruction
8089 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8090 */
8091 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008092 la ra, artMterpAsmInstructionStart + (3 * 128) # Addr of primary handler
8093 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8094 move a0, rSELF # arg0
8095 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008096 move a2, rPC
8097 la t9, MterpCheckBefore
8098 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008099
8100/* ------------------------------ */
8101 .balign 128
8102.L_ALT_op_move_wide: /* 0x04 */
8103/* File: mips/alt_stub.S */
8104/*
8105 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8106 * any interesting requests and then jump to the real instruction
8107 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8108 */
8109 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008110 la ra, artMterpAsmInstructionStart + (4 * 128) # Addr of primary handler
8111 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8112 move a0, rSELF # arg0
8113 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008114 move a2, rPC
8115 la t9, MterpCheckBefore
8116 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008117
8118/* ------------------------------ */
8119 .balign 128
8120.L_ALT_op_move_wide_from16: /* 0x05 */
8121/* File: mips/alt_stub.S */
8122/*
8123 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8124 * any interesting requests and then jump to the real instruction
8125 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8126 */
8127 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008128 la ra, artMterpAsmInstructionStart + (5 * 128) # Addr of primary handler
8129 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8130 move a0, rSELF # arg0
8131 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008132 move a2, rPC
8133 la t9, MterpCheckBefore
8134 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008135
8136/* ------------------------------ */
8137 .balign 128
8138.L_ALT_op_move_wide_16: /* 0x06 */
8139/* File: mips/alt_stub.S */
8140/*
8141 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8142 * any interesting requests and then jump to the real instruction
8143 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8144 */
8145 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008146 la ra, artMterpAsmInstructionStart + (6 * 128) # Addr of primary handler
8147 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8148 move a0, rSELF # arg0
8149 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008150 move a2, rPC
8151 la t9, MterpCheckBefore
8152 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008153
8154/* ------------------------------ */
8155 .balign 128
8156.L_ALT_op_move_object: /* 0x07 */
8157/* File: mips/alt_stub.S */
8158/*
8159 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8160 * any interesting requests and then jump to the real instruction
8161 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8162 */
8163 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008164 la ra, artMterpAsmInstructionStart + (7 * 128) # Addr of primary handler
8165 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8166 move a0, rSELF # arg0
8167 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008168 move a2, rPC
8169 la t9, MterpCheckBefore
8170 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008171
8172/* ------------------------------ */
8173 .balign 128
8174.L_ALT_op_move_object_from16: /* 0x08 */
8175/* File: mips/alt_stub.S */
8176/*
8177 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8178 * any interesting requests and then jump to the real instruction
8179 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8180 */
8181 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008182 la ra, artMterpAsmInstructionStart + (8 * 128) # Addr of primary handler
8183 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8184 move a0, rSELF # arg0
8185 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008186 move a2, rPC
8187 la t9, MterpCheckBefore
8188 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008189
8190/* ------------------------------ */
8191 .balign 128
8192.L_ALT_op_move_object_16: /* 0x09 */
8193/* File: mips/alt_stub.S */
8194/*
8195 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8196 * any interesting requests and then jump to the real instruction
8197 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8198 */
8199 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008200 la ra, artMterpAsmInstructionStart + (9 * 128) # Addr of primary handler
8201 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8202 move a0, rSELF # arg0
8203 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008204 move a2, rPC
8205 la t9, MterpCheckBefore
8206 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008207
8208/* ------------------------------ */
8209 .balign 128
8210.L_ALT_op_move_result: /* 0x0a */
8211/* File: mips/alt_stub.S */
8212/*
8213 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8214 * any interesting requests and then jump to the real instruction
8215 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8216 */
8217 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008218 la ra, artMterpAsmInstructionStart + (10 * 128) # Addr of primary handler
8219 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8220 move a0, rSELF # arg0
8221 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008222 move a2, rPC
8223 la t9, MterpCheckBefore
8224 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008225
8226/* ------------------------------ */
8227 .balign 128
8228.L_ALT_op_move_result_wide: /* 0x0b */
8229/* File: mips/alt_stub.S */
8230/*
8231 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8232 * any interesting requests and then jump to the real instruction
8233 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8234 */
8235 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008236 la ra, artMterpAsmInstructionStart + (11 * 128) # Addr of primary handler
8237 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8238 move a0, rSELF # arg0
8239 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008240 move a2, rPC
8241 la t9, MterpCheckBefore
8242 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008243
8244/* ------------------------------ */
8245 .balign 128
8246.L_ALT_op_move_result_object: /* 0x0c */
8247/* File: mips/alt_stub.S */
8248/*
8249 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8250 * any interesting requests and then jump to the real instruction
8251 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8252 */
8253 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008254 la ra, artMterpAsmInstructionStart + (12 * 128) # Addr of primary handler
8255 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8256 move a0, rSELF # arg0
8257 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008258 move a2, rPC
8259 la t9, MterpCheckBefore
8260 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008261
8262/* ------------------------------ */
8263 .balign 128
8264.L_ALT_op_move_exception: /* 0x0d */
8265/* File: mips/alt_stub.S */
8266/*
8267 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8268 * any interesting requests and then jump to the real instruction
8269 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8270 */
8271 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008272 la ra, artMterpAsmInstructionStart + (13 * 128) # Addr of primary handler
8273 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8274 move a0, rSELF # arg0
8275 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008276 move a2, rPC
8277 la t9, MterpCheckBefore
8278 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008279
8280/* ------------------------------ */
8281 .balign 128
8282.L_ALT_op_return_void: /* 0x0e */
8283/* File: mips/alt_stub.S */
8284/*
8285 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8286 * any interesting requests and then jump to the real instruction
8287 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8288 */
8289 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008290 la ra, artMterpAsmInstructionStart + (14 * 128) # Addr of primary handler
8291 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8292 move a0, rSELF # arg0
8293 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008294 move a2, rPC
8295 la t9, MterpCheckBefore
8296 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008297
8298/* ------------------------------ */
8299 .balign 128
8300.L_ALT_op_return: /* 0x0f */
8301/* File: mips/alt_stub.S */
8302/*
8303 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8304 * any interesting requests and then jump to the real instruction
8305 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8306 */
8307 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008308 la ra, artMterpAsmInstructionStart + (15 * 128) # Addr of primary handler
8309 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8310 move a0, rSELF # arg0
8311 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008312 move a2, rPC
8313 la t9, MterpCheckBefore
8314 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008315
8316/* ------------------------------ */
8317 .balign 128
8318.L_ALT_op_return_wide: /* 0x10 */
8319/* File: mips/alt_stub.S */
8320/*
8321 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8322 * any interesting requests and then jump to the real instruction
8323 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8324 */
8325 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008326 la ra, artMterpAsmInstructionStart + (16 * 128) # Addr of primary handler
8327 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8328 move a0, rSELF # arg0
8329 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008330 move a2, rPC
8331 la t9, MterpCheckBefore
8332 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008333
8334/* ------------------------------ */
8335 .balign 128
8336.L_ALT_op_return_object: /* 0x11 */
8337/* File: mips/alt_stub.S */
8338/*
8339 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8340 * any interesting requests and then jump to the real instruction
8341 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8342 */
8343 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008344 la ra, artMterpAsmInstructionStart + (17 * 128) # Addr of primary handler
8345 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8346 move a0, rSELF # arg0
8347 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008348 move a2, rPC
8349 la t9, MterpCheckBefore
8350 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008351
8352/* ------------------------------ */
8353 .balign 128
8354.L_ALT_op_const_4: /* 0x12 */
8355/* File: mips/alt_stub.S */
8356/*
8357 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8358 * any interesting requests and then jump to the real instruction
8359 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8360 */
8361 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008362 la ra, artMterpAsmInstructionStart + (18 * 128) # Addr of primary handler
8363 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8364 move a0, rSELF # arg0
8365 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008366 move a2, rPC
8367 la t9, MterpCheckBefore
8368 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008369
8370/* ------------------------------ */
8371 .balign 128
8372.L_ALT_op_const_16: /* 0x13 */
8373/* File: mips/alt_stub.S */
8374/*
8375 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8376 * any interesting requests and then jump to the real instruction
8377 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8378 */
8379 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008380 la ra, artMterpAsmInstructionStart + (19 * 128) # Addr of primary handler
8381 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8382 move a0, rSELF # arg0
8383 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008384 move a2, rPC
8385 la t9, MterpCheckBefore
8386 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008387
8388/* ------------------------------ */
8389 .balign 128
8390.L_ALT_op_const: /* 0x14 */
8391/* File: mips/alt_stub.S */
8392/*
8393 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8394 * any interesting requests and then jump to the real instruction
8395 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8396 */
8397 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008398 la ra, artMterpAsmInstructionStart + (20 * 128) # Addr of primary handler
8399 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8400 move a0, rSELF # arg0
8401 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008402 move a2, rPC
8403 la t9, MterpCheckBefore
8404 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008405
8406/* ------------------------------ */
8407 .balign 128
8408.L_ALT_op_const_high16: /* 0x15 */
8409/* File: mips/alt_stub.S */
8410/*
8411 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8412 * any interesting requests and then jump to the real instruction
8413 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8414 */
8415 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008416 la ra, artMterpAsmInstructionStart + (21 * 128) # Addr of primary handler
8417 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8418 move a0, rSELF # arg0
8419 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008420 move a2, rPC
8421 la t9, MterpCheckBefore
8422 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008423
8424/* ------------------------------ */
8425 .balign 128
8426.L_ALT_op_const_wide_16: /* 0x16 */
8427/* File: mips/alt_stub.S */
8428/*
8429 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8430 * any interesting requests and then jump to the real instruction
8431 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8432 */
8433 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008434 la ra, artMterpAsmInstructionStart + (22 * 128) # Addr of primary handler
8435 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8436 move a0, rSELF # arg0
8437 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008438 move a2, rPC
8439 la t9, MterpCheckBefore
8440 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008441
8442/* ------------------------------ */
8443 .balign 128
8444.L_ALT_op_const_wide_32: /* 0x17 */
8445/* File: mips/alt_stub.S */
8446/*
8447 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8448 * any interesting requests and then jump to the real instruction
8449 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8450 */
8451 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008452 la ra, artMterpAsmInstructionStart + (23 * 128) # Addr of primary handler
8453 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8454 move a0, rSELF # arg0
8455 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008456 move a2, rPC
8457 la t9, MterpCheckBefore
8458 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008459
8460/* ------------------------------ */
8461 .balign 128
8462.L_ALT_op_const_wide: /* 0x18 */
8463/* File: mips/alt_stub.S */
8464/*
8465 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8466 * any interesting requests and then jump to the real instruction
8467 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8468 */
8469 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008470 la ra, artMterpAsmInstructionStart + (24 * 128) # Addr of primary handler
8471 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8472 move a0, rSELF # arg0
8473 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008474 move a2, rPC
8475 la t9, MterpCheckBefore
8476 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008477
8478/* ------------------------------ */
8479 .balign 128
8480.L_ALT_op_const_wide_high16: /* 0x19 */
8481/* File: mips/alt_stub.S */
8482/*
8483 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8484 * any interesting requests and then jump to the real instruction
8485 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8486 */
8487 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008488 la ra, artMterpAsmInstructionStart + (25 * 128) # Addr of primary handler
8489 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8490 move a0, rSELF # arg0
8491 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008492 move a2, rPC
8493 la t9, MterpCheckBefore
8494 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008495
8496/* ------------------------------ */
8497 .balign 128
8498.L_ALT_op_const_string: /* 0x1a */
8499/* File: mips/alt_stub.S */
8500/*
8501 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8502 * any interesting requests and then jump to the real instruction
8503 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8504 */
8505 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008506 la ra, artMterpAsmInstructionStart + (26 * 128) # Addr of primary handler
8507 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8508 move a0, rSELF # arg0
8509 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008510 move a2, rPC
8511 la t9, MterpCheckBefore
8512 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008513
8514/* ------------------------------ */
8515 .balign 128
8516.L_ALT_op_const_string_jumbo: /* 0x1b */
8517/* File: mips/alt_stub.S */
8518/*
8519 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8520 * any interesting requests and then jump to the real instruction
8521 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8522 */
8523 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008524 la ra, artMterpAsmInstructionStart + (27 * 128) # Addr of primary handler
8525 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8526 move a0, rSELF # arg0
8527 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008528 move a2, rPC
8529 la t9, MterpCheckBefore
8530 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008531
8532/* ------------------------------ */
8533 .balign 128
8534.L_ALT_op_const_class: /* 0x1c */
8535/* File: mips/alt_stub.S */
8536/*
8537 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8538 * any interesting requests and then jump to the real instruction
8539 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8540 */
8541 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008542 la ra, artMterpAsmInstructionStart + (28 * 128) # Addr of primary handler
8543 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8544 move a0, rSELF # arg0
8545 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008546 move a2, rPC
8547 la t9, MterpCheckBefore
8548 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008549
8550/* ------------------------------ */
8551 .balign 128
8552.L_ALT_op_monitor_enter: /* 0x1d */
8553/* File: mips/alt_stub.S */
8554/*
8555 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8556 * any interesting requests and then jump to the real instruction
8557 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8558 */
8559 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008560 la ra, artMterpAsmInstructionStart + (29 * 128) # Addr of primary handler
8561 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8562 move a0, rSELF # arg0
8563 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008564 move a2, rPC
8565 la t9, MterpCheckBefore
8566 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008567
8568/* ------------------------------ */
8569 .balign 128
8570.L_ALT_op_monitor_exit: /* 0x1e */
8571/* File: mips/alt_stub.S */
8572/*
8573 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8574 * any interesting requests and then jump to the real instruction
8575 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8576 */
8577 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008578 la ra, artMterpAsmInstructionStart + (30 * 128) # Addr of primary handler
8579 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8580 move a0, rSELF # arg0
8581 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008582 move a2, rPC
8583 la t9, MterpCheckBefore
8584 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008585
8586/* ------------------------------ */
8587 .balign 128
8588.L_ALT_op_check_cast: /* 0x1f */
8589/* File: mips/alt_stub.S */
8590/*
8591 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8592 * any interesting requests and then jump to the real instruction
8593 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8594 */
8595 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008596 la ra, artMterpAsmInstructionStart + (31 * 128) # Addr of primary handler
8597 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8598 move a0, rSELF # arg0
8599 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008600 move a2, rPC
8601 la t9, MterpCheckBefore
8602 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008603
8604/* ------------------------------ */
8605 .balign 128
8606.L_ALT_op_instance_of: /* 0x20 */
8607/* File: mips/alt_stub.S */
8608/*
8609 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8610 * any interesting requests and then jump to the real instruction
8611 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8612 */
8613 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008614 la ra, artMterpAsmInstructionStart + (32 * 128) # Addr of primary handler
8615 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8616 move a0, rSELF # arg0
8617 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008618 move a2, rPC
8619 la t9, MterpCheckBefore
8620 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008621
8622/* ------------------------------ */
8623 .balign 128
8624.L_ALT_op_array_length: /* 0x21 */
8625/* File: mips/alt_stub.S */
8626/*
8627 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8628 * any interesting requests and then jump to the real instruction
8629 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8630 */
8631 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008632 la ra, artMterpAsmInstructionStart + (33 * 128) # Addr of primary handler
8633 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8634 move a0, rSELF # arg0
8635 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008636 move a2, rPC
8637 la t9, MterpCheckBefore
8638 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008639
8640/* ------------------------------ */
8641 .balign 128
8642.L_ALT_op_new_instance: /* 0x22 */
8643/* File: mips/alt_stub.S */
8644/*
8645 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8646 * any interesting requests and then jump to the real instruction
8647 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8648 */
8649 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008650 la ra, artMterpAsmInstructionStart + (34 * 128) # Addr of primary handler
8651 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8652 move a0, rSELF # arg0
8653 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008654 move a2, rPC
8655 la t9, MterpCheckBefore
8656 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008657
8658/* ------------------------------ */
8659 .balign 128
8660.L_ALT_op_new_array: /* 0x23 */
8661/* File: mips/alt_stub.S */
8662/*
8663 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8664 * any interesting requests and then jump to the real instruction
8665 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8666 */
8667 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008668 la ra, artMterpAsmInstructionStart + (35 * 128) # Addr of primary handler
8669 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8670 move a0, rSELF # arg0
8671 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008672 move a2, rPC
8673 la t9, MterpCheckBefore
8674 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008675
8676/* ------------------------------ */
8677 .balign 128
8678.L_ALT_op_filled_new_array: /* 0x24 */
8679/* File: mips/alt_stub.S */
8680/*
8681 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8682 * any interesting requests and then jump to the real instruction
8683 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8684 */
8685 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008686 la ra, artMterpAsmInstructionStart + (36 * 128) # Addr of primary handler
8687 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8688 move a0, rSELF # arg0
8689 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008690 move a2, rPC
8691 la t9, MterpCheckBefore
8692 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008693
8694/* ------------------------------ */
8695 .balign 128
8696.L_ALT_op_filled_new_array_range: /* 0x25 */
8697/* File: mips/alt_stub.S */
8698/*
8699 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8700 * any interesting requests and then jump to the real instruction
8701 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8702 */
8703 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008704 la ra, artMterpAsmInstructionStart + (37 * 128) # Addr of primary handler
8705 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8706 move a0, rSELF # arg0
8707 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008708 move a2, rPC
8709 la t9, MterpCheckBefore
8710 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008711
8712/* ------------------------------ */
8713 .balign 128
8714.L_ALT_op_fill_array_data: /* 0x26 */
8715/* File: mips/alt_stub.S */
8716/*
8717 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8718 * any interesting requests and then jump to the real instruction
8719 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8720 */
8721 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008722 la ra, artMterpAsmInstructionStart + (38 * 128) # Addr of primary handler
8723 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8724 move a0, rSELF # arg0
8725 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008726 move a2, rPC
8727 la t9, MterpCheckBefore
8728 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008729
8730/* ------------------------------ */
8731 .balign 128
8732.L_ALT_op_throw: /* 0x27 */
8733/* File: mips/alt_stub.S */
8734/*
8735 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8736 * any interesting requests and then jump to the real instruction
8737 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8738 */
8739 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008740 la ra, artMterpAsmInstructionStart + (39 * 128) # Addr of primary handler
8741 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8742 move a0, rSELF # arg0
8743 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008744 move a2, rPC
8745 la t9, MterpCheckBefore
8746 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008747
8748/* ------------------------------ */
8749 .balign 128
8750.L_ALT_op_goto: /* 0x28 */
8751/* File: mips/alt_stub.S */
8752/*
8753 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8754 * any interesting requests and then jump to the real instruction
8755 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8756 */
8757 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008758 la ra, artMterpAsmInstructionStart + (40 * 128) # Addr of primary handler
8759 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8760 move a0, rSELF # arg0
8761 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008762 move a2, rPC
8763 la t9, MterpCheckBefore
8764 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008765
8766/* ------------------------------ */
8767 .balign 128
8768.L_ALT_op_goto_16: /* 0x29 */
8769/* File: mips/alt_stub.S */
8770/*
8771 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8772 * any interesting requests and then jump to the real instruction
8773 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8774 */
8775 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008776 la ra, artMterpAsmInstructionStart + (41 * 128) # Addr of primary handler
8777 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8778 move a0, rSELF # arg0
8779 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008780 move a2, rPC
8781 la t9, MterpCheckBefore
8782 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008783
8784/* ------------------------------ */
8785 .balign 128
8786.L_ALT_op_goto_32: /* 0x2a */
8787/* File: mips/alt_stub.S */
8788/*
8789 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8790 * any interesting requests and then jump to the real instruction
8791 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8792 */
8793 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008794 la ra, artMterpAsmInstructionStart + (42 * 128) # Addr of primary handler
8795 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8796 move a0, rSELF # arg0
8797 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008798 move a2, rPC
8799 la t9, MterpCheckBefore
8800 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008801
8802/* ------------------------------ */
8803 .balign 128
8804.L_ALT_op_packed_switch: /* 0x2b */
8805/* File: mips/alt_stub.S */
8806/*
8807 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8808 * any interesting requests and then jump to the real instruction
8809 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8810 */
8811 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008812 la ra, artMterpAsmInstructionStart + (43 * 128) # Addr of primary handler
8813 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8814 move a0, rSELF # arg0
8815 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008816 move a2, rPC
8817 la t9, MterpCheckBefore
8818 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008819
8820/* ------------------------------ */
8821 .balign 128
8822.L_ALT_op_sparse_switch: /* 0x2c */
8823/* File: mips/alt_stub.S */
8824/*
8825 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8826 * any interesting requests and then jump to the real instruction
8827 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8828 */
8829 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008830 la ra, artMterpAsmInstructionStart + (44 * 128) # Addr of primary handler
8831 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8832 move a0, rSELF # arg0
8833 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008834 move a2, rPC
8835 la t9, MterpCheckBefore
8836 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008837
8838/* ------------------------------ */
8839 .balign 128
8840.L_ALT_op_cmpl_float: /* 0x2d */
8841/* File: mips/alt_stub.S */
8842/*
8843 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8844 * any interesting requests and then jump to the real instruction
8845 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8846 */
8847 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008848 la ra, artMterpAsmInstructionStart + (45 * 128) # Addr of primary handler
8849 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8850 move a0, rSELF # arg0
8851 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008852 move a2, rPC
8853 la t9, MterpCheckBefore
8854 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008855
8856/* ------------------------------ */
8857 .balign 128
8858.L_ALT_op_cmpg_float: /* 0x2e */
8859/* File: mips/alt_stub.S */
8860/*
8861 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8862 * any interesting requests and then jump to the real instruction
8863 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8864 */
8865 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008866 la ra, artMterpAsmInstructionStart + (46 * 128) # Addr of primary handler
8867 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8868 move a0, rSELF # arg0
8869 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008870 move a2, rPC
8871 la t9, MterpCheckBefore
8872 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008873
8874/* ------------------------------ */
8875 .balign 128
8876.L_ALT_op_cmpl_double: /* 0x2f */
8877/* File: mips/alt_stub.S */
8878/*
8879 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8880 * any interesting requests and then jump to the real instruction
8881 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8882 */
8883 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008884 la ra, artMterpAsmInstructionStart + (47 * 128) # Addr of primary handler
8885 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8886 move a0, rSELF # arg0
8887 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008888 move a2, rPC
8889 la t9, MterpCheckBefore
8890 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008891
8892/* ------------------------------ */
8893 .balign 128
8894.L_ALT_op_cmpg_double: /* 0x30 */
8895/* File: mips/alt_stub.S */
8896/*
8897 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8898 * any interesting requests and then jump to the real instruction
8899 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8900 */
8901 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008902 la ra, artMterpAsmInstructionStart + (48 * 128) # Addr of primary handler
8903 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8904 move a0, rSELF # arg0
8905 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008906 move a2, rPC
8907 la t9, MterpCheckBefore
8908 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008909
8910/* ------------------------------ */
8911 .balign 128
8912.L_ALT_op_cmp_long: /* 0x31 */
8913/* File: mips/alt_stub.S */
8914/*
8915 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8916 * any interesting requests and then jump to the real instruction
8917 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8918 */
8919 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008920 la ra, artMterpAsmInstructionStart + (49 * 128) # Addr of primary handler
8921 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8922 move a0, rSELF # arg0
8923 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008924 move a2, rPC
8925 la t9, MterpCheckBefore
8926 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008927
8928/* ------------------------------ */
8929 .balign 128
8930.L_ALT_op_if_eq: /* 0x32 */
8931/* File: mips/alt_stub.S */
8932/*
8933 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8934 * any interesting requests and then jump to the real instruction
8935 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8936 */
8937 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008938 la ra, artMterpAsmInstructionStart + (50 * 128) # Addr of primary handler
8939 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8940 move a0, rSELF # arg0
8941 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008942 move a2, rPC
8943 la t9, MterpCheckBefore
8944 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008945
8946/* ------------------------------ */
8947 .balign 128
8948.L_ALT_op_if_ne: /* 0x33 */
8949/* File: mips/alt_stub.S */
8950/*
8951 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8952 * any interesting requests and then jump to the real instruction
8953 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8954 */
8955 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008956 la ra, artMterpAsmInstructionStart + (51 * 128) # Addr of primary handler
8957 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8958 move a0, rSELF # arg0
8959 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008960 move a2, rPC
8961 la t9, MterpCheckBefore
8962 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008963
8964/* ------------------------------ */
8965 .balign 128
8966.L_ALT_op_if_lt: /* 0x34 */
8967/* File: mips/alt_stub.S */
8968/*
8969 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8970 * any interesting requests and then jump to the real instruction
8971 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8972 */
8973 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008974 la ra, artMterpAsmInstructionStart + (52 * 128) # Addr of primary handler
8975 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8976 move a0, rSELF # arg0
8977 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008978 move a2, rPC
8979 la t9, MterpCheckBefore
8980 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008981
8982/* ------------------------------ */
8983 .balign 128
8984.L_ALT_op_if_ge: /* 0x35 */
8985/* File: mips/alt_stub.S */
8986/*
8987 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8988 * any interesting requests and then jump to the real instruction
8989 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8990 */
8991 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008992 la ra, artMterpAsmInstructionStart + (53 * 128) # Addr of primary handler
8993 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8994 move a0, rSELF # arg0
8995 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008996 move a2, rPC
8997 la t9, MterpCheckBefore
8998 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008999
9000/* ------------------------------ */
9001 .balign 128
9002.L_ALT_op_if_gt: /* 0x36 */
9003/* File: mips/alt_stub.S */
9004/*
9005 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9006 * any interesting requests and then jump to the real instruction
9007 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9008 */
9009 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009010 la ra, artMterpAsmInstructionStart + (54 * 128) # Addr of primary handler
9011 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9012 move a0, rSELF # arg0
9013 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009014 move a2, rPC
9015 la t9, MterpCheckBefore
9016 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009017
9018/* ------------------------------ */
9019 .balign 128
9020.L_ALT_op_if_le: /* 0x37 */
9021/* File: mips/alt_stub.S */
9022/*
9023 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9024 * any interesting requests and then jump to the real instruction
9025 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9026 */
9027 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009028 la ra, artMterpAsmInstructionStart + (55 * 128) # Addr of primary handler
9029 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9030 move a0, rSELF # arg0
9031 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009032 move a2, rPC
9033 la t9, MterpCheckBefore
9034 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009035
9036/* ------------------------------ */
9037 .balign 128
9038.L_ALT_op_if_eqz: /* 0x38 */
9039/* File: mips/alt_stub.S */
9040/*
9041 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9042 * any interesting requests and then jump to the real instruction
9043 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9044 */
9045 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009046 la ra, artMterpAsmInstructionStart + (56 * 128) # Addr of primary handler
9047 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9048 move a0, rSELF # arg0
9049 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009050 move a2, rPC
9051 la t9, MterpCheckBefore
9052 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009053
9054/* ------------------------------ */
9055 .balign 128
9056.L_ALT_op_if_nez: /* 0x39 */
9057/* File: mips/alt_stub.S */
9058/*
9059 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9060 * any interesting requests and then jump to the real instruction
9061 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9062 */
9063 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009064 la ra, artMterpAsmInstructionStart + (57 * 128) # Addr of primary handler
9065 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9066 move a0, rSELF # arg0
9067 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009068 move a2, rPC
9069 la t9, MterpCheckBefore
9070 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009071
9072/* ------------------------------ */
9073 .balign 128
9074.L_ALT_op_if_ltz: /* 0x3a */
9075/* File: mips/alt_stub.S */
9076/*
9077 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9078 * any interesting requests and then jump to the real instruction
9079 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9080 */
9081 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009082 la ra, artMterpAsmInstructionStart + (58 * 128) # Addr of primary handler
9083 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9084 move a0, rSELF # arg0
9085 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009086 move a2, rPC
9087 la t9, MterpCheckBefore
9088 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009089
9090/* ------------------------------ */
9091 .balign 128
9092.L_ALT_op_if_gez: /* 0x3b */
9093/* File: mips/alt_stub.S */
9094/*
9095 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9096 * any interesting requests and then jump to the real instruction
9097 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9098 */
9099 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009100 la ra, artMterpAsmInstructionStart + (59 * 128) # Addr of primary handler
9101 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9102 move a0, rSELF # arg0
9103 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009104 move a2, rPC
9105 la t9, MterpCheckBefore
9106 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009107
9108/* ------------------------------ */
9109 .balign 128
9110.L_ALT_op_if_gtz: /* 0x3c */
9111/* File: mips/alt_stub.S */
9112/*
9113 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9114 * any interesting requests and then jump to the real instruction
9115 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9116 */
9117 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009118 la ra, artMterpAsmInstructionStart + (60 * 128) # Addr of primary handler
9119 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9120 move a0, rSELF # arg0
9121 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009122 move a2, rPC
9123 la t9, MterpCheckBefore
9124 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009125
9126/* ------------------------------ */
9127 .balign 128
9128.L_ALT_op_if_lez: /* 0x3d */
9129/* File: mips/alt_stub.S */
9130/*
9131 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9132 * any interesting requests and then jump to the real instruction
9133 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9134 */
9135 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009136 la ra, artMterpAsmInstructionStart + (61 * 128) # Addr of primary handler
9137 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9138 move a0, rSELF # arg0
9139 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009140 move a2, rPC
9141 la t9, MterpCheckBefore
9142 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009143
9144/* ------------------------------ */
9145 .balign 128
9146.L_ALT_op_unused_3e: /* 0x3e */
9147/* File: mips/alt_stub.S */
9148/*
9149 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9150 * any interesting requests and then jump to the real instruction
9151 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9152 */
9153 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009154 la ra, artMterpAsmInstructionStart + (62 * 128) # Addr of primary handler
9155 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9156 move a0, rSELF # arg0
9157 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009158 move a2, rPC
9159 la t9, MterpCheckBefore
9160 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009161
9162/* ------------------------------ */
9163 .balign 128
9164.L_ALT_op_unused_3f: /* 0x3f */
9165/* File: mips/alt_stub.S */
9166/*
9167 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9168 * any interesting requests and then jump to the real instruction
9169 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9170 */
9171 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009172 la ra, artMterpAsmInstructionStart + (63 * 128) # Addr of primary handler
9173 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9174 move a0, rSELF # arg0
9175 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009176 move a2, rPC
9177 la t9, MterpCheckBefore
9178 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009179
9180/* ------------------------------ */
9181 .balign 128
9182.L_ALT_op_unused_40: /* 0x40 */
9183/* File: mips/alt_stub.S */
9184/*
9185 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9186 * any interesting requests and then jump to the real instruction
9187 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9188 */
9189 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009190 la ra, artMterpAsmInstructionStart + (64 * 128) # Addr of primary handler
9191 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9192 move a0, rSELF # arg0
9193 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009194 move a2, rPC
9195 la t9, MterpCheckBefore
9196 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009197
9198/* ------------------------------ */
9199 .balign 128
9200.L_ALT_op_unused_41: /* 0x41 */
9201/* File: mips/alt_stub.S */
9202/*
9203 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9204 * any interesting requests and then jump to the real instruction
9205 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9206 */
9207 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009208 la ra, artMterpAsmInstructionStart + (65 * 128) # Addr of primary handler
9209 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9210 move a0, rSELF # arg0
9211 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009212 move a2, rPC
9213 la t9, MterpCheckBefore
9214 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009215
9216/* ------------------------------ */
9217 .balign 128
9218.L_ALT_op_unused_42: /* 0x42 */
9219/* File: mips/alt_stub.S */
9220/*
9221 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9222 * any interesting requests and then jump to the real instruction
9223 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9224 */
9225 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009226 la ra, artMterpAsmInstructionStart + (66 * 128) # Addr of primary handler
9227 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9228 move a0, rSELF # arg0
9229 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009230 move a2, rPC
9231 la t9, MterpCheckBefore
9232 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009233
9234/* ------------------------------ */
9235 .balign 128
9236.L_ALT_op_unused_43: /* 0x43 */
9237/* File: mips/alt_stub.S */
9238/*
9239 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9240 * any interesting requests and then jump to the real instruction
9241 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9242 */
9243 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009244 la ra, artMterpAsmInstructionStart + (67 * 128) # Addr of primary handler
9245 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9246 move a0, rSELF # arg0
9247 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009248 move a2, rPC
9249 la t9, MterpCheckBefore
9250 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009251
9252/* ------------------------------ */
9253 .balign 128
9254.L_ALT_op_aget: /* 0x44 */
9255/* File: mips/alt_stub.S */
9256/*
9257 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9258 * any interesting requests and then jump to the real instruction
9259 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9260 */
9261 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009262 la ra, artMterpAsmInstructionStart + (68 * 128) # Addr of primary handler
9263 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9264 move a0, rSELF # arg0
9265 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009266 move a2, rPC
9267 la t9, MterpCheckBefore
9268 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009269
9270/* ------------------------------ */
9271 .balign 128
9272.L_ALT_op_aget_wide: /* 0x45 */
9273/* File: mips/alt_stub.S */
9274/*
9275 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9276 * any interesting requests and then jump to the real instruction
9277 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9278 */
9279 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009280 la ra, artMterpAsmInstructionStart + (69 * 128) # Addr of primary handler
9281 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9282 move a0, rSELF # arg0
9283 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009284 move a2, rPC
9285 la t9, MterpCheckBefore
9286 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009287
9288/* ------------------------------ */
9289 .balign 128
9290.L_ALT_op_aget_object: /* 0x46 */
9291/* File: mips/alt_stub.S */
9292/*
9293 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9294 * any interesting requests and then jump to the real instruction
9295 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9296 */
9297 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009298 la ra, artMterpAsmInstructionStart + (70 * 128) # Addr of primary handler
9299 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9300 move a0, rSELF # arg0
9301 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009302 move a2, rPC
9303 la t9, MterpCheckBefore
9304 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009305
9306/* ------------------------------ */
9307 .balign 128
9308.L_ALT_op_aget_boolean: /* 0x47 */
9309/* File: mips/alt_stub.S */
9310/*
9311 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9312 * any interesting requests and then jump to the real instruction
9313 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9314 */
9315 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009316 la ra, artMterpAsmInstructionStart + (71 * 128) # Addr of primary handler
9317 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9318 move a0, rSELF # arg0
9319 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009320 move a2, rPC
9321 la t9, MterpCheckBefore
9322 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009323
9324/* ------------------------------ */
9325 .balign 128
9326.L_ALT_op_aget_byte: /* 0x48 */
9327/* File: mips/alt_stub.S */
9328/*
9329 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9330 * any interesting requests and then jump to the real instruction
9331 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9332 */
9333 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009334 la ra, artMterpAsmInstructionStart + (72 * 128) # Addr of primary handler
9335 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9336 move a0, rSELF # arg0
9337 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009338 move a2, rPC
9339 la t9, MterpCheckBefore
9340 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009341
9342/* ------------------------------ */
9343 .balign 128
9344.L_ALT_op_aget_char: /* 0x49 */
9345/* File: mips/alt_stub.S */
9346/*
9347 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9348 * any interesting requests and then jump to the real instruction
9349 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9350 */
9351 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009352 la ra, artMterpAsmInstructionStart + (73 * 128) # Addr of primary handler
9353 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9354 move a0, rSELF # arg0
9355 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009356 move a2, rPC
9357 la t9, MterpCheckBefore
9358 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009359
9360/* ------------------------------ */
9361 .balign 128
9362.L_ALT_op_aget_short: /* 0x4a */
9363/* File: mips/alt_stub.S */
9364/*
9365 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9366 * any interesting requests and then jump to the real instruction
9367 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9368 */
9369 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009370 la ra, artMterpAsmInstructionStart + (74 * 128) # Addr of primary handler
9371 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9372 move a0, rSELF # arg0
9373 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009374 move a2, rPC
9375 la t9, MterpCheckBefore
9376 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009377
9378/* ------------------------------ */
9379 .balign 128
9380.L_ALT_op_aput: /* 0x4b */
9381/* File: mips/alt_stub.S */
9382/*
9383 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9384 * any interesting requests and then jump to the real instruction
9385 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9386 */
9387 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009388 la ra, artMterpAsmInstructionStart + (75 * 128) # Addr of primary handler
9389 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9390 move a0, rSELF # arg0
9391 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009392 move a2, rPC
9393 la t9, MterpCheckBefore
9394 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009395
9396/* ------------------------------ */
9397 .balign 128
9398.L_ALT_op_aput_wide: /* 0x4c */
9399/* File: mips/alt_stub.S */
9400/*
9401 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9402 * any interesting requests and then jump to the real instruction
9403 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9404 */
9405 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009406 la ra, artMterpAsmInstructionStart + (76 * 128) # Addr of primary handler
9407 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9408 move a0, rSELF # arg0
9409 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009410 move a2, rPC
9411 la t9, MterpCheckBefore
9412 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009413
9414/* ------------------------------ */
9415 .balign 128
9416.L_ALT_op_aput_object: /* 0x4d */
9417/* File: mips/alt_stub.S */
9418/*
9419 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9420 * any interesting requests and then jump to the real instruction
9421 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9422 */
9423 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009424 la ra, artMterpAsmInstructionStart + (77 * 128) # Addr of primary handler
9425 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9426 move a0, rSELF # arg0
9427 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009428 move a2, rPC
9429 la t9, MterpCheckBefore
9430 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009431
9432/* ------------------------------ */
9433 .balign 128
9434.L_ALT_op_aput_boolean: /* 0x4e */
9435/* File: mips/alt_stub.S */
9436/*
9437 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9438 * any interesting requests and then jump to the real instruction
9439 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9440 */
9441 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009442 la ra, artMterpAsmInstructionStart + (78 * 128) # Addr of primary handler
9443 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9444 move a0, rSELF # arg0
9445 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009446 move a2, rPC
9447 la t9, MterpCheckBefore
9448 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009449
9450/* ------------------------------ */
9451 .balign 128
9452.L_ALT_op_aput_byte: /* 0x4f */
9453/* File: mips/alt_stub.S */
9454/*
9455 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9456 * any interesting requests and then jump to the real instruction
9457 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9458 */
9459 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009460 la ra, artMterpAsmInstructionStart + (79 * 128) # Addr of primary handler
9461 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9462 move a0, rSELF # arg0
9463 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009464 move a2, rPC
9465 la t9, MterpCheckBefore
9466 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009467
9468/* ------------------------------ */
9469 .balign 128
9470.L_ALT_op_aput_char: /* 0x50 */
9471/* File: mips/alt_stub.S */
9472/*
9473 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9474 * any interesting requests and then jump to the real instruction
9475 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9476 */
9477 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009478 la ra, artMterpAsmInstructionStart + (80 * 128) # Addr of primary handler
9479 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9480 move a0, rSELF # arg0
9481 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009482 move a2, rPC
9483 la t9, MterpCheckBefore
9484 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009485
9486/* ------------------------------ */
9487 .balign 128
9488.L_ALT_op_aput_short: /* 0x51 */
9489/* File: mips/alt_stub.S */
9490/*
9491 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9492 * any interesting requests and then jump to the real instruction
9493 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9494 */
9495 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009496 la ra, artMterpAsmInstructionStart + (81 * 128) # Addr of primary handler
9497 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9498 move a0, rSELF # arg0
9499 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009500 move a2, rPC
9501 la t9, MterpCheckBefore
9502 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009503
9504/* ------------------------------ */
9505 .balign 128
9506.L_ALT_op_iget: /* 0x52 */
9507/* File: mips/alt_stub.S */
9508/*
9509 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9510 * any interesting requests and then jump to the real instruction
9511 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9512 */
9513 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009514 la ra, artMterpAsmInstructionStart + (82 * 128) # Addr of primary handler
9515 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9516 move a0, rSELF # arg0
9517 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009518 move a2, rPC
9519 la t9, MterpCheckBefore
9520 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009521
9522/* ------------------------------ */
9523 .balign 128
9524.L_ALT_op_iget_wide: /* 0x53 */
9525/* File: mips/alt_stub.S */
9526/*
9527 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9528 * any interesting requests and then jump to the real instruction
9529 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9530 */
9531 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009532 la ra, artMterpAsmInstructionStart + (83 * 128) # Addr of primary handler
9533 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9534 move a0, rSELF # arg0
9535 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009536 move a2, rPC
9537 la t9, MterpCheckBefore
9538 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009539
9540/* ------------------------------ */
9541 .balign 128
9542.L_ALT_op_iget_object: /* 0x54 */
9543/* File: mips/alt_stub.S */
9544/*
9545 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9546 * any interesting requests and then jump to the real instruction
9547 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9548 */
9549 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009550 la ra, artMterpAsmInstructionStart + (84 * 128) # Addr of primary handler
9551 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9552 move a0, rSELF # arg0
9553 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009554 move a2, rPC
9555 la t9, MterpCheckBefore
9556 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009557
9558/* ------------------------------ */
9559 .balign 128
9560.L_ALT_op_iget_boolean: /* 0x55 */
9561/* File: mips/alt_stub.S */
9562/*
9563 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9564 * any interesting requests and then jump to the real instruction
9565 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9566 */
9567 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009568 la ra, artMterpAsmInstructionStart + (85 * 128) # Addr of primary handler
9569 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9570 move a0, rSELF # arg0
9571 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009572 move a2, rPC
9573 la t9, MterpCheckBefore
9574 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009575
9576/* ------------------------------ */
9577 .balign 128
9578.L_ALT_op_iget_byte: /* 0x56 */
9579/* File: mips/alt_stub.S */
9580/*
9581 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9582 * any interesting requests and then jump to the real instruction
9583 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9584 */
9585 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009586 la ra, artMterpAsmInstructionStart + (86 * 128) # Addr of primary handler
9587 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9588 move a0, rSELF # arg0
9589 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009590 move a2, rPC
9591 la t9, MterpCheckBefore
9592 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009593
9594/* ------------------------------ */
9595 .balign 128
9596.L_ALT_op_iget_char: /* 0x57 */
9597/* File: mips/alt_stub.S */
9598/*
9599 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9600 * any interesting requests and then jump to the real instruction
9601 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9602 */
9603 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009604 la ra, artMterpAsmInstructionStart + (87 * 128) # Addr of primary handler
9605 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9606 move a0, rSELF # arg0
9607 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009608 move a2, rPC
9609 la t9, MterpCheckBefore
9610 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009611
9612/* ------------------------------ */
9613 .balign 128
9614.L_ALT_op_iget_short: /* 0x58 */
9615/* File: mips/alt_stub.S */
9616/*
9617 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9618 * any interesting requests and then jump to the real instruction
9619 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9620 */
9621 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009622 la ra, artMterpAsmInstructionStart + (88 * 128) # Addr of primary handler
9623 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9624 move a0, rSELF # arg0
9625 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009626 move a2, rPC
9627 la t9, MterpCheckBefore
9628 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009629
9630/* ------------------------------ */
9631 .balign 128
9632.L_ALT_op_iput: /* 0x59 */
9633/* File: mips/alt_stub.S */
9634/*
9635 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9636 * any interesting requests and then jump to the real instruction
9637 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9638 */
9639 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009640 la ra, artMterpAsmInstructionStart + (89 * 128) # Addr of primary handler
9641 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9642 move a0, rSELF # arg0
9643 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009644 move a2, rPC
9645 la t9, MterpCheckBefore
9646 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009647
9648/* ------------------------------ */
9649 .balign 128
9650.L_ALT_op_iput_wide: /* 0x5a */
9651/* File: mips/alt_stub.S */
9652/*
9653 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9654 * any interesting requests and then jump to the real instruction
9655 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9656 */
9657 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009658 la ra, artMterpAsmInstructionStart + (90 * 128) # Addr of primary handler
9659 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9660 move a0, rSELF # arg0
9661 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009662 move a2, rPC
9663 la t9, MterpCheckBefore
9664 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009665
9666/* ------------------------------ */
9667 .balign 128
9668.L_ALT_op_iput_object: /* 0x5b */
9669/* File: mips/alt_stub.S */
9670/*
9671 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9672 * any interesting requests and then jump to the real instruction
9673 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9674 */
9675 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009676 la ra, artMterpAsmInstructionStart + (91 * 128) # Addr of primary handler
9677 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9678 move a0, rSELF # arg0
9679 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009680 move a2, rPC
9681 la t9, MterpCheckBefore
9682 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009683
9684/* ------------------------------ */
9685 .balign 128
9686.L_ALT_op_iput_boolean: /* 0x5c */
9687/* File: mips/alt_stub.S */
9688/*
9689 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9690 * any interesting requests and then jump to the real instruction
9691 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9692 */
9693 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009694 la ra, artMterpAsmInstructionStart + (92 * 128) # Addr of primary handler
9695 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9696 move a0, rSELF # arg0
9697 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009698 move a2, rPC
9699 la t9, MterpCheckBefore
9700 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009701
9702/* ------------------------------ */
9703 .balign 128
9704.L_ALT_op_iput_byte: /* 0x5d */
9705/* File: mips/alt_stub.S */
9706/*
9707 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9708 * any interesting requests and then jump to the real instruction
9709 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9710 */
9711 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009712 la ra, artMterpAsmInstructionStart + (93 * 128) # Addr of primary handler
9713 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9714 move a0, rSELF # arg0
9715 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009716 move a2, rPC
9717 la t9, MterpCheckBefore
9718 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009719
9720/* ------------------------------ */
9721 .balign 128
9722.L_ALT_op_iput_char: /* 0x5e */
9723/* File: mips/alt_stub.S */
9724/*
9725 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9726 * any interesting requests and then jump to the real instruction
9727 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9728 */
9729 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009730 la ra, artMterpAsmInstructionStart + (94 * 128) # Addr of primary handler
9731 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9732 move a0, rSELF # arg0
9733 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009734 move a2, rPC
9735 la t9, MterpCheckBefore
9736 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009737
9738/* ------------------------------ */
9739 .balign 128
9740.L_ALT_op_iput_short: /* 0x5f */
9741/* File: mips/alt_stub.S */
9742/*
9743 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9744 * any interesting requests and then jump to the real instruction
9745 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9746 */
9747 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009748 la ra, artMterpAsmInstructionStart + (95 * 128) # Addr of primary handler
9749 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9750 move a0, rSELF # arg0
9751 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009752 move a2, rPC
9753 la t9, MterpCheckBefore
9754 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009755
9756/* ------------------------------ */
9757 .balign 128
9758.L_ALT_op_sget: /* 0x60 */
9759/* File: mips/alt_stub.S */
9760/*
9761 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9762 * any interesting requests and then jump to the real instruction
9763 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9764 */
9765 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009766 la ra, artMterpAsmInstructionStart + (96 * 128) # Addr of primary handler
9767 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9768 move a0, rSELF # arg0
9769 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009770 move a2, rPC
9771 la t9, MterpCheckBefore
9772 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009773
9774/* ------------------------------ */
9775 .balign 128
9776.L_ALT_op_sget_wide: /* 0x61 */
9777/* File: mips/alt_stub.S */
9778/*
9779 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9780 * any interesting requests and then jump to the real instruction
9781 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9782 */
9783 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009784 la ra, artMterpAsmInstructionStart + (97 * 128) # Addr of primary handler
9785 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9786 move a0, rSELF # arg0
9787 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009788 move a2, rPC
9789 la t9, MterpCheckBefore
9790 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009791
9792/* ------------------------------ */
9793 .balign 128
9794.L_ALT_op_sget_object: /* 0x62 */
9795/* File: mips/alt_stub.S */
9796/*
9797 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9798 * any interesting requests and then jump to the real instruction
9799 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9800 */
9801 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009802 la ra, artMterpAsmInstructionStart + (98 * 128) # Addr of primary handler
9803 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9804 move a0, rSELF # arg0
9805 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009806 move a2, rPC
9807 la t9, MterpCheckBefore
9808 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009809
9810/* ------------------------------ */
9811 .balign 128
9812.L_ALT_op_sget_boolean: /* 0x63 */
9813/* File: mips/alt_stub.S */
9814/*
9815 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9816 * any interesting requests and then jump to the real instruction
9817 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9818 */
9819 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009820 la ra, artMterpAsmInstructionStart + (99 * 128) # Addr of primary handler
9821 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9822 move a0, rSELF # arg0
9823 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009824 move a2, rPC
9825 la t9, MterpCheckBefore
9826 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009827
9828/* ------------------------------ */
9829 .balign 128
9830.L_ALT_op_sget_byte: /* 0x64 */
9831/* File: mips/alt_stub.S */
9832/*
9833 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9834 * any interesting requests and then jump to the real instruction
9835 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9836 */
9837 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009838 la ra, artMterpAsmInstructionStart + (100 * 128) # Addr of primary handler
9839 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9840 move a0, rSELF # arg0
9841 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009842 move a2, rPC
9843 la t9, MterpCheckBefore
9844 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009845
9846/* ------------------------------ */
9847 .balign 128
9848.L_ALT_op_sget_char: /* 0x65 */
9849/* File: mips/alt_stub.S */
9850/*
9851 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9852 * any interesting requests and then jump to the real instruction
9853 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9854 */
9855 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009856 la ra, artMterpAsmInstructionStart + (101 * 128) # Addr of primary handler
9857 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9858 move a0, rSELF # arg0
9859 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009860 move a2, rPC
9861 la t9, MterpCheckBefore
9862 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009863
9864/* ------------------------------ */
9865 .balign 128
9866.L_ALT_op_sget_short: /* 0x66 */
9867/* File: mips/alt_stub.S */
9868/*
9869 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9870 * any interesting requests and then jump to the real instruction
9871 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9872 */
9873 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009874 la ra, artMterpAsmInstructionStart + (102 * 128) # Addr of primary handler
9875 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9876 move a0, rSELF # arg0
9877 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009878 move a2, rPC
9879 la t9, MterpCheckBefore
9880 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009881
9882/* ------------------------------ */
9883 .balign 128
9884.L_ALT_op_sput: /* 0x67 */
9885/* File: mips/alt_stub.S */
9886/*
9887 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9888 * any interesting requests and then jump to the real instruction
9889 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9890 */
9891 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009892 la ra, artMterpAsmInstructionStart + (103 * 128) # Addr of primary handler
9893 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9894 move a0, rSELF # arg0
9895 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009896 move a2, rPC
9897 la t9, MterpCheckBefore
9898 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009899
9900/* ------------------------------ */
9901 .balign 128
9902.L_ALT_op_sput_wide: /* 0x68 */
9903/* File: mips/alt_stub.S */
9904/*
9905 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9906 * any interesting requests and then jump to the real instruction
9907 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9908 */
9909 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009910 la ra, artMterpAsmInstructionStart + (104 * 128) # Addr of primary handler
9911 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9912 move a0, rSELF # arg0
9913 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009914 move a2, rPC
9915 la t9, MterpCheckBefore
9916 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009917
9918/* ------------------------------ */
9919 .balign 128
9920.L_ALT_op_sput_object: /* 0x69 */
9921/* File: mips/alt_stub.S */
9922/*
9923 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9924 * any interesting requests and then jump to the real instruction
9925 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9926 */
9927 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009928 la ra, artMterpAsmInstructionStart + (105 * 128) # Addr of primary handler
9929 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9930 move a0, rSELF # arg0
9931 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009932 move a2, rPC
9933 la t9, MterpCheckBefore
9934 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009935
9936/* ------------------------------ */
9937 .balign 128
9938.L_ALT_op_sput_boolean: /* 0x6a */
9939/* File: mips/alt_stub.S */
9940/*
9941 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9942 * any interesting requests and then jump to the real instruction
9943 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9944 */
9945 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009946 la ra, artMterpAsmInstructionStart + (106 * 128) # Addr of primary handler
9947 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9948 move a0, rSELF # arg0
9949 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009950 move a2, rPC
9951 la t9, MterpCheckBefore
9952 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009953
9954/* ------------------------------ */
9955 .balign 128
9956.L_ALT_op_sput_byte: /* 0x6b */
9957/* File: mips/alt_stub.S */
9958/*
9959 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9960 * any interesting requests and then jump to the real instruction
9961 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9962 */
9963 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009964 la ra, artMterpAsmInstructionStart + (107 * 128) # Addr of primary handler
9965 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9966 move a0, rSELF # arg0
9967 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009968 move a2, rPC
9969 la t9, MterpCheckBefore
9970 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009971
9972/* ------------------------------ */
9973 .balign 128
9974.L_ALT_op_sput_char: /* 0x6c */
9975/* File: mips/alt_stub.S */
9976/*
9977 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9978 * any interesting requests and then jump to the real instruction
9979 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9980 */
9981 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009982 la ra, artMterpAsmInstructionStart + (108 * 128) # Addr of primary handler
9983 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9984 move a0, rSELF # arg0
9985 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009986 move a2, rPC
9987 la t9, MterpCheckBefore
9988 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009989
9990/* ------------------------------ */
9991 .balign 128
9992.L_ALT_op_sput_short: /* 0x6d */
9993/* File: mips/alt_stub.S */
9994/*
9995 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9996 * any interesting requests and then jump to the real instruction
9997 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9998 */
9999 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010000 la ra, artMterpAsmInstructionStart + (109 * 128) # Addr of primary handler
10001 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10002 move a0, rSELF # arg0
10003 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010004 move a2, rPC
10005 la t9, MterpCheckBefore
10006 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010007
10008/* ------------------------------ */
10009 .balign 128
10010.L_ALT_op_invoke_virtual: /* 0x6e */
10011/* File: mips/alt_stub.S */
10012/*
10013 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10014 * any interesting requests and then jump to the real instruction
10015 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10016 */
10017 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010018 la ra, artMterpAsmInstructionStart + (110 * 128) # Addr of primary handler
10019 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10020 move a0, rSELF # arg0
10021 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010022 move a2, rPC
10023 la t9, MterpCheckBefore
10024 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010025
10026/* ------------------------------ */
10027 .balign 128
10028.L_ALT_op_invoke_super: /* 0x6f */
10029/* File: mips/alt_stub.S */
10030/*
10031 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10032 * any interesting requests and then jump to the real instruction
10033 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10034 */
10035 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010036 la ra, artMterpAsmInstructionStart + (111 * 128) # Addr of primary handler
10037 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10038 move a0, rSELF # arg0
10039 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010040 move a2, rPC
10041 la t9, MterpCheckBefore
10042 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010043
10044/* ------------------------------ */
10045 .balign 128
10046.L_ALT_op_invoke_direct: /* 0x70 */
10047/* File: mips/alt_stub.S */
10048/*
10049 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10050 * any interesting requests and then jump to the real instruction
10051 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10052 */
10053 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010054 la ra, artMterpAsmInstructionStart + (112 * 128) # Addr of primary handler
10055 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10056 move a0, rSELF # arg0
10057 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010058 move a2, rPC
10059 la t9, MterpCheckBefore
10060 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010061
10062/* ------------------------------ */
10063 .balign 128
10064.L_ALT_op_invoke_static: /* 0x71 */
10065/* File: mips/alt_stub.S */
10066/*
10067 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10068 * any interesting requests and then jump to the real instruction
10069 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10070 */
10071 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010072 la ra, artMterpAsmInstructionStart + (113 * 128) # Addr of primary handler
10073 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10074 move a0, rSELF # arg0
10075 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010076 move a2, rPC
10077 la t9, MterpCheckBefore
10078 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010079
10080/* ------------------------------ */
10081 .balign 128
10082.L_ALT_op_invoke_interface: /* 0x72 */
10083/* File: mips/alt_stub.S */
10084/*
10085 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10086 * any interesting requests and then jump to the real instruction
10087 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10088 */
10089 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010090 la ra, artMterpAsmInstructionStart + (114 * 128) # Addr of primary handler
10091 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10092 move a0, rSELF # arg0
10093 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010094 move a2, rPC
10095 la t9, MterpCheckBefore
10096 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010097
10098/* ------------------------------ */
10099 .balign 128
10100.L_ALT_op_return_void_no_barrier: /* 0x73 */
10101/* File: mips/alt_stub.S */
10102/*
10103 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10104 * any interesting requests and then jump to the real instruction
10105 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10106 */
10107 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010108 la ra, artMterpAsmInstructionStart + (115 * 128) # Addr of primary handler
10109 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10110 move a0, rSELF # arg0
10111 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010112 move a2, rPC
10113 la t9, MterpCheckBefore
10114 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010115
10116/* ------------------------------ */
10117 .balign 128
10118.L_ALT_op_invoke_virtual_range: /* 0x74 */
10119/* File: mips/alt_stub.S */
10120/*
10121 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10122 * any interesting requests and then jump to the real instruction
10123 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10124 */
10125 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010126 la ra, artMterpAsmInstructionStart + (116 * 128) # Addr of primary handler
10127 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10128 move a0, rSELF # arg0
10129 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010130 move a2, rPC
10131 la t9, MterpCheckBefore
10132 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010133
10134/* ------------------------------ */
10135 .balign 128
10136.L_ALT_op_invoke_super_range: /* 0x75 */
10137/* File: mips/alt_stub.S */
10138/*
10139 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10140 * any interesting requests and then jump to the real instruction
10141 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10142 */
10143 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010144 la ra, artMterpAsmInstructionStart + (117 * 128) # Addr of primary handler
10145 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10146 move a0, rSELF # arg0
10147 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010148 move a2, rPC
10149 la t9, MterpCheckBefore
10150 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010151
10152/* ------------------------------ */
10153 .balign 128
10154.L_ALT_op_invoke_direct_range: /* 0x76 */
10155/* File: mips/alt_stub.S */
10156/*
10157 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10158 * any interesting requests and then jump to the real instruction
10159 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10160 */
10161 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010162 la ra, artMterpAsmInstructionStart + (118 * 128) # Addr of primary handler
10163 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10164 move a0, rSELF # arg0
10165 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010166 move a2, rPC
10167 la t9, MterpCheckBefore
10168 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010169
10170/* ------------------------------ */
10171 .balign 128
10172.L_ALT_op_invoke_static_range: /* 0x77 */
10173/* File: mips/alt_stub.S */
10174/*
10175 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10176 * any interesting requests and then jump to the real instruction
10177 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10178 */
10179 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010180 la ra, artMterpAsmInstructionStart + (119 * 128) # Addr of primary handler
10181 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10182 move a0, rSELF # arg0
10183 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010184 move a2, rPC
10185 la t9, MterpCheckBefore
10186 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010187
10188/* ------------------------------ */
10189 .balign 128
10190.L_ALT_op_invoke_interface_range: /* 0x78 */
10191/* File: mips/alt_stub.S */
10192/*
10193 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10194 * any interesting requests and then jump to the real instruction
10195 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10196 */
10197 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010198 la ra, artMterpAsmInstructionStart + (120 * 128) # Addr of primary handler
10199 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10200 move a0, rSELF # arg0
10201 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010202 move a2, rPC
10203 la t9, MterpCheckBefore
10204 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010205
10206/* ------------------------------ */
10207 .balign 128
10208.L_ALT_op_unused_79: /* 0x79 */
10209/* File: mips/alt_stub.S */
10210/*
10211 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10212 * any interesting requests and then jump to the real instruction
10213 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10214 */
10215 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010216 la ra, artMterpAsmInstructionStart + (121 * 128) # Addr of primary handler
10217 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10218 move a0, rSELF # arg0
10219 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010220 move a2, rPC
10221 la t9, MterpCheckBefore
10222 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010223
10224/* ------------------------------ */
10225 .balign 128
10226.L_ALT_op_unused_7a: /* 0x7a */
10227/* File: mips/alt_stub.S */
10228/*
10229 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10230 * any interesting requests and then jump to the real instruction
10231 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10232 */
10233 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010234 la ra, artMterpAsmInstructionStart + (122 * 128) # Addr of primary handler
10235 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10236 move a0, rSELF # arg0
10237 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010238 move a2, rPC
10239 la t9, MterpCheckBefore
10240 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010241
10242/* ------------------------------ */
10243 .balign 128
10244.L_ALT_op_neg_int: /* 0x7b */
10245/* File: mips/alt_stub.S */
10246/*
10247 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10248 * any interesting requests and then jump to the real instruction
10249 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10250 */
10251 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010252 la ra, artMterpAsmInstructionStart + (123 * 128) # Addr of primary handler
10253 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10254 move a0, rSELF # arg0
10255 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010256 move a2, rPC
10257 la t9, MterpCheckBefore
10258 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010259
10260/* ------------------------------ */
10261 .balign 128
10262.L_ALT_op_not_int: /* 0x7c */
10263/* File: mips/alt_stub.S */
10264/*
10265 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10266 * any interesting requests and then jump to the real instruction
10267 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10268 */
10269 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010270 la ra, artMterpAsmInstructionStart + (124 * 128) # Addr of primary handler
10271 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10272 move a0, rSELF # arg0
10273 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010274 move a2, rPC
10275 la t9, MterpCheckBefore
10276 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010277
10278/* ------------------------------ */
10279 .balign 128
10280.L_ALT_op_neg_long: /* 0x7d */
10281/* File: mips/alt_stub.S */
10282/*
10283 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10284 * any interesting requests and then jump to the real instruction
10285 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10286 */
10287 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010288 la ra, artMterpAsmInstructionStart + (125 * 128) # Addr of primary handler
10289 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10290 move a0, rSELF # arg0
10291 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010292 move a2, rPC
10293 la t9, MterpCheckBefore
10294 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010295
10296/* ------------------------------ */
10297 .balign 128
10298.L_ALT_op_not_long: /* 0x7e */
10299/* File: mips/alt_stub.S */
10300/*
10301 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10302 * any interesting requests and then jump to the real instruction
10303 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10304 */
10305 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010306 la ra, artMterpAsmInstructionStart + (126 * 128) # Addr of primary handler
10307 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10308 move a0, rSELF # arg0
10309 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010310 move a2, rPC
10311 la t9, MterpCheckBefore
10312 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010313
10314/* ------------------------------ */
10315 .balign 128
10316.L_ALT_op_neg_float: /* 0x7f */
10317/* File: mips/alt_stub.S */
10318/*
10319 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10320 * any interesting requests and then jump to the real instruction
10321 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10322 */
10323 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010324 la ra, artMterpAsmInstructionStart + (127 * 128) # Addr of primary handler
10325 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10326 move a0, rSELF # arg0
10327 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010328 move a2, rPC
10329 la t9, MterpCheckBefore
10330 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010331
10332/* ------------------------------ */
10333 .balign 128
10334.L_ALT_op_neg_double: /* 0x80 */
10335/* File: mips/alt_stub.S */
10336/*
10337 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10338 * any interesting requests and then jump to the real instruction
10339 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10340 */
10341 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010342 la ra, artMterpAsmInstructionStart + (128 * 128) # Addr of primary handler
10343 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10344 move a0, rSELF # arg0
10345 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010346 move a2, rPC
10347 la t9, MterpCheckBefore
10348 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010349
10350/* ------------------------------ */
10351 .balign 128
10352.L_ALT_op_int_to_long: /* 0x81 */
10353/* File: mips/alt_stub.S */
10354/*
10355 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10356 * any interesting requests and then jump to the real instruction
10357 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10358 */
10359 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010360 la ra, artMterpAsmInstructionStart + (129 * 128) # Addr of primary handler
10361 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10362 move a0, rSELF # arg0
10363 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010364 move a2, rPC
10365 la t9, MterpCheckBefore
10366 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010367
10368/* ------------------------------ */
10369 .balign 128
10370.L_ALT_op_int_to_float: /* 0x82 */
10371/* File: mips/alt_stub.S */
10372/*
10373 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10374 * any interesting requests and then jump to the real instruction
10375 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10376 */
10377 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010378 la ra, artMterpAsmInstructionStart + (130 * 128) # Addr of primary handler
10379 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10380 move a0, rSELF # arg0
10381 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010382 move a2, rPC
10383 la t9, MterpCheckBefore
10384 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010385
10386/* ------------------------------ */
10387 .balign 128
10388.L_ALT_op_int_to_double: /* 0x83 */
10389/* File: mips/alt_stub.S */
10390/*
10391 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10392 * any interesting requests and then jump to the real instruction
10393 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10394 */
10395 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010396 la ra, artMterpAsmInstructionStart + (131 * 128) # Addr of primary handler
10397 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10398 move a0, rSELF # arg0
10399 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010400 move a2, rPC
10401 la t9, MterpCheckBefore
10402 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010403
10404/* ------------------------------ */
10405 .balign 128
10406.L_ALT_op_long_to_int: /* 0x84 */
10407/* File: mips/alt_stub.S */
10408/*
10409 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10410 * any interesting requests and then jump to the real instruction
10411 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10412 */
10413 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010414 la ra, artMterpAsmInstructionStart + (132 * 128) # Addr of primary handler
10415 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10416 move a0, rSELF # arg0
10417 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010418 move a2, rPC
10419 la t9, MterpCheckBefore
10420 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010421
10422/* ------------------------------ */
10423 .balign 128
10424.L_ALT_op_long_to_float: /* 0x85 */
10425/* File: mips/alt_stub.S */
10426/*
10427 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10428 * any interesting requests and then jump to the real instruction
10429 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10430 */
10431 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010432 la ra, artMterpAsmInstructionStart + (133 * 128) # Addr of primary handler
10433 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10434 move a0, rSELF # arg0
10435 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010436 move a2, rPC
10437 la t9, MterpCheckBefore
10438 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010439
10440/* ------------------------------ */
10441 .balign 128
10442.L_ALT_op_long_to_double: /* 0x86 */
10443/* File: mips/alt_stub.S */
10444/*
10445 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10446 * any interesting requests and then jump to the real instruction
10447 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10448 */
10449 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010450 la ra, artMterpAsmInstructionStart + (134 * 128) # Addr of primary handler
10451 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10452 move a0, rSELF # arg0
10453 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010454 move a2, rPC
10455 la t9, MterpCheckBefore
10456 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010457
10458/* ------------------------------ */
10459 .balign 128
10460.L_ALT_op_float_to_int: /* 0x87 */
10461/* File: mips/alt_stub.S */
10462/*
10463 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10464 * any interesting requests and then jump to the real instruction
10465 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10466 */
10467 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010468 la ra, artMterpAsmInstructionStart + (135 * 128) # Addr of primary handler
10469 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10470 move a0, rSELF # arg0
10471 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010472 move a2, rPC
10473 la t9, MterpCheckBefore
10474 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010475
10476/* ------------------------------ */
10477 .balign 128
10478.L_ALT_op_float_to_long: /* 0x88 */
10479/* File: mips/alt_stub.S */
10480/*
10481 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10482 * any interesting requests and then jump to the real instruction
10483 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10484 */
10485 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010486 la ra, artMterpAsmInstructionStart + (136 * 128) # Addr of primary handler
10487 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10488 move a0, rSELF # arg0
10489 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010490 move a2, rPC
10491 la t9, MterpCheckBefore
10492 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010493
10494/* ------------------------------ */
10495 .balign 128
10496.L_ALT_op_float_to_double: /* 0x89 */
10497/* File: mips/alt_stub.S */
10498/*
10499 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10500 * any interesting requests and then jump to the real instruction
10501 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10502 */
10503 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010504 la ra, artMterpAsmInstructionStart + (137 * 128) # Addr of primary handler
10505 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10506 move a0, rSELF # arg0
10507 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010508 move a2, rPC
10509 la t9, MterpCheckBefore
10510 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010511
10512/* ------------------------------ */
10513 .balign 128
10514.L_ALT_op_double_to_int: /* 0x8a */
10515/* File: mips/alt_stub.S */
10516/*
10517 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10518 * any interesting requests and then jump to the real instruction
10519 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10520 */
10521 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010522 la ra, artMterpAsmInstructionStart + (138 * 128) # Addr of primary handler
10523 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10524 move a0, rSELF # arg0
10525 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010526 move a2, rPC
10527 la t9, MterpCheckBefore
10528 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010529
10530/* ------------------------------ */
10531 .balign 128
10532.L_ALT_op_double_to_long: /* 0x8b */
10533/* File: mips/alt_stub.S */
10534/*
10535 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10536 * any interesting requests and then jump to the real instruction
10537 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10538 */
10539 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010540 la ra, artMterpAsmInstructionStart + (139 * 128) # Addr of primary handler
10541 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10542 move a0, rSELF # arg0
10543 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010544 move a2, rPC
10545 la t9, MterpCheckBefore
10546 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010547
10548/* ------------------------------ */
10549 .balign 128
10550.L_ALT_op_double_to_float: /* 0x8c */
10551/* File: mips/alt_stub.S */
10552/*
10553 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10554 * any interesting requests and then jump to the real instruction
10555 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10556 */
10557 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010558 la ra, artMterpAsmInstructionStart + (140 * 128) # Addr of primary handler
10559 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10560 move a0, rSELF # arg0
10561 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010562 move a2, rPC
10563 la t9, MterpCheckBefore
10564 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010565
10566/* ------------------------------ */
10567 .balign 128
10568.L_ALT_op_int_to_byte: /* 0x8d */
10569/* File: mips/alt_stub.S */
10570/*
10571 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10572 * any interesting requests and then jump to the real instruction
10573 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10574 */
10575 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010576 la ra, artMterpAsmInstructionStart + (141 * 128) # Addr of primary handler
10577 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10578 move a0, rSELF # arg0
10579 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010580 move a2, rPC
10581 la t9, MterpCheckBefore
10582 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010583
10584/* ------------------------------ */
10585 .balign 128
10586.L_ALT_op_int_to_char: /* 0x8e */
10587/* File: mips/alt_stub.S */
10588/*
10589 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10590 * any interesting requests and then jump to the real instruction
10591 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10592 */
10593 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010594 la ra, artMterpAsmInstructionStart + (142 * 128) # Addr of primary handler
10595 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10596 move a0, rSELF # arg0
10597 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010598 move a2, rPC
10599 la t9, MterpCheckBefore
10600 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010601
10602/* ------------------------------ */
10603 .balign 128
10604.L_ALT_op_int_to_short: /* 0x8f */
10605/* File: mips/alt_stub.S */
10606/*
10607 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10608 * any interesting requests and then jump to the real instruction
10609 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10610 */
10611 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010612 la ra, artMterpAsmInstructionStart + (143 * 128) # Addr of primary handler
10613 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10614 move a0, rSELF # arg0
10615 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010616 move a2, rPC
10617 la t9, MterpCheckBefore
10618 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010619
10620/* ------------------------------ */
10621 .balign 128
10622.L_ALT_op_add_int: /* 0x90 */
10623/* File: mips/alt_stub.S */
10624/*
10625 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10626 * any interesting requests and then jump to the real instruction
10627 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10628 */
10629 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010630 la ra, artMterpAsmInstructionStart + (144 * 128) # Addr of primary handler
10631 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10632 move a0, rSELF # arg0
10633 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010634 move a2, rPC
10635 la t9, MterpCheckBefore
10636 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010637
10638/* ------------------------------ */
10639 .balign 128
10640.L_ALT_op_sub_int: /* 0x91 */
10641/* File: mips/alt_stub.S */
10642/*
10643 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10644 * any interesting requests and then jump to the real instruction
10645 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10646 */
10647 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010648 la ra, artMterpAsmInstructionStart + (145 * 128) # Addr of primary handler
10649 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10650 move a0, rSELF # arg0
10651 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010652 move a2, rPC
10653 la t9, MterpCheckBefore
10654 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010655
10656/* ------------------------------ */
10657 .balign 128
10658.L_ALT_op_mul_int: /* 0x92 */
10659/* File: mips/alt_stub.S */
10660/*
10661 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10662 * any interesting requests and then jump to the real instruction
10663 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10664 */
10665 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010666 la ra, artMterpAsmInstructionStart + (146 * 128) # Addr of primary handler
10667 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10668 move a0, rSELF # arg0
10669 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010670 move a2, rPC
10671 la t9, MterpCheckBefore
10672 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010673
10674/* ------------------------------ */
10675 .balign 128
10676.L_ALT_op_div_int: /* 0x93 */
10677/* File: mips/alt_stub.S */
10678/*
10679 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10680 * any interesting requests and then jump to the real instruction
10681 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10682 */
10683 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010684 la ra, artMterpAsmInstructionStart + (147 * 128) # Addr of primary handler
10685 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10686 move a0, rSELF # arg0
10687 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010688 move a2, rPC
10689 la t9, MterpCheckBefore
10690 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010691
10692/* ------------------------------ */
10693 .balign 128
10694.L_ALT_op_rem_int: /* 0x94 */
10695/* File: mips/alt_stub.S */
10696/*
10697 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10698 * any interesting requests and then jump to the real instruction
10699 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10700 */
10701 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010702 la ra, artMterpAsmInstructionStart + (148 * 128) # Addr of primary handler
10703 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10704 move a0, rSELF # arg0
10705 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010706 move a2, rPC
10707 la t9, MterpCheckBefore
10708 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010709
10710/* ------------------------------ */
10711 .balign 128
10712.L_ALT_op_and_int: /* 0x95 */
10713/* File: mips/alt_stub.S */
10714/*
10715 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10716 * any interesting requests and then jump to the real instruction
10717 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10718 */
10719 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010720 la ra, artMterpAsmInstructionStart + (149 * 128) # Addr of primary handler
10721 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10722 move a0, rSELF # arg0
10723 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010724 move a2, rPC
10725 la t9, MterpCheckBefore
10726 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010727
10728/* ------------------------------ */
10729 .balign 128
10730.L_ALT_op_or_int: /* 0x96 */
10731/* File: mips/alt_stub.S */
10732/*
10733 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10734 * any interesting requests and then jump to the real instruction
10735 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10736 */
10737 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010738 la ra, artMterpAsmInstructionStart + (150 * 128) # Addr of primary handler
10739 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10740 move a0, rSELF # arg0
10741 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010742 move a2, rPC
10743 la t9, MterpCheckBefore
10744 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010745
10746/* ------------------------------ */
10747 .balign 128
10748.L_ALT_op_xor_int: /* 0x97 */
10749/* File: mips/alt_stub.S */
10750/*
10751 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10752 * any interesting requests and then jump to the real instruction
10753 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10754 */
10755 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010756 la ra, artMterpAsmInstructionStart + (151 * 128) # Addr of primary handler
10757 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10758 move a0, rSELF # arg0
10759 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010760 move a2, rPC
10761 la t9, MterpCheckBefore
10762 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010763
10764/* ------------------------------ */
10765 .balign 128
10766.L_ALT_op_shl_int: /* 0x98 */
10767/* File: mips/alt_stub.S */
10768/*
10769 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10770 * any interesting requests and then jump to the real instruction
10771 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10772 */
10773 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010774 la ra, artMterpAsmInstructionStart + (152 * 128) # Addr of primary handler
10775 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10776 move a0, rSELF # arg0
10777 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010778 move a2, rPC
10779 la t9, MterpCheckBefore
10780 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010781
10782/* ------------------------------ */
10783 .balign 128
10784.L_ALT_op_shr_int: /* 0x99 */
10785/* File: mips/alt_stub.S */
10786/*
10787 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10788 * any interesting requests and then jump to the real instruction
10789 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10790 */
10791 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010792 la ra, artMterpAsmInstructionStart + (153 * 128) # Addr of primary handler
10793 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10794 move a0, rSELF # arg0
10795 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010796 move a2, rPC
10797 la t9, MterpCheckBefore
10798 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010799
10800/* ------------------------------ */
10801 .balign 128
10802.L_ALT_op_ushr_int: /* 0x9a */
10803/* File: mips/alt_stub.S */
10804/*
10805 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10806 * any interesting requests and then jump to the real instruction
10807 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10808 */
10809 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010810 la ra, artMterpAsmInstructionStart + (154 * 128) # Addr of primary handler
10811 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10812 move a0, rSELF # arg0
10813 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010814 move a2, rPC
10815 la t9, MterpCheckBefore
10816 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010817
10818/* ------------------------------ */
10819 .balign 128
10820.L_ALT_op_add_long: /* 0x9b */
10821/* File: mips/alt_stub.S */
10822/*
10823 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10824 * any interesting requests and then jump to the real instruction
10825 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10826 */
10827 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010828 la ra, artMterpAsmInstructionStart + (155 * 128) # Addr of primary handler
10829 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10830 move a0, rSELF # arg0
10831 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010832 move a2, rPC
10833 la t9, MterpCheckBefore
10834 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010835
10836/* ------------------------------ */
10837 .balign 128
10838.L_ALT_op_sub_long: /* 0x9c */
10839/* File: mips/alt_stub.S */
10840/*
10841 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10842 * any interesting requests and then jump to the real instruction
10843 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10844 */
10845 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010846 la ra, artMterpAsmInstructionStart + (156 * 128) # Addr of primary handler
10847 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10848 move a0, rSELF # arg0
10849 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010850 move a2, rPC
10851 la t9, MterpCheckBefore
10852 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010853
10854/* ------------------------------ */
10855 .balign 128
10856.L_ALT_op_mul_long: /* 0x9d */
10857/* File: mips/alt_stub.S */
10858/*
10859 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10860 * any interesting requests and then jump to the real instruction
10861 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10862 */
10863 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010864 la ra, artMterpAsmInstructionStart + (157 * 128) # Addr of primary handler
10865 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10866 move a0, rSELF # arg0
10867 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010868 move a2, rPC
10869 la t9, MterpCheckBefore
10870 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010871
10872/* ------------------------------ */
10873 .balign 128
10874.L_ALT_op_div_long: /* 0x9e */
10875/* File: mips/alt_stub.S */
10876/*
10877 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10878 * any interesting requests and then jump to the real instruction
10879 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10880 */
10881 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010882 la ra, artMterpAsmInstructionStart + (158 * 128) # Addr of primary handler
10883 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10884 move a0, rSELF # arg0
10885 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010886 move a2, rPC
10887 la t9, MterpCheckBefore
10888 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010889
10890/* ------------------------------ */
10891 .balign 128
10892.L_ALT_op_rem_long: /* 0x9f */
10893/* File: mips/alt_stub.S */
10894/*
10895 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10896 * any interesting requests and then jump to the real instruction
10897 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10898 */
10899 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010900 la ra, artMterpAsmInstructionStart + (159 * 128) # Addr of primary handler
10901 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10902 move a0, rSELF # arg0
10903 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010904 move a2, rPC
10905 la t9, MterpCheckBefore
10906 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010907
10908/* ------------------------------ */
10909 .balign 128
10910.L_ALT_op_and_long: /* 0xa0 */
10911/* File: mips/alt_stub.S */
10912/*
10913 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10914 * any interesting requests and then jump to the real instruction
10915 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10916 */
10917 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010918 la ra, artMterpAsmInstructionStart + (160 * 128) # Addr of primary handler
10919 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10920 move a0, rSELF # arg0
10921 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010922 move a2, rPC
10923 la t9, MterpCheckBefore
10924 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010925
10926/* ------------------------------ */
10927 .balign 128
10928.L_ALT_op_or_long: /* 0xa1 */
10929/* File: mips/alt_stub.S */
10930/*
10931 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10932 * any interesting requests and then jump to the real instruction
10933 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10934 */
10935 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010936 la ra, artMterpAsmInstructionStart + (161 * 128) # Addr of primary handler
10937 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10938 move a0, rSELF # arg0
10939 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010940 move a2, rPC
10941 la t9, MterpCheckBefore
10942 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010943
10944/* ------------------------------ */
10945 .balign 128
10946.L_ALT_op_xor_long: /* 0xa2 */
10947/* File: mips/alt_stub.S */
10948/*
10949 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10950 * any interesting requests and then jump to the real instruction
10951 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10952 */
10953 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010954 la ra, artMterpAsmInstructionStart + (162 * 128) # Addr of primary handler
10955 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10956 move a0, rSELF # arg0
10957 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010958 move a2, rPC
10959 la t9, MterpCheckBefore
10960 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010961
10962/* ------------------------------ */
10963 .balign 128
10964.L_ALT_op_shl_long: /* 0xa3 */
10965/* File: mips/alt_stub.S */
10966/*
10967 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10968 * any interesting requests and then jump to the real instruction
10969 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10970 */
10971 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010972 la ra, artMterpAsmInstructionStart + (163 * 128) # Addr of primary handler
10973 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10974 move a0, rSELF # arg0
10975 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010976 move a2, rPC
10977 la t9, MterpCheckBefore
10978 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010979
10980/* ------------------------------ */
10981 .balign 128
10982.L_ALT_op_shr_long: /* 0xa4 */
10983/* File: mips/alt_stub.S */
10984/*
10985 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10986 * any interesting requests and then jump to the real instruction
10987 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10988 */
10989 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010990 la ra, artMterpAsmInstructionStart + (164 * 128) # Addr of primary handler
10991 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10992 move a0, rSELF # arg0
10993 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010994 move a2, rPC
10995 la t9, MterpCheckBefore
10996 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010997
10998/* ------------------------------ */
10999 .balign 128
11000.L_ALT_op_ushr_long: /* 0xa5 */
11001/* File: mips/alt_stub.S */
11002/*
11003 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11004 * any interesting requests and then jump to the real instruction
11005 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11006 */
11007 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011008 la ra, artMterpAsmInstructionStart + (165 * 128) # Addr of primary handler
11009 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11010 move a0, rSELF # arg0
11011 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011012 move a2, rPC
11013 la t9, MterpCheckBefore
11014 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011015
11016/* ------------------------------ */
11017 .balign 128
11018.L_ALT_op_add_float: /* 0xa6 */
11019/* File: mips/alt_stub.S */
11020/*
11021 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11022 * any interesting requests and then jump to the real instruction
11023 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11024 */
11025 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011026 la ra, artMterpAsmInstructionStart + (166 * 128) # Addr of primary handler
11027 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11028 move a0, rSELF # arg0
11029 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011030 move a2, rPC
11031 la t9, MterpCheckBefore
11032 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011033
11034/* ------------------------------ */
11035 .balign 128
11036.L_ALT_op_sub_float: /* 0xa7 */
11037/* File: mips/alt_stub.S */
11038/*
11039 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11040 * any interesting requests and then jump to the real instruction
11041 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11042 */
11043 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011044 la ra, artMterpAsmInstructionStart + (167 * 128) # Addr of primary handler
11045 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11046 move a0, rSELF # arg0
11047 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011048 move a2, rPC
11049 la t9, MterpCheckBefore
11050 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011051
11052/* ------------------------------ */
11053 .balign 128
11054.L_ALT_op_mul_float: /* 0xa8 */
11055/* File: mips/alt_stub.S */
11056/*
11057 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11058 * any interesting requests and then jump to the real instruction
11059 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11060 */
11061 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011062 la ra, artMterpAsmInstructionStart + (168 * 128) # Addr of primary handler
11063 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11064 move a0, rSELF # arg0
11065 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011066 move a2, rPC
11067 la t9, MterpCheckBefore
11068 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011069
11070/* ------------------------------ */
11071 .balign 128
11072.L_ALT_op_div_float: /* 0xa9 */
11073/* File: mips/alt_stub.S */
11074/*
11075 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11076 * any interesting requests and then jump to the real instruction
11077 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11078 */
11079 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011080 la ra, artMterpAsmInstructionStart + (169 * 128) # Addr of primary handler
11081 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11082 move a0, rSELF # arg0
11083 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011084 move a2, rPC
11085 la t9, MterpCheckBefore
11086 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011087
11088/* ------------------------------ */
11089 .balign 128
11090.L_ALT_op_rem_float: /* 0xaa */
11091/* File: mips/alt_stub.S */
11092/*
11093 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11094 * any interesting requests and then jump to the real instruction
11095 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11096 */
11097 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011098 la ra, artMterpAsmInstructionStart + (170 * 128) # Addr of primary handler
11099 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11100 move a0, rSELF # arg0
11101 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011102 move a2, rPC
11103 la t9, MterpCheckBefore
11104 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011105
11106/* ------------------------------ */
11107 .balign 128
11108.L_ALT_op_add_double: /* 0xab */
11109/* File: mips/alt_stub.S */
11110/*
11111 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11112 * any interesting requests and then jump to the real instruction
11113 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11114 */
11115 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011116 la ra, artMterpAsmInstructionStart + (171 * 128) # Addr of primary handler
11117 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11118 move a0, rSELF # arg0
11119 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011120 move a2, rPC
11121 la t9, MterpCheckBefore
11122 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011123
11124/* ------------------------------ */
11125 .balign 128
11126.L_ALT_op_sub_double: /* 0xac */
11127/* File: mips/alt_stub.S */
11128/*
11129 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11130 * any interesting requests and then jump to the real instruction
11131 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11132 */
11133 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011134 la ra, artMterpAsmInstructionStart + (172 * 128) # Addr of primary handler
11135 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11136 move a0, rSELF # arg0
11137 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011138 move a2, rPC
11139 la t9, MterpCheckBefore
11140 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011141
11142/* ------------------------------ */
11143 .balign 128
11144.L_ALT_op_mul_double: /* 0xad */
11145/* File: mips/alt_stub.S */
11146/*
11147 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11148 * any interesting requests and then jump to the real instruction
11149 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11150 */
11151 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011152 la ra, artMterpAsmInstructionStart + (173 * 128) # Addr of primary handler
11153 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11154 move a0, rSELF # arg0
11155 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011156 move a2, rPC
11157 la t9, MterpCheckBefore
11158 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011159
11160/* ------------------------------ */
11161 .balign 128
11162.L_ALT_op_div_double: /* 0xae */
11163/* File: mips/alt_stub.S */
11164/*
11165 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11166 * any interesting requests and then jump to the real instruction
11167 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11168 */
11169 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011170 la ra, artMterpAsmInstructionStart + (174 * 128) # Addr of primary handler
11171 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11172 move a0, rSELF # arg0
11173 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011174 move a2, rPC
11175 la t9, MterpCheckBefore
11176 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011177
11178/* ------------------------------ */
11179 .balign 128
11180.L_ALT_op_rem_double: /* 0xaf */
11181/* File: mips/alt_stub.S */
11182/*
11183 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11184 * any interesting requests and then jump to the real instruction
11185 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11186 */
11187 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011188 la ra, artMterpAsmInstructionStart + (175 * 128) # Addr of primary handler
11189 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11190 move a0, rSELF # arg0
11191 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011192 move a2, rPC
11193 la t9, MterpCheckBefore
11194 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011195
11196/* ------------------------------ */
11197 .balign 128
11198.L_ALT_op_add_int_2addr: /* 0xb0 */
11199/* File: mips/alt_stub.S */
11200/*
11201 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11202 * any interesting requests and then jump to the real instruction
11203 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11204 */
11205 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011206 la ra, artMterpAsmInstructionStart + (176 * 128) # Addr of primary handler
11207 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11208 move a0, rSELF # arg0
11209 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011210 move a2, rPC
11211 la t9, MterpCheckBefore
11212 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011213
11214/* ------------------------------ */
11215 .balign 128
11216.L_ALT_op_sub_int_2addr: /* 0xb1 */
11217/* File: mips/alt_stub.S */
11218/*
11219 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11220 * any interesting requests and then jump to the real instruction
11221 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11222 */
11223 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011224 la ra, artMterpAsmInstructionStart + (177 * 128) # Addr of primary handler
11225 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11226 move a0, rSELF # arg0
11227 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011228 move a2, rPC
11229 la t9, MterpCheckBefore
11230 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011231
11232/* ------------------------------ */
11233 .balign 128
11234.L_ALT_op_mul_int_2addr: /* 0xb2 */
11235/* File: mips/alt_stub.S */
11236/*
11237 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11238 * any interesting requests and then jump to the real instruction
11239 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11240 */
11241 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011242 la ra, artMterpAsmInstructionStart + (178 * 128) # Addr of primary handler
11243 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11244 move a0, rSELF # arg0
11245 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011246 move a2, rPC
11247 la t9, MterpCheckBefore
11248 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011249
11250/* ------------------------------ */
11251 .balign 128
11252.L_ALT_op_div_int_2addr: /* 0xb3 */
11253/* File: mips/alt_stub.S */
11254/*
11255 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11256 * any interesting requests and then jump to the real instruction
11257 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11258 */
11259 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011260 la ra, artMterpAsmInstructionStart + (179 * 128) # Addr of primary handler
11261 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11262 move a0, rSELF # arg0
11263 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011264 move a2, rPC
11265 la t9, MterpCheckBefore
11266 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011267
11268/* ------------------------------ */
11269 .balign 128
11270.L_ALT_op_rem_int_2addr: /* 0xb4 */
11271/* File: mips/alt_stub.S */
11272/*
11273 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11274 * any interesting requests and then jump to the real instruction
11275 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11276 */
11277 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011278 la ra, artMterpAsmInstructionStart + (180 * 128) # Addr of primary handler
11279 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11280 move a0, rSELF # arg0
11281 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011282 move a2, rPC
11283 la t9, MterpCheckBefore
11284 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011285
11286/* ------------------------------ */
11287 .balign 128
11288.L_ALT_op_and_int_2addr: /* 0xb5 */
11289/* File: mips/alt_stub.S */
11290/*
11291 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11292 * any interesting requests and then jump to the real instruction
11293 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11294 */
11295 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011296 la ra, artMterpAsmInstructionStart + (181 * 128) # Addr of primary handler
11297 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11298 move a0, rSELF # arg0
11299 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011300 move a2, rPC
11301 la t9, MterpCheckBefore
11302 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011303
11304/* ------------------------------ */
11305 .balign 128
11306.L_ALT_op_or_int_2addr: /* 0xb6 */
11307/* File: mips/alt_stub.S */
11308/*
11309 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11310 * any interesting requests and then jump to the real instruction
11311 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11312 */
11313 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011314 la ra, artMterpAsmInstructionStart + (182 * 128) # Addr of primary handler
11315 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11316 move a0, rSELF # arg0
11317 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011318 move a2, rPC
11319 la t9, MterpCheckBefore
11320 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011321
11322/* ------------------------------ */
11323 .balign 128
11324.L_ALT_op_xor_int_2addr: /* 0xb7 */
11325/* File: mips/alt_stub.S */
11326/*
11327 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11328 * any interesting requests and then jump to the real instruction
11329 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11330 */
11331 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011332 la ra, artMterpAsmInstructionStart + (183 * 128) # Addr of primary handler
11333 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11334 move a0, rSELF # arg0
11335 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011336 move a2, rPC
11337 la t9, MterpCheckBefore
11338 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011339
11340/* ------------------------------ */
11341 .balign 128
11342.L_ALT_op_shl_int_2addr: /* 0xb8 */
11343/* File: mips/alt_stub.S */
11344/*
11345 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11346 * any interesting requests and then jump to the real instruction
11347 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11348 */
11349 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011350 la ra, artMterpAsmInstructionStart + (184 * 128) # Addr of primary handler
11351 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11352 move a0, rSELF # arg0
11353 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011354 move a2, rPC
11355 la t9, MterpCheckBefore
11356 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011357
11358/* ------------------------------ */
11359 .balign 128
11360.L_ALT_op_shr_int_2addr: /* 0xb9 */
11361/* File: mips/alt_stub.S */
11362/*
11363 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11364 * any interesting requests and then jump to the real instruction
11365 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11366 */
11367 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011368 la ra, artMterpAsmInstructionStart + (185 * 128) # Addr of primary handler
11369 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11370 move a0, rSELF # arg0
11371 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011372 move a2, rPC
11373 la t9, MterpCheckBefore
11374 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011375
11376/* ------------------------------ */
11377 .balign 128
11378.L_ALT_op_ushr_int_2addr: /* 0xba */
11379/* File: mips/alt_stub.S */
11380/*
11381 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11382 * any interesting requests and then jump to the real instruction
11383 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11384 */
11385 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011386 la ra, artMterpAsmInstructionStart + (186 * 128) # Addr of primary handler
11387 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11388 move a0, rSELF # arg0
11389 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011390 move a2, rPC
11391 la t9, MterpCheckBefore
11392 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011393
11394/* ------------------------------ */
11395 .balign 128
11396.L_ALT_op_add_long_2addr: /* 0xbb */
11397/* File: mips/alt_stub.S */
11398/*
11399 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11400 * any interesting requests and then jump to the real instruction
11401 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11402 */
11403 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011404 la ra, artMterpAsmInstructionStart + (187 * 128) # Addr of primary handler
11405 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11406 move a0, rSELF # arg0
11407 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011408 move a2, rPC
11409 la t9, MterpCheckBefore
11410 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011411
11412/* ------------------------------ */
11413 .balign 128
11414.L_ALT_op_sub_long_2addr: /* 0xbc */
11415/* File: mips/alt_stub.S */
11416/*
11417 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11418 * any interesting requests and then jump to the real instruction
11419 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11420 */
11421 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011422 la ra, artMterpAsmInstructionStart + (188 * 128) # Addr of primary handler
11423 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11424 move a0, rSELF # arg0
11425 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011426 move a2, rPC
11427 la t9, MterpCheckBefore
11428 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011429
11430/* ------------------------------ */
11431 .balign 128
11432.L_ALT_op_mul_long_2addr: /* 0xbd */
11433/* File: mips/alt_stub.S */
11434/*
11435 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11436 * any interesting requests and then jump to the real instruction
11437 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11438 */
11439 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011440 la ra, artMterpAsmInstructionStart + (189 * 128) # Addr of primary handler
11441 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11442 move a0, rSELF # arg0
11443 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011444 move a2, rPC
11445 la t9, MterpCheckBefore
11446 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011447
11448/* ------------------------------ */
11449 .balign 128
11450.L_ALT_op_div_long_2addr: /* 0xbe */
11451/* File: mips/alt_stub.S */
11452/*
11453 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11454 * any interesting requests and then jump to the real instruction
11455 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11456 */
11457 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011458 la ra, artMterpAsmInstructionStart + (190 * 128) # Addr of primary handler
11459 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11460 move a0, rSELF # arg0
11461 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011462 move a2, rPC
11463 la t9, MterpCheckBefore
11464 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011465
11466/* ------------------------------ */
11467 .balign 128
11468.L_ALT_op_rem_long_2addr: /* 0xbf */
11469/* File: mips/alt_stub.S */
11470/*
11471 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11472 * any interesting requests and then jump to the real instruction
11473 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11474 */
11475 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011476 la ra, artMterpAsmInstructionStart + (191 * 128) # Addr of primary handler
11477 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11478 move a0, rSELF # arg0
11479 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011480 move a2, rPC
11481 la t9, MterpCheckBefore
11482 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011483
11484/* ------------------------------ */
11485 .balign 128
11486.L_ALT_op_and_long_2addr: /* 0xc0 */
11487/* File: mips/alt_stub.S */
11488/*
11489 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11490 * any interesting requests and then jump to the real instruction
11491 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11492 */
11493 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011494 la ra, artMterpAsmInstructionStart + (192 * 128) # Addr of primary handler
11495 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11496 move a0, rSELF # arg0
11497 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011498 move a2, rPC
11499 la t9, MterpCheckBefore
11500 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011501
11502/* ------------------------------ */
11503 .balign 128
11504.L_ALT_op_or_long_2addr: /* 0xc1 */
11505/* File: mips/alt_stub.S */
11506/*
11507 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11508 * any interesting requests and then jump to the real instruction
11509 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11510 */
11511 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011512 la ra, artMterpAsmInstructionStart + (193 * 128) # Addr of primary handler
11513 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11514 move a0, rSELF # arg0
11515 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011516 move a2, rPC
11517 la t9, MterpCheckBefore
11518 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011519
11520/* ------------------------------ */
11521 .balign 128
11522.L_ALT_op_xor_long_2addr: /* 0xc2 */
11523/* File: mips/alt_stub.S */
11524/*
11525 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11526 * any interesting requests and then jump to the real instruction
11527 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11528 */
11529 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011530 la ra, artMterpAsmInstructionStart + (194 * 128) # Addr of primary handler
11531 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11532 move a0, rSELF # arg0
11533 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011534 move a2, rPC
11535 la t9, MterpCheckBefore
11536 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011537
11538/* ------------------------------ */
11539 .balign 128
11540.L_ALT_op_shl_long_2addr: /* 0xc3 */
11541/* File: mips/alt_stub.S */
11542/*
11543 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11544 * any interesting requests and then jump to the real instruction
11545 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11546 */
11547 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011548 la ra, artMterpAsmInstructionStart + (195 * 128) # Addr of primary handler
11549 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11550 move a0, rSELF # arg0
11551 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011552 move a2, rPC
11553 la t9, MterpCheckBefore
11554 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011555
11556/* ------------------------------ */
11557 .balign 128
11558.L_ALT_op_shr_long_2addr: /* 0xc4 */
11559/* File: mips/alt_stub.S */
11560/*
11561 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11562 * any interesting requests and then jump to the real instruction
11563 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11564 */
11565 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011566 la ra, artMterpAsmInstructionStart + (196 * 128) # Addr of primary handler
11567 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11568 move a0, rSELF # arg0
11569 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011570 move a2, rPC
11571 la t9, MterpCheckBefore
11572 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011573
11574/* ------------------------------ */
11575 .balign 128
11576.L_ALT_op_ushr_long_2addr: /* 0xc5 */
11577/* File: mips/alt_stub.S */
11578/*
11579 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11580 * any interesting requests and then jump to the real instruction
11581 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11582 */
11583 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011584 la ra, artMterpAsmInstructionStart + (197 * 128) # Addr of primary handler
11585 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11586 move a0, rSELF # arg0
11587 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011588 move a2, rPC
11589 la t9, MterpCheckBefore
11590 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011591
11592/* ------------------------------ */
11593 .balign 128
11594.L_ALT_op_add_float_2addr: /* 0xc6 */
11595/* File: mips/alt_stub.S */
11596/*
11597 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11598 * any interesting requests and then jump to the real instruction
11599 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11600 */
11601 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011602 la ra, artMterpAsmInstructionStart + (198 * 128) # Addr of primary handler
11603 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11604 move a0, rSELF # arg0
11605 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011606 move a2, rPC
11607 la t9, MterpCheckBefore
11608 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011609
11610/* ------------------------------ */
11611 .balign 128
11612.L_ALT_op_sub_float_2addr: /* 0xc7 */
11613/* File: mips/alt_stub.S */
11614/*
11615 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11616 * any interesting requests and then jump to the real instruction
11617 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11618 */
11619 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011620 la ra, artMterpAsmInstructionStart + (199 * 128) # Addr of primary handler
11621 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11622 move a0, rSELF # arg0
11623 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011624 move a2, rPC
11625 la t9, MterpCheckBefore
11626 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011627
11628/* ------------------------------ */
11629 .balign 128
11630.L_ALT_op_mul_float_2addr: /* 0xc8 */
11631/* File: mips/alt_stub.S */
11632/*
11633 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11634 * any interesting requests and then jump to the real instruction
11635 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11636 */
11637 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011638 la ra, artMterpAsmInstructionStart + (200 * 128) # Addr of primary handler
11639 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11640 move a0, rSELF # arg0
11641 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011642 move a2, rPC
11643 la t9, MterpCheckBefore
11644 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011645
11646/* ------------------------------ */
11647 .balign 128
11648.L_ALT_op_div_float_2addr: /* 0xc9 */
11649/* File: mips/alt_stub.S */
11650/*
11651 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11652 * any interesting requests and then jump to the real instruction
11653 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11654 */
11655 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011656 la ra, artMterpAsmInstructionStart + (201 * 128) # Addr of primary handler
11657 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11658 move a0, rSELF # arg0
11659 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011660 move a2, rPC
11661 la t9, MterpCheckBefore
11662 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011663
11664/* ------------------------------ */
11665 .balign 128
11666.L_ALT_op_rem_float_2addr: /* 0xca */
11667/* File: mips/alt_stub.S */
11668/*
11669 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11670 * any interesting requests and then jump to the real instruction
11671 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11672 */
11673 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011674 la ra, artMterpAsmInstructionStart + (202 * 128) # Addr of primary handler
11675 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11676 move a0, rSELF # arg0
11677 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011678 move a2, rPC
11679 la t9, MterpCheckBefore
11680 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011681
11682/* ------------------------------ */
11683 .balign 128
11684.L_ALT_op_add_double_2addr: /* 0xcb */
11685/* File: mips/alt_stub.S */
11686/*
11687 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11688 * any interesting requests and then jump to the real instruction
11689 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11690 */
11691 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011692 la ra, artMterpAsmInstructionStart + (203 * 128) # Addr of primary handler
11693 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11694 move a0, rSELF # arg0
11695 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011696 move a2, rPC
11697 la t9, MterpCheckBefore
11698 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011699
11700/* ------------------------------ */
11701 .balign 128
11702.L_ALT_op_sub_double_2addr: /* 0xcc */
11703/* File: mips/alt_stub.S */
11704/*
11705 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11706 * any interesting requests and then jump to the real instruction
11707 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11708 */
11709 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011710 la ra, artMterpAsmInstructionStart + (204 * 128) # Addr of primary handler
11711 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11712 move a0, rSELF # arg0
11713 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011714 move a2, rPC
11715 la t9, MterpCheckBefore
11716 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011717
11718/* ------------------------------ */
11719 .balign 128
11720.L_ALT_op_mul_double_2addr: /* 0xcd */
11721/* File: mips/alt_stub.S */
11722/*
11723 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11724 * any interesting requests and then jump to the real instruction
11725 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11726 */
11727 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011728 la ra, artMterpAsmInstructionStart + (205 * 128) # Addr of primary handler
11729 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11730 move a0, rSELF # arg0
11731 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011732 move a2, rPC
11733 la t9, MterpCheckBefore
11734 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011735
11736/* ------------------------------ */
11737 .balign 128
11738.L_ALT_op_div_double_2addr: /* 0xce */
11739/* File: mips/alt_stub.S */
11740/*
11741 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11742 * any interesting requests and then jump to the real instruction
11743 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11744 */
11745 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011746 la ra, artMterpAsmInstructionStart + (206 * 128) # Addr of primary handler
11747 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11748 move a0, rSELF # arg0
11749 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011750 move a2, rPC
11751 la t9, MterpCheckBefore
11752 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011753
11754/* ------------------------------ */
11755 .balign 128
11756.L_ALT_op_rem_double_2addr: /* 0xcf */
11757/* File: mips/alt_stub.S */
11758/*
11759 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11760 * any interesting requests and then jump to the real instruction
11761 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11762 */
11763 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011764 la ra, artMterpAsmInstructionStart + (207 * 128) # Addr of primary handler
11765 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11766 move a0, rSELF # arg0
11767 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011768 move a2, rPC
11769 la t9, MterpCheckBefore
11770 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011771
11772/* ------------------------------ */
11773 .balign 128
11774.L_ALT_op_add_int_lit16: /* 0xd0 */
11775/* File: mips/alt_stub.S */
11776/*
11777 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11778 * any interesting requests and then jump to the real instruction
11779 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11780 */
11781 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011782 la ra, artMterpAsmInstructionStart + (208 * 128) # Addr of primary handler
11783 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11784 move a0, rSELF # arg0
11785 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011786 move a2, rPC
11787 la t9, MterpCheckBefore
11788 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011789
11790/* ------------------------------ */
11791 .balign 128
11792.L_ALT_op_rsub_int: /* 0xd1 */
11793/* File: mips/alt_stub.S */
11794/*
11795 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11796 * any interesting requests and then jump to the real instruction
11797 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11798 */
11799 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011800 la ra, artMterpAsmInstructionStart + (209 * 128) # Addr of primary handler
11801 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11802 move a0, rSELF # arg0
11803 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011804 move a2, rPC
11805 la t9, MterpCheckBefore
11806 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011807
11808/* ------------------------------ */
11809 .balign 128
11810.L_ALT_op_mul_int_lit16: /* 0xd2 */
11811/* File: mips/alt_stub.S */
11812/*
11813 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11814 * any interesting requests and then jump to the real instruction
11815 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11816 */
11817 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011818 la ra, artMterpAsmInstructionStart + (210 * 128) # Addr of primary handler
11819 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11820 move a0, rSELF # arg0
11821 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011822 move a2, rPC
11823 la t9, MterpCheckBefore
11824 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011825
11826/* ------------------------------ */
11827 .balign 128
11828.L_ALT_op_div_int_lit16: /* 0xd3 */
11829/* File: mips/alt_stub.S */
11830/*
11831 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11832 * any interesting requests and then jump to the real instruction
11833 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11834 */
11835 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011836 la ra, artMterpAsmInstructionStart + (211 * 128) # Addr of primary handler
11837 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11838 move a0, rSELF # arg0
11839 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011840 move a2, rPC
11841 la t9, MterpCheckBefore
11842 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011843
11844/* ------------------------------ */
11845 .balign 128
11846.L_ALT_op_rem_int_lit16: /* 0xd4 */
11847/* File: mips/alt_stub.S */
11848/*
11849 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11850 * any interesting requests and then jump to the real instruction
11851 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11852 */
11853 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011854 la ra, artMterpAsmInstructionStart + (212 * 128) # Addr of primary handler
11855 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11856 move a0, rSELF # arg0
11857 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011858 move a2, rPC
11859 la t9, MterpCheckBefore
11860 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011861
11862/* ------------------------------ */
11863 .balign 128
11864.L_ALT_op_and_int_lit16: /* 0xd5 */
11865/* File: mips/alt_stub.S */
11866/*
11867 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11868 * any interesting requests and then jump to the real instruction
11869 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11870 */
11871 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011872 la ra, artMterpAsmInstructionStart + (213 * 128) # Addr of primary handler
11873 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11874 move a0, rSELF # arg0
11875 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011876 move a2, rPC
11877 la t9, MterpCheckBefore
11878 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011879
11880/* ------------------------------ */
11881 .balign 128
11882.L_ALT_op_or_int_lit16: /* 0xd6 */
11883/* File: mips/alt_stub.S */
11884/*
11885 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11886 * any interesting requests and then jump to the real instruction
11887 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11888 */
11889 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011890 la ra, artMterpAsmInstructionStart + (214 * 128) # Addr of primary handler
11891 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11892 move a0, rSELF # arg0
11893 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011894 move a2, rPC
11895 la t9, MterpCheckBefore
11896 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011897
11898/* ------------------------------ */
11899 .balign 128
11900.L_ALT_op_xor_int_lit16: /* 0xd7 */
11901/* File: mips/alt_stub.S */
11902/*
11903 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11904 * any interesting requests and then jump to the real instruction
11905 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11906 */
11907 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011908 la ra, artMterpAsmInstructionStart + (215 * 128) # Addr of primary handler
11909 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11910 move a0, rSELF # arg0
11911 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011912 move a2, rPC
11913 la t9, MterpCheckBefore
11914 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011915
11916/* ------------------------------ */
11917 .balign 128
11918.L_ALT_op_add_int_lit8: /* 0xd8 */
11919/* File: mips/alt_stub.S */
11920/*
11921 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11922 * any interesting requests and then jump to the real instruction
11923 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11924 */
11925 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011926 la ra, artMterpAsmInstructionStart + (216 * 128) # Addr of primary handler
11927 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11928 move a0, rSELF # arg0
11929 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011930 move a2, rPC
11931 la t9, MterpCheckBefore
11932 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011933
11934/* ------------------------------ */
11935 .balign 128
11936.L_ALT_op_rsub_int_lit8: /* 0xd9 */
11937/* File: mips/alt_stub.S */
11938/*
11939 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11940 * any interesting requests and then jump to the real instruction
11941 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11942 */
11943 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011944 la ra, artMterpAsmInstructionStart + (217 * 128) # Addr of primary handler
11945 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11946 move a0, rSELF # arg0
11947 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011948 move a2, rPC
11949 la t9, MterpCheckBefore
11950 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011951
11952/* ------------------------------ */
11953 .balign 128
11954.L_ALT_op_mul_int_lit8: /* 0xda */
11955/* File: mips/alt_stub.S */
11956/*
11957 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11958 * any interesting requests and then jump to the real instruction
11959 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11960 */
11961 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011962 la ra, artMterpAsmInstructionStart + (218 * 128) # Addr of primary handler
11963 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11964 move a0, rSELF # arg0
11965 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011966 move a2, rPC
11967 la t9, MterpCheckBefore
11968 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011969
11970/* ------------------------------ */
11971 .balign 128
11972.L_ALT_op_div_int_lit8: /* 0xdb */
11973/* File: mips/alt_stub.S */
11974/*
11975 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11976 * any interesting requests and then jump to the real instruction
11977 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11978 */
11979 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011980 la ra, artMterpAsmInstructionStart + (219 * 128) # Addr of primary handler
11981 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11982 move a0, rSELF # arg0
11983 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011984 move a2, rPC
11985 la t9, MterpCheckBefore
11986 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011987
11988/* ------------------------------ */
11989 .balign 128
11990.L_ALT_op_rem_int_lit8: /* 0xdc */
11991/* File: mips/alt_stub.S */
11992/*
11993 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11994 * any interesting requests and then jump to the real instruction
11995 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11996 */
11997 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011998 la ra, artMterpAsmInstructionStart + (220 * 128) # Addr of primary handler
11999 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12000 move a0, rSELF # arg0
12001 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012002 move a2, rPC
12003 la t9, MterpCheckBefore
12004 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012005
12006/* ------------------------------ */
12007 .balign 128
12008.L_ALT_op_and_int_lit8: /* 0xdd */
12009/* File: mips/alt_stub.S */
12010/*
12011 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12012 * any interesting requests and then jump to the real instruction
12013 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12014 */
12015 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012016 la ra, artMterpAsmInstructionStart + (221 * 128) # Addr of primary handler
12017 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12018 move a0, rSELF # arg0
12019 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012020 move a2, rPC
12021 la t9, MterpCheckBefore
12022 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012023
12024/* ------------------------------ */
12025 .balign 128
12026.L_ALT_op_or_int_lit8: /* 0xde */
12027/* File: mips/alt_stub.S */
12028/*
12029 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12030 * any interesting requests and then jump to the real instruction
12031 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12032 */
12033 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012034 la ra, artMterpAsmInstructionStart + (222 * 128) # Addr of primary handler
12035 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12036 move a0, rSELF # arg0
12037 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012038 move a2, rPC
12039 la t9, MterpCheckBefore
12040 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012041
12042/* ------------------------------ */
12043 .balign 128
12044.L_ALT_op_xor_int_lit8: /* 0xdf */
12045/* File: mips/alt_stub.S */
12046/*
12047 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12048 * any interesting requests and then jump to the real instruction
12049 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12050 */
12051 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012052 la ra, artMterpAsmInstructionStart + (223 * 128) # Addr of primary handler
12053 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12054 move a0, rSELF # arg0
12055 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012056 move a2, rPC
12057 la t9, MterpCheckBefore
12058 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012059
12060/* ------------------------------ */
12061 .balign 128
12062.L_ALT_op_shl_int_lit8: /* 0xe0 */
12063/* File: mips/alt_stub.S */
12064/*
12065 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12066 * any interesting requests and then jump to the real instruction
12067 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12068 */
12069 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012070 la ra, artMterpAsmInstructionStart + (224 * 128) # Addr of primary handler
12071 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12072 move a0, rSELF # arg0
12073 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012074 move a2, rPC
12075 la t9, MterpCheckBefore
12076 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012077
12078/* ------------------------------ */
12079 .balign 128
12080.L_ALT_op_shr_int_lit8: /* 0xe1 */
12081/* File: mips/alt_stub.S */
12082/*
12083 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12084 * any interesting requests and then jump to the real instruction
12085 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12086 */
12087 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012088 la ra, artMterpAsmInstructionStart + (225 * 128) # Addr of primary handler
12089 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12090 move a0, rSELF # arg0
12091 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012092 move a2, rPC
12093 la t9, MterpCheckBefore
12094 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012095
12096/* ------------------------------ */
12097 .balign 128
12098.L_ALT_op_ushr_int_lit8: /* 0xe2 */
12099/* File: mips/alt_stub.S */
12100/*
12101 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12102 * any interesting requests and then jump to the real instruction
12103 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12104 */
12105 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012106 la ra, artMterpAsmInstructionStart + (226 * 128) # Addr of primary handler
12107 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12108 move a0, rSELF # arg0
12109 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012110 move a2, rPC
12111 la t9, MterpCheckBefore
12112 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012113
12114/* ------------------------------ */
12115 .balign 128
12116.L_ALT_op_iget_quick: /* 0xe3 */
12117/* File: mips/alt_stub.S */
12118/*
12119 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12120 * any interesting requests and then jump to the real instruction
12121 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12122 */
12123 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012124 la ra, artMterpAsmInstructionStart + (227 * 128) # Addr of primary handler
12125 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12126 move a0, rSELF # arg0
12127 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012128 move a2, rPC
12129 la t9, MterpCheckBefore
12130 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012131
12132/* ------------------------------ */
12133 .balign 128
12134.L_ALT_op_iget_wide_quick: /* 0xe4 */
12135/* File: mips/alt_stub.S */
12136/*
12137 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12138 * any interesting requests and then jump to the real instruction
12139 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12140 */
12141 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012142 la ra, artMterpAsmInstructionStart + (228 * 128) # Addr of primary handler
12143 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12144 move a0, rSELF # arg0
12145 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012146 move a2, rPC
12147 la t9, MterpCheckBefore
12148 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012149
12150/* ------------------------------ */
12151 .balign 128
12152.L_ALT_op_iget_object_quick: /* 0xe5 */
12153/* File: mips/alt_stub.S */
12154/*
12155 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12156 * any interesting requests and then jump to the real instruction
12157 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12158 */
12159 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012160 la ra, artMterpAsmInstructionStart + (229 * 128) # Addr of primary handler
12161 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12162 move a0, rSELF # arg0
12163 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012164 move a2, rPC
12165 la t9, MterpCheckBefore
12166 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012167
12168/* ------------------------------ */
12169 .balign 128
12170.L_ALT_op_iput_quick: /* 0xe6 */
12171/* File: mips/alt_stub.S */
12172/*
12173 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12174 * any interesting requests and then jump to the real instruction
12175 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12176 */
12177 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012178 la ra, artMterpAsmInstructionStart + (230 * 128) # Addr of primary handler
12179 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12180 move a0, rSELF # arg0
12181 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012182 move a2, rPC
12183 la t9, MterpCheckBefore
12184 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012185
12186/* ------------------------------ */
12187 .balign 128
12188.L_ALT_op_iput_wide_quick: /* 0xe7 */
12189/* File: mips/alt_stub.S */
12190/*
12191 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12192 * any interesting requests and then jump to the real instruction
12193 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12194 */
12195 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012196 la ra, artMterpAsmInstructionStart + (231 * 128) # Addr of primary handler
12197 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12198 move a0, rSELF # arg0
12199 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012200 move a2, rPC
12201 la t9, MterpCheckBefore
12202 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012203
12204/* ------------------------------ */
12205 .balign 128
12206.L_ALT_op_iput_object_quick: /* 0xe8 */
12207/* File: mips/alt_stub.S */
12208/*
12209 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12210 * any interesting requests and then jump to the real instruction
12211 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12212 */
12213 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012214 la ra, artMterpAsmInstructionStart + (232 * 128) # Addr of primary handler
12215 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12216 move a0, rSELF # arg0
12217 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012218 move a2, rPC
12219 la t9, MterpCheckBefore
12220 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012221
12222/* ------------------------------ */
12223 .balign 128
12224.L_ALT_op_invoke_virtual_quick: /* 0xe9 */
12225/* File: mips/alt_stub.S */
12226/*
12227 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12228 * any interesting requests and then jump to the real instruction
12229 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12230 */
12231 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012232 la ra, artMterpAsmInstructionStart + (233 * 128) # Addr of primary handler
12233 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12234 move a0, rSELF # arg0
12235 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012236 move a2, rPC
12237 la t9, MterpCheckBefore
12238 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012239
12240/* ------------------------------ */
12241 .balign 128
12242.L_ALT_op_invoke_virtual_range_quick: /* 0xea */
12243/* File: mips/alt_stub.S */
12244/*
12245 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12246 * any interesting requests and then jump to the real instruction
12247 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12248 */
12249 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012250 la ra, artMterpAsmInstructionStart + (234 * 128) # Addr of primary handler
12251 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12252 move a0, rSELF # arg0
12253 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012254 move a2, rPC
12255 la t9, MterpCheckBefore
12256 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012257
12258/* ------------------------------ */
12259 .balign 128
12260.L_ALT_op_iput_boolean_quick: /* 0xeb */
12261/* File: mips/alt_stub.S */
12262/*
12263 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12264 * any interesting requests and then jump to the real instruction
12265 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12266 */
12267 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012268 la ra, artMterpAsmInstructionStart + (235 * 128) # Addr of primary handler
12269 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12270 move a0, rSELF # arg0
12271 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012272 move a2, rPC
12273 la t9, MterpCheckBefore
12274 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012275
12276/* ------------------------------ */
12277 .balign 128
12278.L_ALT_op_iput_byte_quick: /* 0xec */
12279/* File: mips/alt_stub.S */
12280/*
12281 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12282 * any interesting requests and then jump to the real instruction
12283 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12284 */
12285 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012286 la ra, artMterpAsmInstructionStart + (236 * 128) # Addr of primary handler
12287 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12288 move a0, rSELF # arg0
12289 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012290 move a2, rPC
12291 la t9, MterpCheckBefore
12292 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012293
12294/* ------------------------------ */
12295 .balign 128
12296.L_ALT_op_iput_char_quick: /* 0xed */
12297/* File: mips/alt_stub.S */
12298/*
12299 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12300 * any interesting requests and then jump to the real instruction
12301 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12302 */
12303 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012304 la ra, artMterpAsmInstructionStart + (237 * 128) # Addr of primary handler
12305 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12306 move a0, rSELF # arg0
12307 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012308 move a2, rPC
12309 la t9, MterpCheckBefore
12310 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012311
12312/* ------------------------------ */
12313 .balign 128
12314.L_ALT_op_iput_short_quick: /* 0xee */
12315/* File: mips/alt_stub.S */
12316/*
12317 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12318 * any interesting requests and then jump to the real instruction
12319 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12320 */
12321 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012322 la ra, artMterpAsmInstructionStart + (238 * 128) # Addr of primary handler
12323 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12324 move a0, rSELF # arg0
12325 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012326 move a2, rPC
12327 la t9, MterpCheckBefore
12328 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012329
12330/* ------------------------------ */
12331 .balign 128
12332.L_ALT_op_iget_boolean_quick: /* 0xef */
12333/* File: mips/alt_stub.S */
12334/*
12335 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12336 * any interesting requests and then jump to the real instruction
12337 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12338 */
12339 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012340 la ra, artMterpAsmInstructionStart + (239 * 128) # Addr of primary handler
12341 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12342 move a0, rSELF # arg0
12343 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012344 move a2, rPC
12345 la t9, MterpCheckBefore
12346 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012347
12348/* ------------------------------ */
12349 .balign 128
12350.L_ALT_op_iget_byte_quick: /* 0xf0 */
12351/* File: mips/alt_stub.S */
12352/*
12353 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12354 * any interesting requests and then jump to the real instruction
12355 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12356 */
12357 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012358 la ra, artMterpAsmInstructionStart + (240 * 128) # Addr of primary handler
12359 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12360 move a0, rSELF # arg0
12361 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012362 move a2, rPC
12363 la t9, MterpCheckBefore
12364 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012365
12366/* ------------------------------ */
12367 .balign 128
12368.L_ALT_op_iget_char_quick: /* 0xf1 */
12369/* File: mips/alt_stub.S */
12370/*
12371 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12372 * any interesting requests and then jump to the real instruction
12373 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12374 */
12375 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012376 la ra, artMterpAsmInstructionStart + (241 * 128) # Addr of primary handler
12377 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12378 move a0, rSELF # arg0
12379 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012380 move a2, rPC
12381 la t9, MterpCheckBefore
12382 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012383
12384/* ------------------------------ */
12385 .balign 128
12386.L_ALT_op_iget_short_quick: /* 0xf2 */
12387/* File: mips/alt_stub.S */
12388/*
12389 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12390 * any interesting requests and then jump to the real instruction
12391 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12392 */
12393 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012394 la ra, artMterpAsmInstructionStart + (242 * 128) # Addr of primary handler
12395 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12396 move a0, rSELF # arg0
12397 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012398 move a2, rPC
12399 la t9, MterpCheckBefore
12400 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012401
12402/* ------------------------------ */
12403 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012404.L_ALT_op_unused_f3: /* 0xf3 */
Douglas Leung200f0402016-02-25 20:05:47 -080012405/* File: mips/alt_stub.S */
12406/*
12407 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12408 * any interesting requests and then jump to the real instruction
12409 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12410 */
12411 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012412 la ra, artMterpAsmInstructionStart + (243 * 128) # Addr of primary handler
12413 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12414 move a0, rSELF # arg0
12415 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012416 move a2, rPC
12417 la t9, MterpCheckBefore
12418 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012419
12420/* ------------------------------ */
12421 .balign 128
12422.L_ALT_op_unused_f4: /* 0xf4 */
12423/* File: mips/alt_stub.S */
12424/*
12425 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12426 * any interesting requests and then jump to the real instruction
12427 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12428 */
12429 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012430 la ra, artMterpAsmInstructionStart + (244 * 128) # Addr of primary handler
12431 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12432 move a0, rSELF # arg0
12433 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012434 move a2, rPC
12435 la t9, MterpCheckBefore
12436 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012437
12438/* ------------------------------ */
12439 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012440.L_ALT_op_unused_f5: /* 0xf5 */
Douglas Leung200f0402016-02-25 20:05:47 -080012441/* File: mips/alt_stub.S */
12442/*
12443 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12444 * any interesting requests and then jump to the real instruction
12445 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12446 */
12447 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012448 la ra, artMterpAsmInstructionStart + (245 * 128) # Addr of primary handler
12449 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12450 move a0, rSELF # arg0
12451 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012452 move a2, rPC
12453 la t9, MterpCheckBefore
12454 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012455
12456/* ------------------------------ */
12457 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012458.L_ALT_op_unused_f6: /* 0xf6 */
Douglas Leung200f0402016-02-25 20:05:47 -080012459/* File: mips/alt_stub.S */
12460/*
12461 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12462 * any interesting requests and then jump to the real instruction
12463 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12464 */
12465 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012466 la ra, artMterpAsmInstructionStart + (246 * 128) # Addr of primary handler
12467 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12468 move a0, rSELF # arg0
12469 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012470 move a2, rPC
12471 la t9, MterpCheckBefore
12472 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012473
12474/* ------------------------------ */
12475 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012476.L_ALT_op_unused_f7: /* 0xf7 */
Douglas Leung200f0402016-02-25 20:05:47 -080012477/* File: mips/alt_stub.S */
12478/*
12479 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12480 * any interesting requests and then jump to the real instruction
12481 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12482 */
12483 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012484 la ra, artMterpAsmInstructionStart + (247 * 128) # Addr of primary handler
12485 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12486 move a0, rSELF # arg0
12487 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012488 move a2, rPC
12489 la t9, MterpCheckBefore
12490 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012491
12492/* ------------------------------ */
12493 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012494.L_ALT_op_unused_f8: /* 0xf8 */
Douglas Leung200f0402016-02-25 20:05:47 -080012495/* File: mips/alt_stub.S */
12496/*
12497 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12498 * any interesting requests and then jump to the real instruction
12499 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12500 */
12501 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012502 la ra, artMterpAsmInstructionStart + (248 * 128) # Addr of primary handler
12503 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12504 move a0, rSELF # arg0
12505 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012506 move a2, rPC
12507 la t9, MterpCheckBefore
12508 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012509
12510/* ------------------------------ */
12511 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012512.L_ALT_op_unused_f9: /* 0xf9 */
Douglas Leung200f0402016-02-25 20:05:47 -080012513/* File: mips/alt_stub.S */
12514/*
12515 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12516 * any interesting requests and then jump to the real instruction
12517 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12518 */
12519 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012520 la ra, artMterpAsmInstructionStart + (249 * 128) # Addr of primary handler
12521 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12522 move a0, rSELF # arg0
12523 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012524 move a2, rPC
12525 la t9, MterpCheckBefore
12526 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012527
12528/* ------------------------------ */
12529 .balign 128
buzbee8a287142016-10-07 12:56:32 -070012530.L_ALT_op_invoke_polymorphic: /* 0xfa */
Douglas Leung200f0402016-02-25 20:05:47 -080012531/* File: mips/alt_stub.S */
12532/*
12533 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12534 * any interesting requests and then jump to the real instruction
12535 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12536 */
12537 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012538 la ra, artMterpAsmInstructionStart + (250 * 128) # Addr of primary handler
12539 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12540 move a0, rSELF # arg0
12541 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012542 move a2, rPC
12543 la t9, MterpCheckBefore
12544 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012545
12546/* ------------------------------ */
12547 .balign 128
buzbee8a287142016-10-07 12:56:32 -070012548.L_ALT_op_invoke_polymorphic_range: /* 0xfb */
Douglas Leung200f0402016-02-25 20:05:47 -080012549/* File: mips/alt_stub.S */
12550/*
12551 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12552 * any interesting requests and then jump to the real instruction
12553 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12554 */
12555 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012556 la ra, artMterpAsmInstructionStart + (251 * 128) # Addr of primary handler
12557 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12558 move a0, rSELF # arg0
12559 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012560 move a2, rPC
12561 la t9, MterpCheckBefore
12562 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012563
12564/* ------------------------------ */
12565 .balign 128
12566.L_ALT_op_unused_fc: /* 0xfc */
12567/* File: mips/alt_stub.S */
12568/*
12569 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12570 * any interesting requests and then jump to the real instruction
12571 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12572 */
12573 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012574 la ra, artMterpAsmInstructionStart + (252 * 128) # Addr of primary handler
12575 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12576 move a0, rSELF # arg0
12577 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012578 move a2, rPC
12579 la t9, MterpCheckBefore
12580 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012581
12582/* ------------------------------ */
12583 .balign 128
12584.L_ALT_op_unused_fd: /* 0xfd */
12585/* File: mips/alt_stub.S */
12586/*
12587 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12588 * any interesting requests and then jump to the real instruction
12589 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12590 */
12591 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012592 la ra, artMterpAsmInstructionStart + (253 * 128) # Addr of primary handler
12593 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12594 move a0, rSELF # arg0
12595 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012596 move a2, rPC
12597 la t9, MterpCheckBefore
12598 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012599
12600/* ------------------------------ */
12601 .balign 128
12602.L_ALT_op_unused_fe: /* 0xfe */
12603/* File: mips/alt_stub.S */
12604/*
12605 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12606 * any interesting requests and then jump to the real instruction
12607 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12608 */
12609 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012610 la ra, artMterpAsmInstructionStart + (254 * 128) # Addr of primary handler
12611 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12612 move a0, rSELF # arg0
12613 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012614 move a2, rPC
12615 la t9, MterpCheckBefore
12616 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012617
12618/* ------------------------------ */
12619 .balign 128
12620.L_ALT_op_unused_ff: /* 0xff */
12621/* File: mips/alt_stub.S */
12622/*
12623 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12624 * any interesting requests and then jump to the real instruction
12625 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12626 */
12627 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012628 la ra, artMterpAsmInstructionStart + (255 * 128) # Addr of primary handler
12629 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12630 move a0, rSELF # arg0
12631 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012632 move a2, rPC
12633 la t9, MterpCheckBefore
12634 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012635
12636 .balign 128
12637 .size artMterpAsmAltInstructionStart, .-artMterpAsmAltInstructionStart
12638 .global artMterpAsmAltInstructionEnd
12639artMterpAsmAltInstructionEnd:
12640/* File: mips/footer.S */
12641/*
12642 * ===========================================================================
12643 * Common subroutines and data
12644 * ===========================================================================
12645 */
12646
12647 .text
12648 .align 2
12649
12650/*
12651 * We've detected a condition that will result in an exception, but the exception
12652 * has not yet been thrown. Just bail out to the reference interpreter to deal with it.
12653 * TUNING: for consistency, we may want to just go ahead and handle these here.
12654 */
12655common_errDivideByZero:
12656 EXPORT_PC()
12657#if MTERP_LOGGING
12658 move a0, rSELF
12659 addu a1, rFP, OFF_FP_SHADOWFRAME
12660 JAL(MterpLogDivideByZeroException)
12661#endif
12662 b MterpCommonFallback
12663
12664common_errArrayIndex:
12665 EXPORT_PC()
12666#if MTERP_LOGGING
12667 move a0, rSELF
12668 addu a1, rFP, OFF_FP_SHADOWFRAME
12669 JAL(MterpLogArrayIndexException)
12670#endif
12671 b MterpCommonFallback
12672
12673common_errNegativeArraySize:
12674 EXPORT_PC()
12675#if MTERP_LOGGING
12676 move a0, rSELF
12677 addu a1, rFP, OFF_FP_SHADOWFRAME
12678 JAL(MterpLogNegativeArraySizeException)
12679#endif
12680 b MterpCommonFallback
12681
12682common_errNoSuchMethod:
12683 EXPORT_PC()
12684#if MTERP_LOGGING
12685 move a0, rSELF
12686 addu a1, rFP, OFF_FP_SHADOWFRAME
12687 JAL(MterpLogNoSuchMethodException)
12688#endif
12689 b MterpCommonFallback
12690
12691common_errNullObject:
12692 EXPORT_PC()
12693#if MTERP_LOGGING
12694 move a0, rSELF
12695 addu a1, rFP, OFF_FP_SHADOWFRAME
12696 JAL(MterpLogNullObjectException)
12697#endif
12698 b MterpCommonFallback
12699
12700common_exceptionThrown:
12701 EXPORT_PC()
12702#if MTERP_LOGGING
12703 move a0, rSELF
12704 addu a1, rFP, OFF_FP_SHADOWFRAME
12705 JAL(MterpLogExceptionThrownException)
12706#endif
12707 b MterpCommonFallback
12708
12709MterpSuspendFallback:
12710 EXPORT_PC()
12711#if MTERP_LOGGING
12712 move a0, rSELF
12713 addu a1, rFP, OFF_FP_SHADOWFRAME
12714 lw a2, THREAD_FLAGS_OFFSET(rSELF)
12715 JAL(MterpLogSuspendFallback)
12716#endif
12717 b MterpCommonFallback
12718
12719/*
12720 * If we're here, something is out of the ordinary. If there is a pending
12721 * exception, handle it. Otherwise, roll back and retry with the reference
12722 * interpreter.
12723 */
12724MterpPossibleException:
12725 lw a0, THREAD_EXCEPTION_OFFSET(rSELF)
12726 beqz a0, MterpFallback # If exception, fall back to reference interpreter.
12727 /* intentional fallthrough - handle pending exception. */
12728/*
12729 * On return from a runtime helper routine, we've found a pending exception.
12730 * Can we handle it here - or need to bail out to caller?
12731 *
12732 */
12733MterpException:
12734 move a0, rSELF
12735 addu a1, rFP, OFF_FP_SHADOWFRAME
12736 JAL(MterpHandleException) # (self, shadow_frame)
12737 beqz v0, MterpExceptionReturn # no local catch, back to caller.
12738 lw a0, OFF_FP_CODE_ITEM(rFP)
12739 lw a1, OFF_FP_DEX_PC(rFP)
12740 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF)
12741 addu rPC, a0, CODEITEM_INSNS_OFFSET
12742 sll a1, a1, 1
12743 addu rPC, rPC, a1 # generate new dex_pc_ptr
12744 /* Do we need to switch interpreters? */
12745 JAL(MterpShouldSwitchInterpreters)
12746 bnez v0, MterpFallback
12747 /* resume execution at catch block */
12748 EXPORT_PC()
12749 FETCH_INST()
12750 GET_INST_OPCODE(t0)
12751 GOTO_OPCODE(t0)
12752 /* NOTE: no fallthrough */
12753
12754/*
Douglas Leung020b18a2016-06-03 18:05:35 -070012755 * Common handling for branches with support for Jit profiling.
12756 * On entry:
12757 * rINST <= signed offset
12758 * rPROFILE <= signed hotness countdown (expanded to 32 bits)
12759 *
12760 * We have quite a few different cases for branch profiling, OSR detection and
12761 * suspend check support here.
12762 *
12763 * Taken backward branches:
12764 * If profiling active, do hotness countdown and report if we hit zero.
12765 * If in osr check mode, see if our target is a compiled loop header entry and do OSR if so.
12766 * Is there a pending suspend request? If so, suspend.
12767 *
12768 * Taken forward branches and not-taken backward branches:
12769 * If in osr check mode, see if our target is a compiled loop header entry and do OSR if so.
12770 *
12771 * Our most common case is expected to be a taken backward branch with active jit profiling,
12772 * but no full OSR check and no pending suspend request.
12773 * Next most common case is not-taken branch with no full OSR check.
Douglas Leung200f0402016-02-25 20:05:47 -080012774 */
Douglas Leung020b18a2016-06-03 18:05:35 -070012775MterpCommonTakenBranchNoFlags:
12776 bgtz rINST, .L_forward_branch # don't add forward branches to hotness
12777/*
12778 * We need to subtract 1 from positive values and we should not see 0 here,
12779 * so we may use the result of the comparison with -1.
12780 */
12781#if JIT_CHECK_OSR != -1
12782# error "JIT_CHECK_OSR must be -1."
12783#endif
12784 li t0, JIT_CHECK_OSR
12785 beq rPROFILE, t0, .L_osr_check
12786 blt rPROFILE, t0, .L_resume_backward_branch
12787 subu rPROFILE, 1
12788 beqz rPROFILE, .L_add_batch # counted down to zero - report
12789.L_resume_backward_branch:
12790 lw ra, THREAD_FLAGS_OFFSET(rSELF)
12791 REFRESH_IBASE()
12792 addu a2, rINST, rINST # a2<- byte offset
12793 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -080012794 and ra, (THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST)
Douglas Leung020b18a2016-06-03 18:05:35 -070012795 bnez ra, .L_suspend_request_pending
Douglas Leung200f0402016-02-25 20:05:47 -080012796 GET_INST_OPCODE(t0) # extract opcode from rINST
12797 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung020b18a2016-06-03 18:05:35 -070012798
12799.L_suspend_request_pending:
Douglas Leung200f0402016-02-25 20:05:47 -080012800 EXPORT_PC()
12801 move a0, rSELF
12802 JAL(MterpSuspendCheck) # (self)
12803 bnez v0, MterpFallback
Douglas Leung020b18a2016-06-03 18:05:35 -070012804 REFRESH_IBASE() # might have changed during suspend
12805 GET_INST_OPCODE(t0) # extract opcode from rINST
12806 GOTO_OPCODE(t0) # jump to next instruction
12807
12808.L_no_count_backwards:
12809 li t0, JIT_CHECK_OSR # check for possible OSR re-entry
12810 bne rPROFILE, t0, .L_resume_backward_branch
12811.L_osr_check:
12812 move a0, rSELF
12813 addu a1, rFP, OFF_FP_SHADOWFRAME
12814 move a2, rINST
12815 EXPORT_PC()
12816 JAL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12817 bnez v0, MterpOnStackReplacement
12818 b .L_resume_backward_branch
12819
12820.L_forward_branch:
12821 li t0, JIT_CHECK_OSR # check for possible OSR re-entry
12822 beq rPROFILE, t0, .L_check_osr_forward
12823.L_resume_forward_branch:
12824 add a2, rINST, rINST # a2<- byte offset
12825 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST
12826 GET_INST_OPCODE(t0) # extract opcode from rINST
12827 GOTO_OPCODE(t0) # jump to next instruction
12828
12829.L_check_osr_forward:
12830 move a0, rSELF
12831 addu a1, rFP, OFF_FP_SHADOWFRAME
12832 move a2, rINST
12833 EXPORT_PC()
12834 JAL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12835 bnez v0, MterpOnStackReplacement
12836 b .L_resume_forward_branch
12837
12838.L_add_batch:
12839 addu a1, rFP, OFF_FP_SHADOWFRAME
12840 sh rPROFILE, SHADOWFRAME_HOTNESS_COUNTDOWN_OFFSET(a1)
12841 lw a0, OFF_FP_METHOD(rFP)
12842 move a2, rSELF
12843 JAL(MterpAddHotnessBatch) # (method, shadow_frame, self)
12844 move rPROFILE, v0 # restore new hotness countdown to rPROFILE
12845 b .L_no_count_backwards
12846
12847/*
12848 * Entered from the conditional branch handlers when OSR check request active on
12849 * not-taken path. All Dalvik not-taken conditional branch offsets are 2.
12850 */
12851.L_check_not_taken_osr:
12852 move a0, rSELF
12853 addu a1, rFP, OFF_FP_SHADOWFRAME
12854 li a2, 2
12855 EXPORT_PC()
12856 JAL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12857 bnez v0, MterpOnStackReplacement
12858 FETCH_ADVANCE_INST(2)
Douglas Leung200f0402016-02-25 20:05:47 -080012859 GET_INST_OPCODE(t0) # extract opcode from rINST
12860 GOTO_OPCODE(t0) # jump to next instruction
12861
12862/*
12863 * On-stack replacement has happened, and now we've returned from the compiled method.
12864 */
12865MterpOnStackReplacement:
12866#if MTERP_LOGGING
12867 move a0, rSELF
12868 addu a1, rFP, OFF_FP_SHADOWFRAME
12869 move a2, rINST
12870 JAL(MterpLogOSR)
12871#endif
12872 li v0, 1 # Signal normal return
12873 b MterpDone
12874
12875/*
12876 * Bail out to reference interpreter.
12877 */
12878MterpFallback:
12879 EXPORT_PC()
12880#if MTERP_LOGGING
12881 move a0, rSELF
12882 addu a1, rFP, OFF_FP_SHADOWFRAME
12883 JAL(MterpLogFallback)
12884#endif
12885MterpCommonFallback:
12886 move v0, zero # signal retry with reference interpreter.
12887 b MterpDone
12888/*
12889 * We pushed some registers on the stack in ExecuteMterpImpl, then saved
12890 * SP and LR. Here we restore SP, restore the registers, and then restore
12891 * LR to PC.
12892 *
12893 * On entry:
12894 * uint32_t* rFP (should still be live, pointer to base of vregs)
12895 */
12896MterpExceptionReturn:
12897 li v0, 1 # signal return to caller.
12898 b MterpDone
12899MterpReturn:
12900 lw a2, OFF_FP_RESULT_REGISTER(rFP)
12901 sw v0, 0(a2)
12902 sw v1, 4(a2)
12903 li v0, 1 # signal return to caller.
12904MterpDone:
Douglas Leung020b18a2016-06-03 18:05:35 -070012905/*
12906 * At this point, we expect rPROFILE to be non-zero. If negative, hotness is disabled or we're
12907 * checking for OSR. If greater than zero, we might have unreported hotness to register
12908 * (the difference between the ending rPROFILE and the cached hotness counter). rPROFILE
12909 * should only reach zero immediately after a hotness decrement, and is then reset to either
12910 * a negative special state or the new non-zero countdown value.
12911 */
12912 blez rPROFILE, .L_pop_and_return # if > 0, we may have some counts to report.
12913
12914MterpProfileActive:
12915 move rINST, v0 # stash return value
12916 /* Report cached hotness counts */
12917 lw a0, OFF_FP_METHOD(rFP)
12918 addu a1, rFP, OFF_FP_SHADOWFRAME
12919 move a2, rSELF
12920 sh rPROFILE, SHADOWFRAME_HOTNESS_COUNTDOWN_OFFSET(a1)
12921 JAL(MterpAddHotnessBatch) # (method, shadow_frame, self)
12922 move v0, rINST # restore return value
12923
12924.L_pop_and_return:
Douglas Leung200f0402016-02-25 20:05:47 -080012925/* Restore from the stack and return. Frame size = STACK_SIZE */
12926 STACK_LOAD_FULL()
12927 jalr zero, ra
12928
12929 .end ExecuteMterpImpl
12930