blob: fef7dc6816b552583c709d90eff0c05bc20f36dd [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
7627.L_op_unused_fa: /* 0xfa */
7628/* File: mips/op_unused_fa.S */
7629/* File: mips/unused.S */
7630/*
7631 * Bail to reference interpreter to throw.
7632 */
7633 b MterpFallback
7634
7635
7636/* ------------------------------ */
7637 .balign 128
7638.L_op_unused_fb: /* 0xfb */
7639/* File: mips/op_unused_fb.S */
7640/* File: mips/unused.S */
7641/*
7642 * Bail to reference interpreter to throw.
7643 */
7644 b MterpFallback
7645
7646
7647/* ------------------------------ */
7648 .balign 128
7649.L_op_unused_fc: /* 0xfc */
7650/* File: mips/op_unused_fc.S */
7651/* File: mips/unused.S */
7652/*
7653 * Bail to reference interpreter to throw.
7654 */
7655 b MterpFallback
7656
7657
7658/* ------------------------------ */
7659 .balign 128
7660.L_op_unused_fd: /* 0xfd */
7661/* File: mips/op_unused_fd.S */
7662/* File: mips/unused.S */
7663/*
7664 * Bail to reference interpreter to throw.
7665 */
7666 b MterpFallback
7667
7668
7669/* ------------------------------ */
7670 .balign 128
7671.L_op_unused_fe: /* 0xfe */
7672/* File: mips/op_unused_fe.S */
7673/* File: mips/unused.S */
7674/*
7675 * Bail to reference interpreter to throw.
7676 */
7677 b MterpFallback
7678
7679
7680/* ------------------------------ */
7681 .balign 128
7682.L_op_unused_ff: /* 0xff */
7683/* File: mips/op_unused_ff.S */
7684/* File: mips/unused.S */
7685/*
7686 * Bail to reference interpreter to throw.
7687 */
7688 b MterpFallback
7689
7690
7691 .balign 128
7692 .size artMterpAsmInstructionStart, .-artMterpAsmInstructionStart
7693 .global artMterpAsmInstructionEnd
7694artMterpAsmInstructionEnd:
7695
7696/*
7697 * ===========================================================================
7698 * Sister implementations
7699 * ===========================================================================
7700 */
7701 .global artMterpAsmSisterStart
7702 .type artMterpAsmSisterStart, %function
7703 .text
7704 .balign 4
7705artMterpAsmSisterStart:
7706
Douglas Leung200f0402016-02-25 20:05:47 -08007707/* continuation for op_cmpl_float */
7708
7709.Lop_cmpl_float_nan:
7710 li rTEMP, -1
7711
7712.Lop_cmpl_float_finish:
7713 GET_OPA(rOBJ)
7714 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7715 GET_INST_OPCODE(t0) # extract opcode from rINST
7716 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7717
7718/* continuation for op_cmpg_float */
7719
7720.Lop_cmpg_float_nan:
7721 li rTEMP, 1
7722
7723.Lop_cmpg_float_finish:
7724 GET_OPA(rOBJ)
7725 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7726 GET_INST_OPCODE(t0) # extract opcode from rINST
7727 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7728
7729/* continuation for op_cmpl_double */
7730
7731.Lop_cmpl_double_nan:
7732 li rTEMP, -1
7733
7734.Lop_cmpl_double_finish:
7735 GET_OPA(rOBJ)
7736 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7737 GET_INST_OPCODE(t0) # extract opcode from rINST
7738 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7739
7740/* continuation for op_cmpg_double */
7741
7742.Lop_cmpg_double_nan:
7743 li rTEMP, 1
7744
7745.Lop_cmpg_double_finish:
7746 GET_OPA(rOBJ)
7747 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
7748 GET_INST_OPCODE(t0) # extract opcode from rINST
7749 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP
7750
Douglas Leung200f0402016-02-25 20:05:47 -08007751/* continuation for op_float_to_int */
7752
7753/*
7754 * Not an entry point as it is used only once !!
7755 */
7756f2i_doconv:
7757#ifdef MIPS32REVGE6
7758 l.s fa1, .LFLOAT_TO_INT_max
7759 cmp.ule.s ft2, fa1, fa0
7760 l.s fv0, .LFLOAT_TO_INT_ret_max
7761 bc1nez ft2, .Lop_float_to_int_set_vreg_f
7762
7763 l.s fa1, .LFLOAT_TO_INT_min
7764 cmp.ule.s ft2, fa0, fa1
7765 l.s fv0, .LFLOAT_TO_INT_ret_min
7766 bc1nez ft2, .Lop_float_to_int_set_vreg_f
7767
7768 mov.s fa1, fa0
7769 cmp.un.s ft2, fa0, fa1
7770 li.s fv0, 0
7771 bc1nez ft2, .Lop_float_to_int_set_vreg_f
7772#else
7773 l.s fa1, .LFLOAT_TO_INT_max
7774 c.ole.s fcc0, fa1, fa0
7775 l.s fv0, .LFLOAT_TO_INT_ret_max
7776 bc1t .Lop_float_to_int_set_vreg_f
7777
7778 l.s fa1, .LFLOAT_TO_INT_min
7779 c.ole.s fcc0, fa0, fa1
7780 l.s fv0, .LFLOAT_TO_INT_ret_min
7781 bc1t .Lop_float_to_int_set_vreg_f
7782
7783 mov.s fa1, fa0
7784 c.un.s fcc0, fa0, fa1
7785 li.s fv0, 0
7786 bc1t .Lop_float_to_int_set_vreg_f
7787#endif
7788
7789 trunc.w.s fv0, fa0
7790 b .Lop_float_to_int_set_vreg_f
7791
7792.LFLOAT_TO_INT_max:
7793 .word 0x4f000000
7794.LFLOAT_TO_INT_min:
7795 .word 0xcf000000
7796.LFLOAT_TO_INT_ret_max:
7797 .word 0x7fffffff
7798.LFLOAT_TO_INT_ret_min:
7799 .word 0x80000000
7800
7801/* continuation for op_float_to_long */
7802
7803f2l_doconv:
7804#ifdef MIPS32REVGE6
7805 l.s fa1, .LLONG_TO_max
7806 cmp.ule.s ft2, fa1, fa0
7807 li rRESULT0, ~0
7808 li rRESULT1, ~0x80000000
7809 bc1nez ft2, .Lop_float_to_long_set_vreg
7810
7811 l.s fa1, .LLONG_TO_min
7812 cmp.ule.s ft2, fa0, fa1
7813 li rRESULT0, 0
7814 li rRESULT1, 0x80000000
7815 bc1nez ft2, .Lop_float_to_long_set_vreg
7816
7817 mov.s fa1, fa0
7818 cmp.un.s ft2, fa0, fa1
7819 li rRESULT0, 0
7820 li rRESULT1, 0
7821 bc1nez ft2, .Lop_float_to_long_set_vreg
7822#else
7823 l.s fa1, .LLONG_TO_max
7824 c.ole.s fcc0, fa1, fa0
7825 li rRESULT0, ~0
7826 li rRESULT1, ~0x80000000
7827 bc1t .Lop_float_to_long_set_vreg
7828
7829 l.s fa1, .LLONG_TO_min
7830 c.ole.s fcc0, fa0, fa1
7831 li rRESULT0, 0
7832 li rRESULT1, 0x80000000
7833 bc1t .Lop_float_to_long_set_vreg
7834
7835 mov.s fa1, fa0
7836 c.un.s fcc0, fa0, fa1
7837 li rRESULT0, 0
7838 li rRESULT1, 0
7839 bc1t .Lop_float_to_long_set_vreg
7840#endif
7841
7842 JAL(__fixsfdi)
7843
7844 b .Lop_float_to_long_set_vreg
7845
7846.LLONG_TO_max:
7847 .word 0x5f000000
7848
7849.LLONG_TO_min:
7850 .word 0xdf000000
7851
7852/* continuation for op_double_to_int */
7853
7854d2i_doconv:
7855#ifdef MIPS32REVGE6
7856 la t0, .LDOUBLE_TO_INT_max
7857 LOAD64_F(fa1, fa1f, t0)
7858 cmp.ule.d ft2, fa1, fa0
7859 l.s fv0, .LDOUBLE_TO_INT_maxret
7860 bc1nez ft2, .Lop_double_to_int_set_vreg_f
7861
7862 la t0, .LDOUBLE_TO_INT_min
7863 LOAD64_F(fa1, fa1f, t0)
7864 cmp.ule.d ft2, fa0, fa1
7865 l.s fv0, .LDOUBLE_TO_INT_minret
7866 bc1nez ft2, .Lop_double_to_int_set_vreg_f
7867
7868 mov.d fa1, fa0
7869 cmp.un.d ft2, fa0, fa1
7870 li.s fv0, 0
7871 bc1nez ft2, .Lop_double_to_int_set_vreg_f
7872#else
7873 la t0, .LDOUBLE_TO_INT_max
7874 LOAD64_F(fa1, fa1f, t0)
7875 c.ole.d fcc0, fa1, fa0
7876 l.s fv0, .LDOUBLE_TO_INT_maxret
7877 bc1t .Lop_double_to_int_set_vreg_f
7878
7879 la t0, .LDOUBLE_TO_INT_min
7880 LOAD64_F(fa1, fa1f, t0)
7881 c.ole.d fcc0, fa0, fa1
7882 l.s fv0, .LDOUBLE_TO_INT_minret
7883 bc1t .Lop_double_to_int_set_vreg_f
7884
7885 mov.d fa1, fa0
7886 c.un.d fcc0, fa0, fa1
7887 li.s fv0, 0
7888 bc1t .Lop_double_to_int_set_vreg_f
7889#endif
7890
7891 trunc.w.d fv0, fa0
7892 b .Lop_double_to_int_set_vreg_f
7893
7894.LDOUBLE_TO_INT_max:
7895 .dword 0x41dfffffffc00000
7896.LDOUBLE_TO_INT_min:
7897 .dword 0xc1e0000000000000 # minint, as a double (high word)
7898.LDOUBLE_TO_INT_maxret:
7899 .word 0x7fffffff
7900.LDOUBLE_TO_INT_minret:
7901 .word 0x80000000
7902
7903/* continuation for op_double_to_long */
7904
7905d2l_doconv:
7906#ifdef MIPS32REVGE6
7907 la t0, .LDOUBLE_TO_LONG_max
7908 LOAD64_F(fa1, fa1f, t0)
7909 cmp.ule.d ft2, fa1, fa0
7910 la t0, .LDOUBLE_TO_LONG_ret_max
7911 LOAD64(rRESULT0, rRESULT1, t0)
7912 bc1nez ft2, .Lop_double_to_long_set_vreg
7913
7914 la t0, .LDOUBLE_TO_LONG_min
7915 LOAD64_F(fa1, fa1f, t0)
7916 cmp.ule.d ft2, fa0, fa1
7917 la t0, .LDOUBLE_TO_LONG_ret_min
7918 LOAD64(rRESULT0, rRESULT1, t0)
7919 bc1nez ft2, .Lop_double_to_long_set_vreg
7920
7921 mov.d fa1, fa0
7922 cmp.un.d ft2, fa0, fa1
7923 li rRESULT0, 0
7924 li rRESULT1, 0
7925 bc1nez ft2, .Lop_double_to_long_set_vreg
7926#else
7927 la t0, .LDOUBLE_TO_LONG_max
7928 LOAD64_F(fa1, fa1f, t0)
7929 c.ole.d fcc0, fa1, fa0
7930 la t0, .LDOUBLE_TO_LONG_ret_max
7931 LOAD64(rRESULT0, rRESULT1, t0)
7932 bc1t .Lop_double_to_long_set_vreg
7933
7934 la t0, .LDOUBLE_TO_LONG_min
7935 LOAD64_F(fa1, fa1f, t0)
7936 c.ole.d fcc0, fa0, fa1
7937 la t0, .LDOUBLE_TO_LONG_ret_min
7938 LOAD64(rRESULT0, rRESULT1, t0)
7939 bc1t .Lop_double_to_long_set_vreg
7940
7941 mov.d fa1, fa0
7942 c.un.d fcc0, fa0, fa1
7943 li rRESULT0, 0
7944 li rRESULT1, 0
7945 bc1t .Lop_double_to_long_set_vreg
7946#endif
7947 JAL(__fixdfdi)
7948 b .Lop_double_to_long_set_vreg
7949
7950.LDOUBLE_TO_LONG_max:
7951 .dword 0x43e0000000000000 # maxlong, as a double (high word)
7952.LDOUBLE_TO_LONG_min:
7953 .dword 0xc3e0000000000000 # minlong, as a double (high word)
7954.LDOUBLE_TO_LONG_ret_max:
7955 .dword 0x7fffffffffffffff
7956.LDOUBLE_TO_LONG_ret_min:
7957 .dword 0x8000000000000000
7958
7959/* continuation for op_mul_long */
7960
7961.Lop_mul_long_finish:
7962 GET_INST_OPCODE(t0) # extract opcode from rINST
7963 SET_VREG64(v0, v1, a0) # vAA::vAA+1 <- v0(low) :: v1(high)
7964 GOTO_OPCODE(t0) # jump to next instruction
7965
7966/* continuation for op_shl_long */
7967
7968.Lop_shl_long_finish:
7969 SET_VREG64_GOTO(zero, v0, t2, t0) # vAA/vAA+1 <- rlo/rhi
7970
7971/* continuation for op_shr_long */
7972
7973.Lop_shr_long_finish:
7974 sra a3, a1, 31 # a3<- sign(ah)
7975 SET_VREG64_GOTO(v1, a3, t3, t0) # vAA/VAA+1 <- rlo/rhi
7976
7977/* continuation for op_ushr_long */
7978
7979.Lop_ushr_long_finish:
7980 SET_VREG64_GOTO(v1, zero, rOBJ, t0) # vAA/vAA+1 <- rlo/rhi
7981
7982/* continuation for op_add_double */
7983
7984.Lop_add_double_finish:
7985 GET_INST_OPCODE(t0) # extract opcode from rINST
7986 GOTO_OPCODE(t0) # jump to next instruction
7987
7988/* continuation for op_sub_double */
7989
7990.Lop_sub_double_finish:
7991 GET_INST_OPCODE(t0) # extract opcode from rINST
7992 GOTO_OPCODE(t0) # jump to next instruction
7993
7994/* continuation for op_mul_double */
7995
7996.Lop_mul_double_finish:
7997 GET_INST_OPCODE(t0) # extract opcode from rINST
7998 GOTO_OPCODE(t0) # jump to next instruction
7999
8000/* continuation for op_div_double */
8001
8002.Lop_div_double_finish:
8003 GET_INST_OPCODE(t0) # extract opcode from rINST
8004 GOTO_OPCODE(t0) # jump to next instruction
8005
8006/* continuation for op_rem_double */
8007
8008.Lop_rem_double_finish:
8009 GET_INST_OPCODE(t0) # extract opcode from rINST
8010 GOTO_OPCODE(t0) # jump to next instruction
8011
8012/* continuation for op_shl_long_2addr */
8013
8014.Lop_shl_long_2addr_finish:
8015 SET_VREG64_GOTO(zero, v0, rOBJ, t0) # vAA/vAA+1 <- rlo/rhi
8016
8017/* continuation for op_shr_long_2addr */
8018
8019.Lop_shr_long_2addr_finish:
8020 sra a3, a1, 31 # a3<- sign(ah)
8021 SET_VREG64_GOTO(v1, a3, t2, t0) # vAA/vAA+1 <- rlo/rhi
8022
8023/* continuation for op_ushr_long_2addr */
8024
8025.Lop_ushr_long_2addr_finish:
8026 SET_VREG64_GOTO(v1, zero, t3, t0) # vAA/vAA+1 <- rlo/rhi
8027
8028 .size artMterpAsmSisterStart, .-artMterpAsmSisterStart
8029 .global artMterpAsmSisterEnd
8030artMterpAsmSisterEnd:
8031
8032
8033 .global artMterpAsmAltInstructionStart
8034 .type artMterpAsmAltInstructionStart, %function
8035 .text
8036
8037artMterpAsmAltInstructionStart = .L_ALT_op_nop
8038/* ------------------------------ */
8039 .balign 128
8040.L_ALT_op_nop: /* 0x00 */
8041/* File: mips/alt_stub.S */
8042/*
8043 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8044 * any interesting requests and then jump to the real instruction
8045 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8046 */
8047 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008048 la ra, artMterpAsmInstructionStart + (0 * 128) # Addr of primary handler
8049 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8050 move a0, rSELF # arg0
8051 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008052 move a2, rPC
8053 la t9, MterpCheckBefore
8054 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008055
8056/* ------------------------------ */
8057 .balign 128
8058.L_ALT_op_move: /* 0x01 */
8059/* File: mips/alt_stub.S */
8060/*
8061 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8062 * any interesting requests and then jump to the real instruction
8063 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8064 */
8065 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008066 la ra, artMterpAsmInstructionStart + (1 * 128) # Addr of primary handler
8067 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8068 move a0, rSELF # arg0
8069 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008070 move a2, rPC
8071 la t9, MterpCheckBefore
8072 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008073
8074/* ------------------------------ */
8075 .balign 128
8076.L_ALT_op_move_from16: /* 0x02 */
8077/* File: mips/alt_stub.S */
8078/*
8079 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8080 * any interesting requests and then jump to the real instruction
8081 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8082 */
8083 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008084 la ra, artMterpAsmInstructionStart + (2 * 128) # Addr of primary handler
8085 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8086 move a0, rSELF # arg0
8087 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008088 move a2, rPC
8089 la t9, MterpCheckBefore
8090 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008091
8092/* ------------------------------ */
8093 .balign 128
8094.L_ALT_op_move_16: /* 0x03 */
8095/* File: mips/alt_stub.S */
8096/*
8097 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8098 * any interesting requests and then jump to the real instruction
8099 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8100 */
8101 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008102 la ra, artMterpAsmInstructionStart + (3 * 128) # Addr of primary handler
8103 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8104 move a0, rSELF # arg0
8105 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008106 move a2, rPC
8107 la t9, MterpCheckBefore
8108 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008109
8110/* ------------------------------ */
8111 .balign 128
8112.L_ALT_op_move_wide: /* 0x04 */
8113/* File: mips/alt_stub.S */
8114/*
8115 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8116 * any interesting requests and then jump to the real instruction
8117 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8118 */
8119 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008120 la ra, artMterpAsmInstructionStart + (4 * 128) # Addr of primary handler
8121 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8122 move a0, rSELF # arg0
8123 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008124 move a2, rPC
8125 la t9, MterpCheckBefore
8126 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008127
8128/* ------------------------------ */
8129 .balign 128
8130.L_ALT_op_move_wide_from16: /* 0x05 */
8131/* File: mips/alt_stub.S */
8132/*
8133 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8134 * any interesting requests and then jump to the real instruction
8135 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8136 */
8137 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008138 la ra, artMterpAsmInstructionStart + (5 * 128) # Addr of primary handler
8139 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8140 move a0, rSELF # arg0
8141 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008142 move a2, rPC
8143 la t9, MterpCheckBefore
8144 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008145
8146/* ------------------------------ */
8147 .balign 128
8148.L_ALT_op_move_wide_16: /* 0x06 */
8149/* File: mips/alt_stub.S */
8150/*
8151 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8152 * any interesting requests and then jump to the real instruction
8153 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8154 */
8155 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008156 la ra, artMterpAsmInstructionStart + (6 * 128) # Addr of primary handler
8157 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8158 move a0, rSELF # arg0
8159 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008160 move a2, rPC
8161 la t9, MterpCheckBefore
8162 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008163
8164/* ------------------------------ */
8165 .balign 128
8166.L_ALT_op_move_object: /* 0x07 */
8167/* File: mips/alt_stub.S */
8168/*
8169 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8170 * any interesting requests and then jump to the real instruction
8171 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8172 */
8173 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008174 la ra, artMterpAsmInstructionStart + (7 * 128) # Addr of primary handler
8175 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8176 move a0, rSELF # arg0
8177 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008178 move a2, rPC
8179 la t9, MterpCheckBefore
8180 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008181
8182/* ------------------------------ */
8183 .balign 128
8184.L_ALT_op_move_object_from16: /* 0x08 */
8185/* File: mips/alt_stub.S */
8186/*
8187 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8188 * any interesting requests and then jump to the real instruction
8189 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8190 */
8191 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008192 la ra, artMterpAsmInstructionStart + (8 * 128) # Addr of primary handler
8193 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8194 move a0, rSELF # arg0
8195 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008196 move a2, rPC
8197 la t9, MterpCheckBefore
8198 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008199
8200/* ------------------------------ */
8201 .balign 128
8202.L_ALT_op_move_object_16: /* 0x09 */
8203/* File: mips/alt_stub.S */
8204/*
8205 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8206 * any interesting requests and then jump to the real instruction
8207 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8208 */
8209 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008210 la ra, artMterpAsmInstructionStart + (9 * 128) # Addr of primary handler
8211 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8212 move a0, rSELF # arg0
8213 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008214 move a2, rPC
8215 la t9, MterpCheckBefore
8216 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008217
8218/* ------------------------------ */
8219 .balign 128
8220.L_ALT_op_move_result: /* 0x0a */
8221/* File: mips/alt_stub.S */
8222/*
8223 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8224 * any interesting requests and then jump to the real instruction
8225 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8226 */
8227 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008228 la ra, artMterpAsmInstructionStart + (10 * 128) # Addr of primary handler
8229 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8230 move a0, rSELF # arg0
8231 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008232 move a2, rPC
8233 la t9, MterpCheckBefore
8234 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008235
8236/* ------------------------------ */
8237 .balign 128
8238.L_ALT_op_move_result_wide: /* 0x0b */
8239/* File: mips/alt_stub.S */
8240/*
8241 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8242 * any interesting requests and then jump to the real instruction
8243 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8244 */
8245 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008246 la ra, artMterpAsmInstructionStart + (11 * 128) # Addr of primary handler
8247 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8248 move a0, rSELF # arg0
8249 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008250 move a2, rPC
8251 la t9, MterpCheckBefore
8252 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008253
8254/* ------------------------------ */
8255 .balign 128
8256.L_ALT_op_move_result_object: /* 0x0c */
8257/* File: mips/alt_stub.S */
8258/*
8259 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8260 * any interesting requests and then jump to the real instruction
8261 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8262 */
8263 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008264 la ra, artMterpAsmInstructionStart + (12 * 128) # Addr of primary handler
8265 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8266 move a0, rSELF # arg0
8267 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008268 move a2, rPC
8269 la t9, MterpCheckBefore
8270 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008271
8272/* ------------------------------ */
8273 .balign 128
8274.L_ALT_op_move_exception: /* 0x0d */
8275/* File: mips/alt_stub.S */
8276/*
8277 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8278 * any interesting requests and then jump to the real instruction
8279 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8280 */
8281 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008282 la ra, artMterpAsmInstructionStart + (13 * 128) # Addr of primary handler
8283 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8284 move a0, rSELF # arg0
8285 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008286 move a2, rPC
8287 la t9, MterpCheckBefore
8288 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008289
8290/* ------------------------------ */
8291 .balign 128
8292.L_ALT_op_return_void: /* 0x0e */
8293/* File: mips/alt_stub.S */
8294/*
8295 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8296 * any interesting requests and then jump to the real instruction
8297 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8298 */
8299 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008300 la ra, artMterpAsmInstructionStart + (14 * 128) # Addr of primary handler
8301 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8302 move a0, rSELF # arg0
8303 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008304 move a2, rPC
8305 la t9, MterpCheckBefore
8306 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008307
8308/* ------------------------------ */
8309 .balign 128
8310.L_ALT_op_return: /* 0x0f */
8311/* File: mips/alt_stub.S */
8312/*
8313 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8314 * any interesting requests and then jump to the real instruction
8315 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8316 */
8317 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008318 la ra, artMterpAsmInstructionStart + (15 * 128) # Addr of primary handler
8319 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8320 move a0, rSELF # arg0
8321 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008322 move a2, rPC
8323 la t9, MterpCheckBefore
8324 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008325
8326/* ------------------------------ */
8327 .balign 128
8328.L_ALT_op_return_wide: /* 0x10 */
8329/* File: mips/alt_stub.S */
8330/*
8331 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8332 * any interesting requests and then jump to the real instruction
8333 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8334 */
8335 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008336 la ra, artMterpAsmInstructionStart + (16 * 128) # Addr of primary handler
8337 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8338 move a0, rSELF # arg0
8339 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008340 move a2, rPC
8341 la t9, MterpCheckBefore
8342 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008343
8344/* ------------------------------ */
8345 .balign 128
8346.L_ALT_op_return_object: /* 0x11 */
8347/* File: mips/alt_stub.S */
8348/*
8349 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8350 * any interesting requests and then jump to the real instruction
8351 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8352 */
8353 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008354 la ra, artMterpAsmInstructionStart + (17 * 128) # Addr of primary handler
8355 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8356 move a0, rSELF # arg0
8357 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008358 move a2, rPC
8359 la t9, MterpCheckBefore
8360 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008361
8362/* ------------------------------ */
8363 .balign 128
8364.L_ALT_op_const_4: /* 0x12 */
8365/* File: mips/alt_stub.S */
8366/*
8367 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8368 * any interesting requests and then jump to the real instruction
8369 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8370 */
8371 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008372 la ra, artMterpAsmInstructionStart + (18 * 128) # Addr of primary handler
8373 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8374 move a0, rSELF # arg0
8375 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008376 move a2, rPC
8377 la t9, MterpCheckBefore
8378 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008379
8380/* ------------------------------ */
8381 .balign 128
8382.L_ALT_op_const_16: /* 0x13 */
8383/* File: mips/alt_stub.S */
8384/*
8385 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8386 * any interesting requests and then jump to the real instruction
8387 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8388 */
8389 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008390 la ra, artMterpAsmInstructionStart + (19 * 128) # Addr of primary handler
8391 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8392 move a0, rSELF # arg0
8393 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008394 move a2, rPC
8395 la t9, MterpCheckBefore
8396 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008397
8398/* ------------------------------ */
8399 .balign 128
8400.L_ALT_op_const: /* 0x14 */
8401/* File: mips/alt_stub.S */
8402/*
8403 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8404 * any interesting requests and then jump to the real instruction
8405 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8406 */
8407 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008408 la ra, artMterpAsmInstructionStart + (20 * 128) # Addr of primary handler
8409 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8410 move a0, rSELF # arg0
8411 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008412 move a2, rPC
8413 la t9, MterpCheckBefore
8414 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008415
8416/* ------------------------------ */
8417 .balign 128
8418.L_ALT_op_const_high16: /* 0x15 */
8419/* File: mips/alt_stub.S */
8420/*
8421 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8422 * any interesting requests and then jump to the real instruction
8423 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8424 */
8425 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008426 la ra, artMterpAsmInstructionStart + (21 * 128) # Addr of primary handler
8427 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8428 move a0, rSELF # arg0
8429 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008430 move a2, rPC
8431 la t9, MterpCheckBefore
8432 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008433
8434/* ------------------------------ */
8435 .balign 128
8436.L_ALT_op_const_wide_16: /* 0x16 */
8437/* File: mips/alt_stub.S */
8438/*
8439 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8440 * any interesting requests and then jump to the real instruction
8441 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8442 */
8443 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008444 la ra, artMterpAsmInstructionStart + (22 * 128) # Addr of primary handler
8445 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8446 move a0, rSELF # arg0
8447 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008448 move a2, rPC
8449 la t9, MterpCheckBefore
8450 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008451
8452/* ------------------------------ */
8453 .balign 128
8454.L_ALT_op_const_wide_32: /* 0x17 */
8455/* File: mips/alt_stub.S */
8456/*
8457 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8458 * any interesting requests and then jump to the real instruction
8459 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8460 */
8461 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008462 la ra, artMterpAsmInstructionStart + (23 * 128) # Addr of primary handler
8463 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8464 move a0, rSELF # arg0
8465 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008466 move a2, rPC
8467 la t9, MterpCheckBefore
8468 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008469
8470/* ------------------------------ */
8471 .balign 128
8472.L_ALT_op_const_wide: /* 0x18 */
8473/* File: mips/alt_stub.S */
8474/*
8475 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8476 * any interesting requests and then jump to the real instruction
8477 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8478 */
8479 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008480 la ra, artMterpAsmInstructionStart + (24 * 128) # Addr of primary handler
8481 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8482 move a0, rSELF # arg0
8483 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008484 move a2, rPC
8485 la t9, MterpCheckBefore
8486 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008487
8488/* ------------------------------ */
8489 .balign 128
8490.L_ALT_op_const_wide_high16: /* 0x19 */
8491/* File: mips/alt_stub.S */
8492/*
8493 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8494 * any interesting requests and then jump to the real instruction
8495 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8496 */
8497 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008498 la ra, artMterpAsmInstructionStart + (25 * 128) # Addr of primary handler
8499 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8500 move a0, rSELF # arg0
8501 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008502 move a2, rPC
8503 la t9, MterpCheckBefore
8504 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008505
8506/* ------------------------------ */
8507 .balign 128
8508.L_ALT_op_const_string: /* 0x1a */
8509/* File: mips/alt_stub.S */
8510/*
8511 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8512 * any interesting requests and then jump to the real instruction
8513 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8514 */
8515 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008516 la ra, artMterpAsmInstructionStart + (26 * 128) # Addr of primary handler
8517 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8518 move a0, rSELF # arg0
8519 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008520 move a2, rPC
8521 la t9, MterpCheckBefore
8522 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008523
8524/* ------------------------------ */
8525 .balign 128
8526.L_ALT_op_const_string_jumbo: /* 0x1b */
8527/* File: mips/alt_stub.S */
8528/*
8529 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8530 * any interesting requests and then jump to the real instruction
8531 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8532 */
8533 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008534 la ra, artMterpAsmInstructionStart + (27 * 128) # Addr of primary handler
8535 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8536 move a0, rSELF # arg0
8537 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008538 move a2, rPC
8539 la t9, MterpCheckBefore
8540 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008541
8542/* ------------------------------ */
8543 .balign 128
8544.L_ALT_op_const_class: /* 0x1c */
8545/* File: mips/alt_stub.S */
8546/*
8547 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8548 * any interesting requests and then jump to the real instruction
8549 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8550 */
8551 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008552 la ra, artMterpAsmInstructionStart + (28 * 128) # Addr of primary handler
8553 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8554 move a0, rSELF # arg0
8555 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008556 move a2, rPC
8557 la t9, MterpCheckBefore
8558 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008559
8560/* ------------------------------ */
8561 .balign 128
8562.L_ALT_op_monitor_enter: /* 0x1d */
8563/* File: mips/alt_stub.S */
8564/*
8565 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8566 * any interesting requests and then jump to the real instruction
8567 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8568 */
8569 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008570 la ra, artMterpAsmInstructionStart + (29 * 128) # Addr of primary handler
8571 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8572 move a0, rSELF # arg0
8573 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008574 move a2, rPC
8575 la t9, MterpCheckBefore
8576 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008577
8578/* ------------------------------ */
8579 .balign 128
8580.L_ALT_op_monitor_exit: /* 0x1e */
8581/* File: mips/alt_stub.S */
8582/*
8583 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8584 * any interesting requests and then jump to the real instruction
8585 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8586 */
8587 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008588 la ra, artMterpAsmInstructionStart + (30 * 128) # Addr of primary handler
8589 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8590 move a0, rSELF # arg0
8591 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008592 move a2, rPC
8593 la t9, MterpCheckBefore
8594 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008595
8596/* ------------------------------ */
8597 .balign 128
8598.L_ALT_op_check_cast: /* 0x1f */
8599/* File: mips/alt_stub.S */
8600/*
8601 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8602 * any interesting requests and then jump to the real instruction
8603 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8604 */
8605 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008606 la ra, artMterpAsmInstructionStart + (31 * 128) # Addr of primary handler
8607 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8608 move a0, rSELF # arg0
8609 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008610 move a2, rPC
8611 la t9, MterpCheckBefore
8612 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008613
8614/* ------------------------------ */
8615 .balign 128
8616.L_ALT_op_instance_of: /* 0x20 */
8617/* File: mips/alt_stub.S */
8618/*
8619 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8620 * any interesting requests and then jump to the real instruction
8621 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8622 */
8623 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008624 la ra, artMterpAsmInstructionStart + (32 * 128) # Addr of primary handler
8625 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8626 move a0, rSELF # arg0
8627 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008628 move a2, rPC
8629 la t9, MterpCheckBefore
8630 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008631
8632/* ------------------------------ */
8633 .balign 128
8634.L_ALT_op_array_length: /* 0x21 */
8635/* File: mips/alt_stub.S */
8636/*
8637 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8638 * any interesting requests and then jump to the real instruction
8639 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8640 */
8641 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008642 la ra, artMterpAsmInstructionStart + (33 * 128) # Addr of primary handler
8643 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8644 move a0, rSELF # arg0
8645 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008646 move a2, rPC
8647 la t9, MterpCheckBefore
8648 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008649
8650/* ------------------------------ */
8651 .balign 128
8652.L_ALT_op_new_instance: /* 0x22 */
8653/* File: mips/alt_stub.S */
8654/*
8655 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8656 * any interesting requests and then jump to the real instruction
8657 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8658 */
8659 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008660 la ra, artMterpAsmInstructionStart + (34 * 128) # Addr of primary handler
8661 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8662 move a0, rSELF # arg0
8663 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008664 move a2, rPC
8665 la t9, MterpCheckBefore
8666 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008667
8668/* ------------------------------ */
8669 .balign 128
8670.L_ALT_op_new_array: /* 0x23 */
8671/* File: mips/alt_stub.S */
8672/*
8673 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8674 * any interesting requests and then jump to the real instruction
8675 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8676 */
8677 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008678 la ra, artMterpAsmInstructionStart + (35 * 128) # Addr of primary handler
8679 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8680 move a0, rSELF # arg0
8681 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008682 move a2, rPC
8683 la t9, MterpCheckBefore
8684 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008685
8686/* ------------------------------ */
8687 .balign 128
8688.L_ALT_op_filled_new_array: /* 0x24 */
8689/* File: mips/alt_stub.S */
8690/*
8691 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8692 * any interesting requests and then jump to the real instruction
8693 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8694 */
8695 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008696 la ra, artMterpAsmInstructionStart + (36 * 128) # Addr of primary handler
8697 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8698 move a0, rSELF # arg0
8699 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008700 move a2, rPC
8701 la t9, MterpCheckBefore
8702 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008703
8704/* ------------------------------ */
8705 .balign 128
8706.L_ALT_op_filled_new_array_range: /* 0x25 */
8707/* File: mips/alt_stub.S */
8708/*
8709 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8710 * any interesting requests and then jump to the real instruction
8711 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8712 */
8713 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008714 la ra, artMterpAsmInstructionStart + (37 * 128) # Addr of primary handler
8715 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8716 move a0, rSELF # arg0
8717 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008718 move a2, rPC
8719 la t9, MterpCheckBefore
8720 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008721
8722/* ------------------------------ */
8723 .balign 128
8724.L_ALT_op_fill_array_data: /* 0x26 */
8725/* File: mips/alt_stub.S */
8726/*
8727 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8728 * any interesting requests and then jump to the real instruction
8729 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8730 */
8731 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008732 la ra, artMterpAsmInstructionStart + (38 * 128) # Addr of primary handler
8733 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8734 move a0, rSELF # arg0
8735 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008736 move a2, rPC
8737 la t9, MterpCheckBefore
8738 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008739
8740/* ------------------------------ */
8741 .balign 128
8742.L_ALT_op_throw: /* 0x27 */
8743/* File: mips/alt_stub.S */
8744/*
8745 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8746 * any interesting requests and then jump to the real instruction
8747 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8748 */
8749 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008750 la ra, artMterpAsmInstructionStart + (39 * 128) # Addr of primary handler
8751 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8752 move a0, rSELF # arg0
8753 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008754 move a2, rPC
8755 la t9, MterpCheckBefore
8756 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008757
8758/* ------------------------------ */
8759 .balign 128
8760.L_ALT_op_goto: /* 0x28 */
8761/* File: mips/alt_stub.S */
8762/*
8763 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8764 * any interesting requests and then jump to the real instruction
8765 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8766 */
8767 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008768 la ra, artMterpAsmInstructionStart + (40 * 128) # Addr of primary handler
8769 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8770 move a0, rSELF # arg0
8771 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008772 move a2, rPC
8773 la t9, MterpCheckBefore
8774 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008775
8776/* ------------------------------ */
8777 .balign 128
8778.L_ALT_op_goto_16: /* 0x29 */
8779/* File: mips/alt_stub.S */
8780/*
8781 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8782 * any interesting requests and then jump to the real instruction
8783 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8784 */
8785 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008786 la ra, artMterpAsmInstructionStart + (41 * 128) # Addr of primary handler
8787 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8788 move a0, rSELF # arg0
8789 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008790 move a2, rPC
8791 la t9, MterpCheckBefore
8792 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008793
8794/* ------------------------------ */
8795 .balign 128
8796.L_ALT_op_goto_32: /* 0x2a */
8797/* File: mips/alt_stub.S */
8798/*
8799 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8800 * any interesting requests and then jump to the real instruction
8801 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8802 */
8803 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008804 la ra, artMterpAsmInstructionStart + (42 * 128) # Addr of primary handler
8805 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8806 move a0, rSELF # arg0
8807 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008808 move a2, rPC
8809 la t9, MterpCheckBefore
8810 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008811
8812/* ------------------------------ */
8813 .balign 128
8814.L_ALT_op_packed_switch: /* 0x2b */
8815/* File: mips/alt_stub.S */
8816/*
8817 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8818 * any interesting requests and then jump to the real instruction
8819 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8820 */
8821 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008822 la ra, artMterpAsmInstructionStart + (43 * 128) # Addr of primary handler
8823 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8824 move a0, rSELF # arg0
8825 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008826 move a2, rPC
8827 la t9, MterpCheckBefore
8828 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008829
8830/* ------------------------------ */
8831 .balign 128
8832.L_ALT_op_sparse_switch: /* 0x2c */
8833/* File: mips/alt_stub.S */
8834/*
8835 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8836 * any interesting requests and then jump to the real instruction
8837 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8838 */
8839 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008840 la ra, artMterpAsmInstructionStart + (44 * 128) # Addr of primary handler
8841 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8842 move a0, rSELF # arg0
8843 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008844 move a2, rPC
8845 la t9, MterpCheckBefore
8846 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008847
8848/* ------------------------------ */
8849 .balign 128
8850.L_ALT_op_cmpl_float: /* 0x2d */
8851/* File: mips/alt_stub.S */
8852/*
8853 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8854 * any interesting requests and then jump to the real instruction
8855 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8856 */
8857 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008858 la ra, artMterpAsmInstructionStart + (45 * 128) # Addr of primary handler
8859 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8860 move a0, rSELF # arg0
8861 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008862 move a2, rPC
8863 la t9, MterpCheckBefore
8864 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008865
8866/* ------------------------------ */
8867 .balign 128
8868.L_ALT_op_cmpg_float: /* 0x2e */
8869/* File: mips/alt_stub.S */
8870/*
8871 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8872 * any interesting requests and then jump to the real instruction
8873 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8874 */
8875 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008876 la ra, artMterpAsmInstructionStart + (46 * 128) # Addr of primary handler
8877 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8878 move a0, rSELF # arg0
8879 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008880 move a2, rPC
8881 la t9, MterpCheckBefore
8882 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008883
8884/* ------------------------------ */
8885 .balign 128
8886.L_ALT_op_cmpl_double: /* 0x2f */
8887/* File: mips/alt_stub.S */
8888/*
8889 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8890 * any interesting requests and then jump to the real instruction
8891 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8892 */
8893 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008894 la ra, artMterpAsmInstructionStart + (47 * 128) # Addr of primary handler
8895 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8896 move a0, rSELF # arg0
8897 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008898 move a2, rPC
8899 la t9, MterpCheckBefore
8900 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008901
8902/* ------------------------------ */
8903 .balign 128
8904.L_ALT_op_cmpg_double: /* 0x30 */
8905/* File: mips/alt_stub.S */
8906/*
8907 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8908 * any interesting requests and then jump to the real instruction
8909 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8910 */
8911 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008912 la ra, artMterpAsmInstructionStart + (48 * 128) # Addr of primary handler
8913 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8914 move a0, rSELF # arg0
8915 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008916 move a2, rPC
8917 la t9, MterpCheckBefore
8918 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008919
8920/* ------------------------------ */
8921 .balign 128
8922.L_ALT_op_cmp_long: /* 0x31 */
8923/* File: mips/alt_stub.S */
8924/*
8925 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8926 * any interesting requests and then jump to the real instruction
8927 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8928 */
8929 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008930 la ra, artMterpAsmInstructionStart + (49 * 128) # Addr of primary handler
8931 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8932 move a0, rSELF # arg0
8933 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008934 move a2, rPC
8935 la t9, MterpCheckBefore
8936 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008937
8938/* ------------------------------ */
8939 .balign 128
8940.L_ALT_op_if_eq: /* 0x32 */
8941/* File: mips/alt_stub.S */
8942/*
8943 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8944 * any interesting requests and then jump to the real instruction
8945 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8946 */
8947 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008948 la ra, artMterpAsmInstructionStart + (50 * 128) # Addr of primary handler
8949 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8950 move a0, rSELF # arg0
8951 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008952 move a2, rPC
8953 la t9, MterpCheckBefore
8954 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008955
8956/* ------------------------------ */
8957 .balign 128
8958.L_ALT_op_if_ne: /* 0x33 */
8959/* File: mips/alt_stub.S */
8960/*
8961 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8962 * any interesting requests and then jump to the real instruction
8963 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8964 */
8965 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008966 la ra, artMterpAsmInstructionStart + (51 * 128) # Addr of primary handler
8967 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8968 move a0, rSELF # arg0
8969 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008970 move a2, rPC
8971 la t9, MterpCheckBefore
8972 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008973
8974/* ------------------------------ */
8975 .balign 128
8976.L_ALT_op_if_lt: /* 0x34 */
8977/* File: mips/alt_stub.S */
8978/*
8979 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8980 * any interesting requests and then jump to the real instruction
8981 * handler. Note that the call to MterpCheckBefore is done as a tail call.
8982 */
8983 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08008984 la ra, artMterpAsmInstructionStart + (52 * 128) # Addr of primary handler
8985 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
8986 move a0, rSELF # arg0
8987 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00008988 move a2, rPC
8989 la t9, MterpCheckBefore
8990 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08008991
8992/* ------------------------------ */
8993 .balign 128
8994.L_ALT_op_if_ge: /* 0x35 */
8995/* File: mips/alt_stub.S */
8996/*
8997 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8998 * any interesting requests and then jump to the real instruction
8999 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9000 */
9001 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009002 la ra, artMterpAsmInstructionStart + (53 * 128) # Addr of primary handler
9003 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9004 move a0, rSELF # arg0
9005 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009006 move a2, rPC
9007 la t9, MterpCheckBefore
9008 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009009
9010/* ------------------------------ */
9011 .balign 128
9012.L_ALT_op_if_gt: /* 0x36 */
9013/* File: mips/alt_stub.S */
9014/*
9015 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9016 * any interesting requests and then jump to the real instruction
9017 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9018 */
9019 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009020 la ra, artMterpAsmInstructionStart + (54 * 128) # Addr of primary handler
9021 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9022 move a0, rSELF # arg0
9023 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009024 move a2, rPC
9025 la t9, MterpCheckBefore
9026 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009027
9028/* ------------------------------ */
9029 .balign 128
9030.L_ALT_op_if_le: /* 0x37 */
9031/* File: mips/alt_stub.S */
9032/*
9033 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9034 * any interesting requests and then jump to the real instruction
9035 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9036 */
9037 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009038 la ra, artMterpAsmInstructionStart + (55 * 128) # Addr of primary handler
9039 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9040 move a0, rSELF # arg0
9041 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009042 move a2, rPC
9043 la t9, MterpCheckBefore
9044 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009045
9046/* ------------------------------ */
9047 .balign 128
9048.L_ALT_op_if_eqz: /* 0x38 */
9049/* File: mips/alt_stub.S */
9050/*
9051 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9052 * any interesting requests and then jump to the real instruction
9053 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9054 */
9055 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009056 la ra, artMterpAsmInstructionStart + (56 * 128) # Addr of primary handler
9057 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9058 move a0, rSELF # arg0
9059 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009060 move a2, rPC
9061 la t9, MterpCheckBefore
9062 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009063
9064/* ------------------------------ */
9065 .balign 128
9066.L_ALT_op_if_nez: /* 0x39 */
9067/* File: mips/alt_stub.S */
9068/*
9069 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9070 * any interesting requests and then jump to the real instruction
9071 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9072 */
9073 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009074 la ra, artMterpAsmInstructionStart + (57 * 128) # Addr of primary handler
9075 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9076 move a0, rSELF # arg0
9077 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009078 move a2, rPC
9079 la t9, MterpCheckBefore
9080 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009081
9082/* ------------------------------ */
9083 .balign 128
9084.L_ALT_op_if_ltz: /* 0x3a */
9085/* File: mips/alt_stub.S */
9086/*
9087 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9088 * any interesting requests and then jump to the real instruction
9089 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9090 */
9091 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009092 la ra, artMterpAsmInstructionStart + (58 * 128) # Addr of primary handler
9093 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9094 move a0, rSELF # arg0
9095 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009096 move a2, rPC
9097 la t9, MterpCheckBefore
9098 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009099
9100/* ------------------------------ */
9101 .balign 128
9102.L_ALT_op_if_gez: /* 0x3b */
9103/* File: mips/alt_stub.S */
9104/*
9105 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9106 * any interesting requests and then jump to the real instruction
9107 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9108 */
9109 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009110 la ra, artMterpAsmInstructionStart + (59 * 128) # Addr of primary handler
9111 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9112 move a0, rSELF # arg0
9113 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009114 move a2, rPC
9115 la t9, MterpCheckBefore
9116 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009117
9118/* ------------------------------ */
9119 .balign 128
9120.L_ALT_op_if_gtz: /* 0x3c */
9121/* File: mips/alt_stub.S */
9122/*
9123 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9124 * any interesting requests and then jump to the real instruction
9125 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9126 */
9127 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009128 la ra, artMterpAsmInstructionStart + (60 * 128) # Addr of primary handler
9129 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9130 move a0, rSELF # arg0
9131 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009132 move a2, rPC
9133 la t9, MterpCheckBefore
9134 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009135
9136/* ------------------------------ */
9137 .balign 128
9138.L_ALT_op_if_lez: /* 0x3d */
9139/* File: mips/alt_stub.S */
9140/*
9141 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9142 * any interesting requests and then jump to the real instruction
9143 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9144 */
9145 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009146 la ra, artMterpAsmInstructionStart + (61 * 128) # Addr of primary handler
9147 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9148 move a0, rSELF # arg0
9149 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009150 move a2, rPC
9151 la t9, MterpCheckBefore
9152 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009153
9154/* ------------------------------ */
9155 .balign 128
9156.L_ALT_op_unused_3e: /* 0x3e */
9157/* File: mips/alt_stub.S */
9158/*
9159 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9160 * any interesting requests and then jump to the real instruction
9161 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9162 */
9163 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009164 la ra, artMterpAsmInstructionStart + (62 * 128) # Addr of primary handler
9165 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9166 move a0, rSELF # arg0
9167 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009168 move a2, rPC
9169 la t9, MterpCheckBefore
9170 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009171
9172/* ------------------------------ */
9173 .balign 128
9174.L_ALT_op_unused_3f: /* 0x3f */
9175/* File: mips/alt_stub.S */
9176/*
9177 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9178 * any interesting requests and then jump to the real instruction
9179 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9180 */
9181 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009182 la ra, artMterpAsmInstructionStart + (63 * 128) # Addr of primary handler
9183 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9184 move a0, rSELF # arg0
9185 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009186 move a2, rPC
9187 la t9, MterpCheckBefore
9188 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009189
9190/* ------------------------------ */
9191 .balign 128
9192.L_ALT_op_unused_40: /* 0x40 */
9193/* File: mips/alt_stub.S */
9194/*
9195 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9196 * any interesting requests and then jump to the real instruction
9197 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9198 */
9199 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009200 la ra, artMterpAsmInstructionStart + (64 * 128) # Addr of primary handler
9201 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9202 move a0, rSELF # arg0
9203 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009204 move a2, rPC
9205 la t9, MterpCheckBefore
9206 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009207
9208/* ------------------------------ */
9209 .balign 128
9210.L_ALT_op_unused_41: /* 0x41 */
9211/* File: mips/alt_stub.S */
9212/*
9213 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9214 * any interesting requests and then jump to the real instruction
9215 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9216 */
9217 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009218 la ra, artMterpAsmInstructionStart + (65 * 128) # Addr of primary handler
9219 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9220 move a0, rSELF # arg0
9221 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009222 move a2, rPC
9223 la t9, MterpCheckBefore
9224 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009225
9226/* ------------------------------ */
9227 .balign 128
9228.L_ALT_op_unused_42: /* 0x42 */
9229/* File: mips/alt_stub.S */
9230/*
9231 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9232 * any interesting requests and then jump to the real instruction
9233 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9234 */
9235 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009236 la ra, artMterpAsmInstructionStart + (66 * 128) # Addr of primary handler
9237 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9238 move a0, rSELF # arg0
9239 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009240 move a2, rPC
9241 la t9, MterpCheckBefore
9242 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009243
9244/* ------------------------------ */
9245 .balign 128
9246.L_ALT_op_unused_43: /* 0x43 */
9247/* File: mips/alt_stub.S */
9248/*
9249 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9250 * any interesting requests and then jump to the real instruction
9251 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9252 */
9253 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009254 la ra, artMterpAsmInstructionStart + (67 * 128) # Addr of primary handler
9255 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9256 move a0, rSELF # arg0
9257 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009258 move a2, rPC
9259 la t9, MterpCheckBefore
9260 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009261
9262/* ------------------------------ */
9263 .balign 128
9264.L_ALT_op_aget: /* 0x44 */
9265/* File: mips/alt_stub.S */
9266/*
9267 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9268 * any interesting requests and then jump to the real instruction
9269 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9270 */
9271 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009272 la ra, artMterpAsmInstructionStart + (68 * 128) # Addr of primary handler
9273 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9274 move a0, rSELF # arg0
9275 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009276 move a2, rPC
9277 la t9, MterpCheckBefore
9278 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009279
9280/* ------------------------------ */
9281 .balign 128
9282.L_ALT_op_aget_wide: /* 0x45 */
9283/* File: mips/alt_stub.S */
9284/*
9285 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9286 * any interesting requests and then jump to the real instruction
9287 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9288 */
9289 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009290 la ra, artMterpAsmInstructionStart + (69 * 128) # Addr of primary handler
9291 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9292 move a0, rSELF # arg0
9293 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009294 move a2, rPC
9295 la t9, MterpCheckBefore
9296 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009297
9298/* ------------------------------ */
9299 .balign 128
9300.L_ALT_op_aget_object: /* 0x46 */
9301/* File: mips/alt_stub.S */
9302/*
9303 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9304 * any interesting requests and then jump to the real instruction
9305 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9306 */
9307 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009308 la ra, artMterpAsmInstructionStart + (70 * 128) # Addr of primary handler
9309 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9310 move a0, rSELF # arg0
9311 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009312 move a2, rPC
9313 la t9, MterpCheckBefore
9314 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009315
9316/* ------------------------------ */
9317 .balign 128
9318.L_ALT_op_aget_boolean: /* 0x47 */
9319/* File: mips/alt_stub.S */
9320/*
9321 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9322 * any interesting requests and then jump to the real instruction
9323 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9324 */
9325 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009326 la ra, artMterpAsmInstructionStart + (71 * 128) # Addr of primary handler
9327 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9328 move a0, rSELF # arg0
9329 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009330 move a2, rPC
9331 la t9, MterpCheckBefore
9332 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009333
9334/* ------------------------------ */
9335 .balign 128
9336.L_ALT_op_aget_byte: /* 0x48 */
9337/* File: mips/alt_stub.S */
9338/*
9339 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9340 * any interesting requests and then jump to the real instruction
9341 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9342 */
9343 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009344 la ra, artMterpAsmInstructionStart + (72 * 128) # Addr of primary handler
9345 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9346 move a0, rSELF # arg0
9347 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009348 move a2, rPC
9349 la t9, MterpCheckBefore
9350 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009351
9352/* ------------------------------ */
9353 .balign 128
9354.L_ALT_op_aget_char: /* 0x49 */
9355/* File: mips/alt_stub.S */
9356/*
9357 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9358 * any interesting requests and then jump to the real instruction
9359 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9360 */
9361 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009362 la ra, artMterpAsmInstructionStart + (73 * 128) # Addr of primary handler
9363 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9364 move a0, rSELF # arg0
9365 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009366 move a2, rPC
9367 la t9, MterpCheckBefore
9368 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009369
9370/* ------------------------------ */
9371 .balign 128
9372.L_ALT_op_aget_short: /* 0x4a */
9373/* File: mips/alt_stub.S */
9374/*
9375 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9376 * any interesting requests and then jump to the real instruction
9377 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9378 */
9379 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009380 la ra, artMterpAsmInstructionStart + (74 * 128) # Addr of primary handler
9381 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9382 move a0, rSELF # arg0
9383 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009384 move a2, rPC
9385 la t9, MterpCheckBefore
9386 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009387
9388/* ------------------------------ */
9389 .balign 128
9390.L_ALT_op_aput: /* 0x4b */
9391/* File: mips/alt_stub.S */
9392/*
9393 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9394 * any interesting requests and then jump to the real instruction
9395 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9396 */
9397 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009398 la ra, artMterpAsmInstructionStart + (75 * 128) # Addr of primary handler
9399 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9400 move a0, rSELF # arg0
9401 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009402 move a2, rPC
9403 la t9, MterpCheckBefore
9404 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009405
9406/* ------------------------------ */
9407 .balign 128
9408.L_ALT_op_aput_wide: /* 0x4c */
9409/* File: mips/alt_stub.S */
9410/*
9411 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9412 * any interesting requests and then jump to the real instruction
9413 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9414 */
9415 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009416 la ra, artMterpAsmInstructionStart + (76 * 128) # Addr of primary handler
9417 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9418 move a0, rSELF # arg0
9419 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009420 move a2, rPC
9421 la t9, MterpCheckBefore
9422 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009423
9424/* ------------------------------ */
9425 .balign 128
9426.L_ALT_op_aput_object: /* 0x4d */
9427/* File: mips/alt_stub.S */
9428/*
9429 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9430 * any interesting requests and then jump to the real instruction
9431 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9432 */
9433 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009434 la ra, artMterpAsmInstructionStart + (77 * 128) # Addr of primary handler
9435 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9436 move a0, rSELF # arg0
9437 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009438 move a2, rPC
9439 la t9, MterpCheckBefore
9440 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009441
9442/* ------------------------------ */
9443 .balign 128
9444.L_ALT_op_aput_boolean: /* 0x4e */
9445/* File: mips/alt_stub.S */
9446/*
9447 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9448 * any interesting requests and then jump to the real instruction
9449 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9450 */
9451 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009452 la ra, artMterpAsmInstructionStart + (78 * 128) # Addr of primary handler
9453 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9454 move a0, rSELF # arg0
9455 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009456 move a2, rPC
9457 la t9, MterpCheckBefore
9458 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009459
9460/* ------------------------------ */
9461 .balign 128
9462.L_ALT_op_aput_byte: /* 0x4f */
9463/* File: mips/alt_stub.S */
9464/*
9465 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9466 * any interesting requests and then jump to the real instruction
9467 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9468 */
9469 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009470 la ra, artMterpAsmInstructionStart + (79 * 128) # Addr of primary handler
9471 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9472 move a0, rSELF # arg0
9473 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009474 move a2, rPC
9475 la t9, MterpCheckBefore
9476 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009477
9478/* ------------------------------ */
9479 .balign 128
9480.L_ALT_op_aput_char: /* 0x50 */
9481/* File: mips/alt_stub.S */
9482/*
9483 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9484 * any interesting requests and then jump to the real instruction
9485 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9486 */
9487 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009488 la ra, artMterpAsmInstructionStart + (80 * 128) # Addr of primary handler
9489 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9490 move a0, rSELF # arg0
9491 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009492 move a2, rPC
9493 la t9, MterpCheckBefore
9494 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009495
9496/* ------------------------------ */
9497 .balign 128
9498.L_ALT_op_aput_short: /* 0x51 */
9499/* File: mips/alt_stub.S */
9500/*
9501 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9502 * any interesting requests and then jump to the real instruction
9503 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9504 */
9505 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009506 la ra, artMterpAsmInstructionStart + (81 * 128) # Addr of primary handler
9507 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9508 move a0, rSELF # arg0
9509 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009510 move a2, rPC
9511 la t9, MterpCheckBefore
9512 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009513
9514/* ------------------------------ */
9515 .balign 128
9516.L_ALT_op_iget: /* 0x52 */
9517/* File: mips/alt_stub.S */
9518/*
9519 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9520 * any interesting requests and then jump to the real instruction
9521 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9522 */
9523 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009524 la ra, artMterpAsmInstructionStart + (82 * 128) # Addr of primary handler
9525 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9526 move a0, rSELF # arg0
9527 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009528 move a2, rPC
9529 la t9, MterpCheckBefore
9530 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009531
9532/* ------------------------------ */
9533 .balign 128
9534.L_ALT_op_iget_wide: /* 0x53 */
9535/* File: mips/alt_stub.S */
9536/*
9537 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9538 * any interesting requests and then jump to the real instruction
9539 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9540 */
9541 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009542 la ra, artMterpAsmInstructionStart + (83 * 128) # Addr of primary handler
9543 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9544 move a0, rSELF # arg0
9545 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009546 move a2, rPC
9547 la t9, MterpCheckBefore
9548 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009549
9550/* ------------------------------ */
9551 .balign 128
9552.L_ALT_op_iget_object: /* 0x54 */
9553/* File: mips/alt_stub.S */
9554/*
9555 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9556 * any interesting requests and then jump to the real instruction
9557 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9558 */
9559 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009560 la ra, artMterpAsmInstructionStart + (84 * 128) # Addr of primary handler
9561 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9562 move a0, rSELF # arg0
9563 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009564 move a2, rPC
9565 la t9, MterpCheckBefore
9566 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009567
9568/* ------------------------------ */
9569 .balign 128
9570.L_ALT_op_iget_boolean: /* 0x55 */
9571/* File: mips/alt_stub.S */
9572/*
9573 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9574 * any interesting requests and then jump to the real instruction
9575 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9576 */
9577 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009578 la ra, artMterpAsmInstructionStart + (85 * 128) # Addr of primary handler
9579 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9580 move a0, rSELF # arg0
9581 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009582 move a2, rPC
9583 la t9, MterpCheckBefore
9584 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009585
9586/* ------------------------------ */
9587 .balign 128
9588.L_ALT_op_iget_byte: /* 0x56 */
9589/* File: mips/alt_stub.S */
9590/*
9591 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9592 * any interesting requests and then jump to the real instruction
9593 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9594 */
9595 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009596 la ra, artMterpAsmInstructionStart + (86 * 128) # Addr of primary handler
9597 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9598 move a0, rSELF # arg0
9599 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009600 move a2, rPC
9601 la t9, MterpCheckBefore
9602 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009603
9604/* ------------------------------ */
9605 .balign 128
9606.L_ALT_op_iget_char: /* 0x57 */
9607/* File: mips/alt_stub.S */
9608/*
9609 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9610 * any interesting requests and then jump to the real instruction
9611 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9612 */
9613 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009614 la ra, artMterpAsmInstructionStart + (87 * 128) # Addr of primary handler
9615 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9616 move a0, rSELF # arg0
9617 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009618 move a2, rPC
9619 la t9, MterpCheckBefore
9620 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009621
9622/* ------------------------------ */
9623 .balign 128
9624.L_ALT_op_iget_short: /* 0x58 */
9625/* File: mips/alt_stub.S */
9626/*
9627 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9628 * any interesting requests and then jump to the real instruction
9629 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9630 */
9631 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009632 la ra, artMterpAsmInstructionStart + (88 * 128) # Addr of primary handler
9633 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9634 move a0, rSELF # arg0
9635 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009636 move a2, rPC
9637 la t9, MterpCheckBefore
9638 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009639
9640/* ------------------------------ */
9641 .balign 128
9642.L_ALT_op_iput: /* 0x59 */
9643/* File: mips/alt_stub.S */
9644/*
9645 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9646 * any interesting requests and then jump to the real instruction
9647 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9648 */
9649 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009650 la ra, artMterpAsmInstructionStart + (89 * 128) # Addr of primary handler
9651 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9652 move a0, rSELF # arg0
9653 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009654 move a2, rPC
9655 la t9, MterpCheckBefore
9656 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009657
9658/* ------------------------------ */
9659 .balign 128
9660.L_ALT_op_iput_wide: /* 0x5a */
9661/* File: mips/alt_stub.S */
9662/*
9663 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9664 * any interesting requests and then jump to the real instruction
9665 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9666 */
9667 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009668 la ra, artMterpAsmInstructionStart + (90 * 128) # Addr of primary handler
9669 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9670 move a0, rSELF # arg0
9671 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009672 move a2, rPC
9673 la t9, MterpCheckBefore
9674 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009675
9676/* ------------------------------ */
9677 .balign 128
9678.L_ALT_op_iput_object: /* 0x5b */
9679/* File: mips/alt_stub.S */
9680/*
9681 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9682 * any interesting requests and then jump to the real instruction
9683 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9684 */
9685 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009686 la ra, artMterpAsmInstructionStart + (91 * 128) # Addr of primary handler
9687 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9688 move a0, rSELF # arg0
9689 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009690 move a2, rPC
9691 la t9, MterpCheckBefore
9692 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009693
9694/* ------------------------------ */
9695 .balign 128
9696.L_ALT_op_iput_boolean: /* 0x5c */
9697/* File: mips/alt_stub.S */
9698/*
9699 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9700 * any interesting requests and then jump to the real instruction
9701 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9702 */
9703 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009704 la ra, artMterpAsmInstructionStart + (92 * 128) # Addr of primary handler
9705 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9706 move a0, rSELF # arg0
9707 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009708 move a2, rPC
9709 la t9, MterpCheckBefore
9710 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009711
9712/* ------------------------------ */
9713 .balign 128
9714.L_ALT_op_iput_byte: /* 0x5d */
9715/* File: mips/alt_stub.S */
9716/*
9717 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9718 * any interesting requests and then jump to the real instruction
9719 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9720 */
9721 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009722 la ra, artMterpAsmInstructionStart + (93 * 128) # Addr of primary handler
9723 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9724 move a0, rSELF # arg0
9725 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009726 move a2, rPC
9727 la t9, MterpCheckBefore
9728 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009729
9730/* ------------------------------ */
9731 .balign 128
9732.L_ALT_op_iput_char: /* 0x5e */
9733/* File: mips/alt_stub.S */
9734/*
9735 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9736 * any interesting requests and then jump to the real instruction
9737 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9738 */
9739 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009740 la ra, artMterpAsmInstructionStart + (94 * 128) # Addr of primary handler
9741 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9742 move a0, rSELF # arg0
9743 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009744 move a2, rPC
9745 la t9, MterpCheckBefore
9746 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009747
9748/* ------------------------------ */
9749 .balign 128
9750.L_ALT_op_iput_short: /* 0x5f */
9751/* File: mips/alt_stub.S */
9752/*
9753 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9754 * any interesting requests and then jump to the real instruction
9755 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9756 */
9757 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009758 la ra, artMterpAsmInstructionStart + (95 * 128) # Addr of primary handler
9759 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9760 move a0, rSELF # arg0
9761 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009762 move a2, rPC
9763 la t9, MterpCheckBefore
9764 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009765
9766/* ------------------------------ */
9767 .balign 128
9768.L_ALT_op_sget: /* 0x60 */
9769/* File: mips/alt_stub.S */
9770/*
9771 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9772 * any interesting requests and then jump to the real instruction
9773 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9774 */
9775 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009776 la ra, artMterpAsmInstructionStart + (96 * 128) # Addr of primary handler
9777 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9778 move a0, rSELF # arg0
9779 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009780 move a2, rPC
9781 la t9, MterpCheckBefore
9782 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009783
9784/* ------------------------------ */
9785 .balign 128
9786.L_ALT_op_sget_wide: /* 0x61 */
9787/* File: mips/alt_stub.S */
9788/*
9789 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9790 * any interesting requests and then jump to the real instruction
9791 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9792 */
9793 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009794 la ra, artMterpAsmInstructionStart + (97 * 128) # Addr of primary handler
9795 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9796 move a0, rSELF # arg0
9797 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009798 move a2, rPC
9799 la t9, MterpCheckBefore
9800 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009801
9802/* ------------------------------ */
9803 .balign 128
9804.L_ALT_op_sget_object: /* 0x62 */
9805/* File: mips/alt_stub.S */
9806/*
9807 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9808 * any interesting requests and then jump to the real instruction
9809 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9810 */
9811 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009812 la ra, artMterpAsmInstructionStart + (98 * 128) # Addr of primary handler
9813 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9814 move a0, rSELF # arg0
9815 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009816 move a2, rPC
9817 la t9, MterpCheckBefore
9818 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009819
9820/* ------------------------------ */
9821 .balign 128
9822.L_ALT_op_sget_boolean: /* 0x63 */
9823/* File: mips/alt_stub.S */
9824/*
9825 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9826 * any interesting requests and then jump to the real instruction
9827 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9828 */
9829 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009830 la ra, artMterpAsmInstructionStart + (99 * 128) # Addr of primary handler
9831 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9832 move a0, rSELF # arg0
9833 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009834 move a2, rPC
9835 la t9, MterpCheckBefore
9836 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009837
9838/* ------------------------------ */
9839 .balign 128
9840.L_ALT_op_sget_byte: /* 0x64 */
9841/* File: mips/alt_stub.S */
9842/*
9843 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9844 * any interesting requests and then jump to the real instruction
9845 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9846 */
9847 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009848 la ra, artMterpAsmInstructionStart + (100 * 128) # Addr of primary handler
9849 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9850 move a0, rSELF # arg0
9851 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009852 move a2, rPC
9853 la t9, MterpCheckBefore
9854 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009855
9856/* ------------------------------ */
9857 .balign 128
9858.L_ALT_op_sget_char: /* 0x65 */
9859/* File: mips/alt_stub.S */
9860/*
9861 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9862 * any interesting requests and then jump to the real instruction
9863 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9864 */
9865 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009866 la ra, artMterpAsmInstructionStart + (101 * 128) # Addr of primary handler
9867 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9868 move a0, rSELF # arg0
9869 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009870 move a2, rPC
9871 la t9, MterpCheckBefore
9872 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009873
9874/* ------------------------------ */
9875 .balign 128
9876.L_ALT_op_sget_short: /* 0x66 */
9877/* File: mips/alt_stub.S */
9878/*
9879 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9880 * any interesting requests and then jump to the real instruction
9881 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9882 */
9883 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009884 la ra, artMterpAsmInstructionStart + (102 * 128) # Addr of primary handler
9885 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9886 move a0, rSELF # arg0
9887 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009888 move a2, rPC
9889 la t9, MterpCheckBefore
9890 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009891
9892/* ------------------------------ */
9893 .balign 128
9894.L_ALT_op_sput: /* 0x67 */
9895/* File: mips/alt_stub.S */
9896/*
9897 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9898 * any interesting requests and then jump to the real instruction
9899 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9900 */
9901 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009902 la ra, artMterpAsmInstructionStart + (103 * 128) # Addr of primary handler
9903 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9904 move a0, rSELF # arg0
9905 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009906 move a2, rPC
9907 la t9, MterpCheckBefore
9908 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009909
9910/* ------------------------------ */
9911 .balign 128
9912.L_ALT_op_sput_wide: /* 0x68 */
9913/* File: mips/alt_stub.S */
9914/*
9915 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9916 * any interesting requests and then jump to the real instruction
9917 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9918 */
9919 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009920 la ra, artMterpAsmInstructionStart + (104 * 128) # Addr of primary handler
9921 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9922 move a0, rSELF # arg0
9923 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009924 move a2, rPC
9925 la t9, MterpCheckBefore
9926 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009927
9928/* ------------------------------ */
9929 .balign 128
9930.L_ALT_op_sput_object: /* 0x69 */
9931/* File: mips/alt_stub.S */
9932/*
9933 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9934 * any interesting requests and then jump to the real instruction
9935 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9936 */
9937 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009938 la ra, artMterpAsmInstructionStart + (105 * 128) # Addr of primary handler
9939 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9940 move a0, rSELF # arg0
9941 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009942 move a2, rPC
9943 la t9, MterpCheckBefore
9944 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009945
9946/* ------------------------------ */
9947 .balign 128
9948.L_ALT_op_sput_boolean: /* 0x6a */
9949/* File: mips/alt_stub.S */
9950/*
9951 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9952 * any interesting requests and then jump to the real instruction
9953 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9954 */
9955 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009956 la ra, artMterpAsmInstructionStart + (106 * 128) # Addr of primary handler
9957 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9958 move a0, rSELF # arg0
9959 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009960 move a2, rPC
9961 la t9, MterpCheckBefore
9962 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009963
9964/* ------------------------------ */
9965 .balign 128
9966.L_ALT_op_sput_byte: /* 0x6b */
9967/* File: mips/alt_stub.S */
9968/*
9969 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9970 * any interesting requests and then jump to the real instruction
9971 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9972 */
9973 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009974 la ra, artMterpAsmInstructionStart + (107 * 128) # Addr of primary handler
9975 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9976 move a0, rSELF # arg0
9977 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009978 move a2, rPC
9979 la t9, MterpCheckBefore
9980 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009981
9982/* ------------------------------ */
9983 .balign 128
9984.L_ALT_op_sput_char: /* 0x6c */
9985/* File: mips/alt_stub.S */
9986/*
9987 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9988 * any interesting requests and then jump to the real instruction
9989 * handler. Note that the call to MterpCheckBefore is done as a tail call.
9990 */
9991 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -08009992 la ra, artMterpAsmInstructionStart + (108 * 128) # Addr of primary handler
9993 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
9994 move a0, rSELF # arg0
9995 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +00009996 move a2, rPC
9997 la t9, MterpCheckBefore
9998 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -08009999
10000/* ------------------------------ */
10001 .balign 128
10002.L_ALT_op_sput_short: /* 0x6d */
10003/* File: mips/alt_stub.S */
10004/*
10005 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10006 * any interesting requests and then jump to the real instruction
10007 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10008 */
10009 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010010 la ra, artMterpAsmInstructionStart + (109 * 128) # Addr of primary handler
10011 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10012 move a0, rSELF # arg0
10013 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010014 move a2, rPC
10015 la t9, MterpCheckBefore
10016 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010017
10018/* ------------------------------ */
10019 .balign 128
10020.L_ALT_op_invoke_virtual: /* 0x6e */
10021/* File: mips/alt_stub.S */
10022/*
10023 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10024 * any interesting requests and then jump to the real instruction
10025 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10026 */
10027 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010028 la ra, artMterpAsmInstructionStart + (110 * 128) # Addr of primary handler
10029 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10030 move a0, rSELF # arg0
10031 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010032 move a2, rPC
10033 la t9, MterpCheckBefore
10034 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010035
10036/* ------------------------------ */
10037 .balign 128
10038.L_ALT_op_invoke_super: /* 0x6f */
10039/* File: mips/alt_stub.S */
10040/*
10041 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10042 * any interesting requests and then jump to the real instruction
10043 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10044 */
10045 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010046 la ra, artMterpAsmInstructionStart + (111 * 128) # Addr of primary handler
10047 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10048 move a0, rSELF # arg0
10049 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010050 move a2, rPC
10051 la t9, MterpCheckBefore
10052 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010053
10054/* ------------------------------ */
10055 .balign 128
10056.L_ALT_op_invoke_direct: /* 0x70 */
10057/* File: mips/alt_stub.S */
10058/*
10059 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10060 * any interesting requests and then jump to the real instruction
10061 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10062 */
10063 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010064 la ra, artMterpAsmInstructionStart + (112 * 128) # Addr of primary handler
10065 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10066 move a0, rSELF # arg0
10067 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010068 move a2, rPC
10069 la t9, MterpCheckBefore
10070 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010071
10072/* ------------------------------ */
10073 .balign 128
10074.L_ALT_op_invoke_static: /* 0x71 */
10075/* File: mips/alt_stub.S */
10076/*
10077 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10078 * any interesting requests and then jump to the real instruction
10079 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10080 */
10081 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010082 la ra, artMterpAsmInstructionStart + (113 * 128) # Addr of primary handler
10083 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10084 move a0, rSELF # arg0
10085 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010086 move a2, rPC
10087 la t9, MterpCheckBefore
10088 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010089
10090/* ------------------------------ */
10091 .balign 128
10092.L_ALT_op_invoke_interface: /* 0x72 */
10093/* File: mips/alt_stub.S */
10094/*
10095 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10096 * any interesting requests and then jump to the real instruction
10097 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10098 */
10099 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010100 la ra, artMterpAsmInstructionStart + (114 * 128) # Addr of primary handler
10101 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10102 move a0, rSELF # arg0
10103 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010104 move a2, rPC
10105 la t9, MterpCheckBefore
10106 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010107
10108/* ------------------------------ */
10109 .balign 128
10110.L_ALT_op_return_void_no_barrier: /* 0x73 */
10111/* File: mips/alt_stub.S */
10112/*
10113 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10114 * any interesting requests and then jump to the real instruction
10115 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10116 */
10117 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010118 la ra, artMterpAsmInstructionStart + (115 * 128) # Addr of primary handler
10119 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10120 move a0, rSELF # arg0
10121 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010122 move a2, rPC
10123 la t9, MterpCheckBefore
10124 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010125
10126/* ------------------------------ */
10127 .balign 128
10128.L_ALT_op_invoke_virtual_range: /* 0x74 */
10129/* File: mips/alt_stub.S */
10130/*
10131 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10132 * any interesting requests and then jump to the real instruction
10133 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10134 */
10135 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010136 la ra, artMterpAsmInstructionStart + (116 * 128) # Addr of primary handler
10137 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10138 move a0, rSELF # arg0
10139 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010140 move a2, rPC
10141 la t9, MterpCheckBefore
10142 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010143
10144/* ------------------------------ */
10145 .balign 128
10146.L_ALT_op_invoke_super_range: /* 0x75 */
10147/* File: mips/alt_stub.S */
10148/*
10149 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10150 * any interesting requests and then jump to the real instruction
10151 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10152 */
10153 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010154 la ra, artMterpAsmInstructionStart + (117 * 128) # Addr of primary handler
10155 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10156 move a0, rSELF # arg0
10157 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010158 move a2, rPC
10159 la t9, MterpCheckBefore
10160 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010161
10162/* ------------------------------ */
10163 .balign 128
10164.L_ALT_op_invoke_direct_range: /* 0x76 */
10165/* File: mips/alt_stub.S */
10166/*
10167 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10168 * any interesting requests and then jump to the real instruction
10169 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10170 */
10171 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010172 la ra, artMterpAsmInstructionStart + (118 * 128) # Addr of primary handler
10173 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10174 move a0, rSELF # arg0
10175 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010176 move a2, rPC
10177 la t9, MterpCheckBefore
10178 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010179
10180/* ------------------------------ */
10181 .balign 128
10182.L_ALT_op_invoke_static_range: /* 0x77 */
10183/* File: mips/alt_stub.S */
10184/*
10185 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10186 * any interesting requests and then jump to the real instruction
10187 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10188 */
10189 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010190 la ra, artMterpAsmInstructionStart + (119 * 128) # Addr of primary handler
10191 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10192 move a0, rSELF # arg0
10193 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010194 move a2, rPC
10195 la t9, MterpCheckBefore
10196 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010197
10198/* ------------------------------ */
10199 .balign 128
10200.L_ALT_op_invoke_interface_range: /* 0x78 */
10201/* File: mips/alt_stub.S */
10202/*
10203 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10204 * any interesting requests and then jump to the real instruction
10205 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10206 */
10207 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010208 la ra, artMterpAsmInstructionStart + (120 * 128) # Addr of primary handler
10209 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10210 move a0, rSELF # arg0
10211 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010212 move a2, rPC
10213 la t9, MterpCheckBefore
10214 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010215
10216/* ------------------------------ */
10217 .balign 128
10218.L_ALT_op_unused_79: /* 0x79 */
10219/* File: mips/alt_stub.S */
10220/*
10221 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10222 * any interesting requests and then jump to the real instruction
10223 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10224 */
10225 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010226 la ra, artMterpAsmInstructionStart + (121 * 128) # Addr of primary handler
10227 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10228 move a0, rSELF # arg0
10229 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010230 move a2, rPC
10231 la t9, MterpCheckBefore
10232 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010233
10234/* ------------------------------ */
10235 .balign 128
10236.L_ALT_op_unused_7a: /* 0x7a */
10237/* File: mips/alt_stub.S */
10238/*
10239 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10240 * any interesting requests and then jump to the real instruction
10241 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10242 */
10243 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010244 la ra, artMterpAsmInstructionStart + (122 * 128) # Addr of primary handler
10245 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10246 move a0, rSELF # arg0
10247 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010248 move a2, rPC
10249 la t9, MterpCheckBefore
10250 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010251
10252/* ------------------------------ */
10253 .balign 128
10254.L_ALT_op_neg_int: /* 0x7b */
10255/* File: mips/alt_stub.S */
10256/*
10257 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10258 * any interesting requests and then jump to the real instruction
10259 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10260 */
10261 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010262 la ra, artMterpAsmInstructionStart + (123 * 128) # Addr of primary handler
10263 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10264 move a0, rSELF # arg0
10265 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010266 move a2, rPC
10267 la t9, MterpCheckBefore
10268 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010269
10270/* ------------------------------ */
10271 .balign 128
10272.L_ALT_op_not_int: /* 0x7c */
10273/* File: mips/alt_stub.S */
10274/*
10275 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10276 * any interesting requests and then jump to the real instruction
10277 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10278 */
10279 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010280 la ra, artMterpAsmInstructionStart + (124 * 128) # Addr of primary handler
10281 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10282 move a0, rSELF # arg0
10283 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010284 move a2, rPC
10285 la t9, MterpCheckBefore
10286 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010287
10288/* ------------------------------ */
10289 .balign 128
10290.L_ALT_op_neg_long: /* 0x7d */
10291/* File: mips/alt_stub.S */
10292/*
10293 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10294 * any interesting requests and then jump to the real instruction
10295 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10296 */
10297 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010298 la ra, artMterpAsmInstructionStart + (125 * 128) # Addr of primary handler
10299 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10300 move a0, rSELF # arg0
10301 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010302 move a2, rPC
10303 la t9, MterpCheckBefore
10304 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010305
10306/* ------------------------------ */
10307 .balign 128
10308.L_ALT_op_not_long: /* 0x7e */
10309/* File: mips/alt_stub.S */
10310/*
10311 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10312 * any interesting requests and then jump to the real instruction
10313 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10314 */
10315 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010316 la ra, artMterpAsmInstructionStart + (126 * 128) # Addr of primary handler
10317 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10318 move a0, rSELF # arg0
10319 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010320 move a2, rPC
10321 la t9, MterpCheckBefore
10322 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010323
10324/* ------------------------------ */
10325 .balign 128
10326.L_ALT_op_neg_float: /* 0x7f */
10327/* File: mips/alt_stub.S */
10328/*
10329 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10330 * any interesting requests and then jump to the real instruction
10331 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10332 */
10333 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010334 la ra, artMterpAsmInstructionStart + (127 * 128) # Addr of primary handler
10335 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10336 move a0, rSELF # arg0
10337 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010338 move a2, rPC
10339 la t9, MterpCheckBefore
10340 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010341
10342/* ------------------------------ */
10343 .balign 128
10344.L_ALT_op_neg_double: /* 0x80 */
10345/* File: mips/alt_stub.S */
10346/*
10347 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10348 * any interesting requests and then jump to the real instruction
10349 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10350 */
10351 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010352 la ra, artMterpAsmInstructionStart + (128 * 128) # Addr of primary handler
10353 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10354 move a0, rSELF # arg0
10355 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010356 move a2, rPC
10357 la t9, MterpCheckBefore
10358 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010359
10360/* ------------------------------ */
10361 .balign 128
10362.L_ALT_op_int_to_long: /* 0x81 */
10363/* File: mips/alt_stub.S */
10364/*
10365 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10366 * any interesting requests and then jump to the real instruction
10367 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10368 */
10369 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010370 la ra, artMterpAsmInstructionStart + (129 * 128) # Addr of primary handler
10371 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10372 move a0, rSELF # arg0
10373 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010374 move a2, rPC
10375 la t9, MterpCheckBefore
10376 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010377
10378/* ------------------------------ */
10379 .balign 128
10380.L_ALT_op_int_to_float: /* 0x82 */
10381/* File: mips/alt_stub.S */
10382/*
10383 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10384 * any interesting requests and then jump to the real instruction
10385 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10386 */
10387 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010388 la ra, artMterpAsmInstructionStart + (130 * 128) # Addr of primary handler
10389 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10390 move a0, rSELF # arg0
10391 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010392 move a2, rPC
10393 la t9, MterpCheckBefore
10394 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010395
10396/* ------------------------------ */
10397 .balign 128
10398.L_ALT_op_int_to_double: /* 0x83 */
10399/* File: mips/alt_stub.S */
10400/*
10401 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10402 * any interesting requests and then jump to the real instruction
10403 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10404 */
10405 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010406 la ra, artMterpAsmInstructionStart + (131 * 128) # Addr of primary handler
10407 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10408 move a0, rSELF # arg0
10409 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010410 move a2, rPC
10411 la t9, MterpCheckBefore
10412 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010413
10414/* ------------------------------ */
10415 .balign 128
10416.L_ALT_op_long_to_int: /* 0x84 */
10417/* File: mips/alt_stub.S */
10418/*
10419 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10420 * any interesting requests and then jump to the real instruction
10421 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10422 */
10423 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010424 la ra, artMterpAsmInstructionStart + (132 * 128) # Addr of primary handler
10425 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10426 move a0, rSELF # arg0
10427 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010428 move a2, rPC
10429 la t9, MterpCheckBefore
10430 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010431
10432/* ------------------------------ */
10433 .balign 128
10434.L_ALT_op_long_to_float: /* 0x85 */
10435/* File: mips/alt_stub.S */
10436/*
10437 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10438 * any interesting requests and then jump to the real instruction
10439 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10440 */
10441 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010442 la ra, artMterpAsmInstructionStart + (133 * 128) # Addr of primary handler
10443 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10444 move a0, rSELF # arg0
10445 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010446 move a2, rPC
10447 la t9, MterpCheckBefore
10448 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010449
10450/* ------------------------------ */
10451 .balign 128
10452.L_ALT_op_long_to_double: /* 0x86 */
10453/* File: mips/alt_stub.S */
10454/*
10455 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10456 * any interesting requests and then jump to the real instruction
10457 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10458 */
10459 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010460 la ra, artMterpAsmInstructionStart + (134 * 128) # Addr of primary handler
10461 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10462 move a0, rSELF # arg0
10463 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010464 move a2, rPC
10465 la t9, MterpCheckBefore
10466 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010467
10468/* ------------------------------ */
10469 .balign 128
10470.L_ALT_op_float_to_int: /* 0x87 */
10471/* File: mips/alt_stub.S */
10472/*
10473 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10474 * any interesting requests and then jump to the real instruction
10475 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10476 */
10477 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010478 la ra, artMterpAsmInstructionStart + (135 * 128) # Addr of primary handler
10479 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10480 move a0, rSELF # arg0
10481 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010482 move a2, rPC
10483 la t9, MterpCheckBefore
10484 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010485
10486/* ------------------------------ */
10487 .balign 128
10488.L_ALT_op_float_to_long: /* 0x88 */
10489/* File: mips/alt_stub.S */
10490/*
10491 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10492 * any interesting requests and then jump to the real instruction
10493 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10494 */
10495 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010496 la ra, artMterpAsmInstructionStart + (136 * 128) # Addr of primary handler
10497 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10498 move a0, rSELF # arg0
10499 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010500 move a2, rPC
10501 la t9, MterpCheckBefore
10502 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010503
10504/* ------------------------------ */
10505 .balign 128
10506.L_ALT_op_float_to_double: /* 0x89 */
10507/* File: mips/alt_stub.S */
10508/*
10509 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10510 * any interesting requests and then jump to the real instruction
10511 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10512 */
10513 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010514 la ra, artMterpAsmInstructionStart + (137 * 128) # Addr of primary handler
10515 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10516 move a0, rSELF # arg0
10517 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010518 move a2, rPC
10519 la t9, MterpCheckBefore
10520 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010521
10522/* ------------------------------ */
10523 .balign 128
10524.L_ALT_op_double_to_int: /* 0x8a */
10525/* File: mips/alt_stub.S */
10526/*
10527 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10528 * any interesting requests and then jump to the real instruction
10529 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10530 */
10531 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010532 la ra, artMterpAsmInstructionStart + (138 * 128) # Addr of primary handler
10533 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10534 move a0, rSELF # arg0
10535 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010536 move a2, rPC
10537 la t9, MterpCheckBefore
10538 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010539
10540/* ------------------------------ */
10541 .balign 128
10542.L_ALT_op_double_to_long: /* 0x8b */
10543/* File: mips/alt_stub.S */
10544/*
10545 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10546 * any interesting requests and then jump to the real instruction
10547 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10548 */
10549 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010550 la ra, artMterpAsmInstructionStart + (139 * 128) # Addr of primary handler
10551 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10552 move a0, rSELF # arg0
10553 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010554 move a2, rPC
10555 la t9, MterpCheckBefore
10556 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010557
10558/* ------------------------------ */
10559 .balign 128
10560.L_ALT_op_double_to_float: /* 0x8c */
10561/* File: mips/alt_stub.S */
10562/*
10563 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10564 * any interesting requests and then jump to the real instruction
10565 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10566 */
10567 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010568 la ra, artMterpAsmInstructionStart + (140 * 128) # Addr of primary handler
10569 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10570 move a0, rSELF # arg0
10571 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010572 move a2, rPC
10573 la t9, MterpCheckBefore
10574 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010575
10576/* ------------------------------ */
10577 .balign 128
10578.L_ALT_op_int_to_byte: /* 0x8d */
10579/* File: mips/alt_stub.S */
10580/*
10581 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10582 * any interesting requests and then jump to the real instruction
10583 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10584 */
10585 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010586 la ra, artMterpAsmInstructionStart + (141 * 128) # Addr of primary handler
10587 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10588 move a0, rSELF # arg0
10589 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010590 move a2, rPC
10591 la t9, MterpCheckBefore
10592 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010593
10594/* ------------------------------ */
10595 .balign 128
10596.L_ALT_op_int_to_char: /* 0x8e */
10597/* File: mips/alt_stub.S */
10598/*
10599 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10600 * any interesting requests and then jump to the real instruction
10601 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10602 */
10603 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010604 la ra, artMterpAsmInstructionStart + (142 * 128) # Addr of primary handler
10605 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10606 move a0, rSELF # arg0
10607 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010608 move a2, rPC
10609 la t9, MterpCheckBefore
10610 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010611
10612/* ------------------------------ */
10613 .balign 128
10614.L_ALT_op_int_to_short: /* 0x8f */
10615/* File: mips/alt_stub.S */
10616/*
10617 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10618 * any interesting requests and then jump to the real instruction
10619 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10620 */
10621 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010622 la ra, artMterpAsmInstructionStart + (143 * 128) # Addr of primary handler
10623 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10624 move a0, rSELF # arg0
10625 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010626 move a2, rPC
10627 la t9, MterpCheckBefore
10628 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010629
10630/* ------------------------------ */
10631 .balign 128
10632.L_ALT_op_add_int: /* 0x90 */
10633/* File: mips/alt_stub.S */
10634/*
10635 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10636 * any interesting requests and then jump to the real instruction
10637 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10638 */
10639 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010640 la ra, artMterpAsmInstructionStart + (144 * 128) # Addr of primary handler
10641 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10642 move a0, rSELF # arg0
10643 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010644 move a2, rPC
10645 la t9, MterpCheckBefore
10646 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010647
10648/* ------------------------------ */
10649 .balign 128
10650.L_ALT_op_sub_int: /* 0x91 */
10651/* File: mips/alt_stub.S */
10652/*
10653 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10654 * any interesting requests and then jump to the real instruction
10655 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10656 */
10657 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010658 la ra, artMterpAsmInstructionStart + (145 * 128) # Addr of primary handler
10659 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10660 move a0, rSELF # arg0
10661 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010662 move a2, rPC
10663 la t9, MterpCheckBefore
10664 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010665
10666/* ------------------------------ */
10667 .balign 128
10668.L_ALT_op_mul_int: /* 0x92 */
10669/* File: mips/alt_stub.S */
10670/*
10671 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10672 * any interesting requests and then jump to the real instruction
10673 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10674 */
10675 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010676 la ra, artMterpAsmInstructionStart + (146 * 128) # Addr of primary handler
10677 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10678 move a0, rSELF # arg0
10679 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010680 move a2, rPC
10681 la t9, MterpCheckBefore
10682 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010683
10684/* ------------------------------ */
10685 .balign 128
10686.L_ALT_op_div_int: /* 0x93 */
10687/* File: mips/alt_stub.S */
10688/*
10689 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10690 * any interesting requests and then jump to the real instruction
10691 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10692 */
10693 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010694 la ra, artMterpAsmInstructionStart + (147 * 128) # Addr of primary handler
10695 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10696 move a0, rSELF # arg0
10697 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010698 move a2, rPC
10699 la t9, MterpCheckBefore
10700 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010701
10702/* ------------------------------ */
10703 .balign 128
10704.L_ALT_op_rem_int: /* 0x94 */
10705/* File: mips/alt_stub.S */
10706/*
10707 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10708 * any interesting requests and then jump to the real instruction
10709 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10710 */
10711 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010712 la ra, artMterpAsmInstructionStart + (148 * 128) # Addr of primary handler
10713 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10714 move a0, rSELF # arg0
10715 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010716 move a2, rPC
10717 la t9, MterpCheckBefore
10718 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010719
10720/* ------------------------------ */
10721 .balign 128
10722.L_ALT_op_and_int: /* 0x95 */
10723/* File: mips/alt_stub.S */
10724/*
10725 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10726 * any interesting requests and then jump to the real instruction
10727 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10728 */
10729 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010730 la ra, artMterpAsmInstructionStart + (149 * 128) # Addr of primary handler
10731 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10732 move a0, rSELF # arg0
10733 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010734 move a2, rPC
10735 la t9, MterpCheckBefore
10736 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010737
10738/* ------------------------------ */
10739 .balign 128
10740.L_ALT_op_or_int: /* 0x96 */
10741/* File: mips/alt_stub.S */
10742/*
10743 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10744 * any interesting requests and then jump to the real instruction
10745 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10746 */
10747 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010748 la ra, artMterpAsmInstructionStart + (150 * 128) # Addr of primary handler
10749 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10750 move a0, rSELF # arg0
10751 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010752 move a2, rPC
10753 la t9, MterpCheckBefore
10754 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010755
10756/* ------------------------------ */
10757 .balign 128
10758.L_ALT_op_xor_int: /* 0x97 */
10759/* File: mips/alt_stub.S */
10760/*
10761 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10762 * any interesting requests and then jump to the real instruction
10763 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10764 */
10765 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010766 la ra, artMterpAsmInstructionStart + (151 * 128) # Addr of primary handler
10767 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10768 move a0, rSELF # arg0
10769 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010770 move a2, rPC
10771 la t9, MterpCheckBefore
10772 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010773
10774/* ------------------------------ */
10775 .balign 128
10776.L_ALT_op_shl_int: /* 0x98 */
10777/* File: mips/alt_stub.S */
10778/*
10779 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10780 * any interesting requests and then jump to the real instruction
10781 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10782 */
10783 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010784 la ra, artMterpAsmInstructionStart + (152 * 128) # Addr of primary handler
10785 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10786 move a0, rSELF # arg0
10787 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010788 move a2, rPC
10789 la t9, MterpCheckBefore
10790 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010791
10792/* ------------------------------ */
10793 .balign 128
10794.L_ALT_op_shr_int: /* 0x99 */
10795/* File: mips/alt_stub.S */
10796/*
10797 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10798 * any interesting requests and then jump to the real instruction
10799 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10800 */
10801 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010802 la ra, artMterpAsmInstructionStart + (153 * 128) # Addr of primary handler
10803 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10804 move a0, rSELF # arg0
10805 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010806 move a2, rPC
10807 la t9, MterpCheckBefore
10808 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010809
10810/* ------------------------------ */
10811 .balign 128
10812.L_ALT_op_ushr_int: /* 0x9a */
10813/* File: mips/alt_stub.S */
10814/*
10815 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10816 * any interesting requests and then jump to the real instruction
10817 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10818 */
10819 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010820 la ra, artMterpAsmInstructionStart + (154 * 128) # Addr of primary handler
10821 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10822 move a0, rSELF # arg0
10823 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010824 move a2, rPC
10825 la t9, MterpCheckBefore
10826 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010827
10828/* ------------------------------ */
10829 .balign 128
10830.L_ALT_op_add_long: /* 0x9b */
10831/* File: mips/alt_stub.S */
10832/*
10833 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10834 * any interesting requests and then jump to the real instruction
10835 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10836 */
10837 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010838 la ra, artMterpAsmInstructionStart + (155 * 128) # Addr of primary handler
10839 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10840 move a0, rSELF # arg0
10841 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010842 move a2, rPC
10843 la t9, MterpCheckBefore
10844 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010845
10846/* ------------------------------ */
10847 .balign 128
10848.L_ALT_op_sub_long: /* 0x9c */
10849/* File: mips/alt_stub.S */
10850/*
10851 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10852 * any interesting requests and then jump to the real instruction
10853 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10854 */
10855 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010856 la ra, artMterpAsmInstructionStart + (156 * 128) # Addr of primary handler
10857 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10858 move a0, rSELF # arg0
10859 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010860 move a2, rPC
10861 la t9, MterpCheckBefore
10862 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010863
10864/* ------------------------------ */
10865 .balign 128
10866.L_ALT_op_mul_long: /* 0x9d */
10867/* File: mips/alt_stub.S */
10868/*
10869 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10870 * any interesting requests and then jump to the real instruction
10871 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10872 */
10873 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010874 la ra, artMterpAsmInstructionStart + (157 * 128) # Addr of primary handler
10875 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10876 move a0, rSELF # arg0
10877 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010878 move a2, rPC
10879 la t9, MterpCheckBefore
10880 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010881
10882/* ------------------------------ */
10883 .balign 128
10884.L_ALT_op_div_long: /* 0x9e */
10885/* File: mips/alt_stub.S */
10886/*
10887 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10888 * any interesting requests and then jump to the real instruction
10889 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10890 */
10891 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010892 la ra, artMterpAsmInstructionStart + (158 * 128) # Addr of primary handler
10893 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10894 move a0, rSELF # arg0
10895 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010896 move a2, rPC
10897 la t9, MterpCheckBefore
10898 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010899
10900/* ------------------------------ */
10901 .balign 128
10902.L_ALT_op_rem_long: /* 0x9f */
10903/* File: mips/alt_stub.S */
10904/*
10905 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10906 * any interesting requests and then jump to the real instruction
10907 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10908 */
10909 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010910 la ra, artMterpAsmInstructionStart + (159 * 128) # Addr of primary handler
10911 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10912 move a0, rSELF # arg0
10913 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010914 move a2, rPC
10915 la t9, MterpCheckBefore
10916 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010917
10918/* ------------------------------ */
10919 .balign 128
10920.L_ALT_op_and_long: /* 0xa0 */
10921/* File: mips/alt_stub.S */
10922/*
10923 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10924 * any interesting requests and then jump to the real instruction
10925 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10926 */
10927 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010928 la ra, artMterpAsmInstructionStart + (160 * 128) # Addr of primary handler
10929 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10930 move a0, rSELF # arg0
10931 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010932 move a2, rPC
10933 la t9, MterpCheckBefore
10934 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010935
10936/* ------------------------------ */
10937 .balign 128
10938.L_ALT_op_or_long: /* 0xa1 */
10939/* File: mips/alt_stub.S */
10940/*
10941 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10942 * any interesting requests and then jump to the real instruction
10943 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10944 */
10945 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010946 la ra, artMterpAsmInstructionStart + (161 * 128) # Addr of primary handler
10947 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10948 move a0, rSELF # arg0
10949 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010950 move a2, rPC
10951 la t9, MterpCheckBefore
10952 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010953
10954/* ------------------------------ */
10955 .balign 128
10956.L_ALT_op_xor_long: /* 0xa2 */
10957/* File: mips/alt_stub.S */
10958/*
10959 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10960 * any interesting requests and then jump to the real instruction
10961 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10962 */
10963 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010964 la ra, artMterpAsmInstructionStart + (162 * 128) # Addr of primary handler
10965 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10966 move a0, rSELF # arg0
10967 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010968 move a2, rPC
10969 la t9, MterpCheckBefore
10970 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010971
10972/* ------------------------------ */
10973 .balign 128
10974.L_ALT_op_shl_long: /* 0xa3 */
10975/* File: mips/alt_stub.S */
10976/*
10977 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10978 * any interesting requests and then jump to the real instruction
10979 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10980 */
10981 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080010982 la ra, artMterpAsmInstructionStart + (163 * 128) # Addr of primary handler
10983 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
10984 move a0, rSELF # arg0
10985 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000010986 move a2, rPC
10987 la t9, MterpCheckBefore
10988 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080010989
10990/* ------------------------------ */
10991 .balign 128
10992.L_ALT_op_shr_long: /* 0xa4 */
10993/* File: mips/alt_stub.S */
10994/*
10995 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10996 * any interesting requests and then jump to the real instruction
10997 * handler. Note that the call to MterpCheckBefore is done as a tail call.
10998 */
10999 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011000 la ra, artMterpAsmInstructionStart + (164 * 128) # Addr of primary handler
11001 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11002 move a0, rSELF # arg0
11003 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011004 move a2, rPC
11005 la t9, MterpCheckBefore
11006 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011007
11008/* ------------------------------ */
11009 .balign 128
11010.L_ALT_op_ushr_long: /* 0xa5 */
11011/* File: mips/alt_stub.S */
11012/*
11013 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11014 * any interesting requests and then jump to the real instruction
11015 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11016 */
11017 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011018 la ra, artMterpAsmInstructionStart + (165 * 128) # Addr of primary handler
11019 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11020 move a0, rSELF # arg0
11021 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011022 move a2, rPC
11023 la t9, MterpCheckBefore
11024 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011025
11026/* ------------------------------ */
11027 .balign 128
11028.L_ALT_op_add_float: /* 0xa6 */
11029/* File: mips/alt_stub.S */
11030/*
11031 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11032 * any interesting requests and then jump to the real instruction
11033 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11034 */
11035 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011036 la ra, artMterpAsmInstructionStart + (166 * 128) # Addr of primary handler
11037 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11038 move a0, rSELF # arg0
11039 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011040 move a2, rPC
11041 la t9, MterpCheckBefore
11042 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011043
11044/* ------------------------------ */
11045 .balign 128
11046.L_ALT_op_sub_float: /* 0xa7 */
11047/* File: mips/alt_stub.S */
11048/*
11049 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11050 * any interesting requests and then jump to the real instruction
11051 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11052 */
11053 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011054 la ra, artMterpAsmInstructionStart + (167 * 128) # Addr of primary handler
11055 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11056 move a0, rSELF # arg0
11057 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011058 move a2, rPC
11059 la t9, MterpCheckBefore
11060 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011061
11062/* ------------------------------ */
11063 .balign 128
11064.L_ALT_op_mul_float: /* 0xa8 */
11065/* File: mips/alt_stub.S */
11066/*
11067 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11068 * any interesting requests and then jump to the real instruction
11069 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11070 */
11071 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011072 la ra, artMterpAsmInstructionStart + (168 * 128) # Addr of primary handler
11073 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11074 move a0, rSELF # arg0
11075 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011076 move a2, rPC
11077 la t9, MterpCheckBefore
11078 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011079
11080/* ------------------------------ */
11081 .balign 128
11082.L_ALT_op_div_float: /* 0xa9 */
11083/* File: mips/alt_stub.S */
11084/*
11085 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11086 * any interesting requests and then jump to the real instruction
11087 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11088 */
11089 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011090 la ra, artMterpAsmInstructionStart + (169 * 128) # Addr of primary handler
11091 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11092 move a0, rSELF # arg0
11093 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011094 move a2, rPC
11095 la t9, MterpCheckBefore
11096 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011097
11098/* ------------------------------ */
11099 .balign 128
11100.L_ALT_op_rem_float: /* 0xaa */
11101/* File: mips/alt_stub.S */
11102/*
11103 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11104 * any interesting requests and then jump to the real instruction
11105 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11106 */
11107 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011108 la ra, artMterpAsmInstructionStart + (170 * 128) # Addr of primary handler
11109 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11110 move a0, rSELF # arg0
11111 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011112 move a2, rPC
11113 la t9, MterpCheckBefore
11114 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011115
11116/* ------------------------------ */
11117 .balign 128
11118.L_ALT_op_add_double: /* 0xab */
11119/* File: mips/alt_stub.S */
11120/*
11121 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11122 * any interesting requests and then jump to the real instruction
11123 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11124 */
11125 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011126 la ra, artMterpAsmInstructionStart + (171 * 128) # Addr of primary handler
11127 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11128 move a0, rSELF # arg0
11129 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011130 move a2, rPC
11131 la t9, MterpCheckBefore
11132 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011133
11134/* ------------------------------ */
11135 .balign 128
11136.L_ALT_op_sub_double: /* 0xac */
11137/* File: mips/alt_stub.S */
11138/*
11139 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11140 * any interesting requests and then jump to the real instruction
11141 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11142 */
11143 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011144 la ra, artMterpAsmInstructionStart + (172 * 128) # Addr of primary handler
11145 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11146 move a0, rSELF # arg0
11147 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011148 move a2, rPC
11149 la t9, MterpCheckBefore
11150 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011151
11152/* ------------------------------ */
11153 .balign 128
11154.L_ALT_op_mul_double: /* 0xad */
11155/* File: mips/alt_stub.S */
11156/*
11157 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11158 * any interesting requests and then jump to the real instruction
11159 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11160 */
11161 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011162 la ra, artMterpAsmInstructionStart + (173 * 128) # Addr of primary handler
11163 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11164 move a0, rSELF # arg0
11165 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011166 move a2, rPC
11167 la t9, MterpCheckBefore
11168 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011169
11170/* ------------------------------ */
11171 .balign 128
11172.L_ALT_op_div_double: /* 0xae */
11173/* File: mips/alt_stub.S */
11174/*
11175 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11176 * any interesting requests and then jump to the real instruction
11177 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11178 */
11179 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011180 la ra, artMterpAsmInstructionStart + (174 * 128) # Addr of primary handler
11181 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11182 move a0, rSELF # arg0
11183 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011184 move a2, rPC
11185 la t9, MterpCheckBefore
11186 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011187
11188/* ------------------------------ */
11189 .balign 128
11190.L_ALT_op_rem_double: /* 0xaf */
11191/* File: mips/alt_stub.S */
11192/*
11193 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11194 * any interesting requests and then jump to the real instruction
11195 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11196 */
11197 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011198 la ra, artMterpAsmInstructionStart + (175 * 128) # Addr of primary handler
11199 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11200 move a0, rSELF # arg0
11201 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011202 move a2, rPC
11203 la t9, MterpCheckBefore
11204 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011205
11206/* ------------------------------ */
11207 .balign 128
11208.L_ALT_op_add_int_2addr: /* 0xb0 */
11209/* File: mips/alt_stub.S */
11210/*
11211 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11212 * any interesting requests and then jump to the real instruction
11213 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11214 */
11215 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011216 la ra, artMterpAsmInstructionStart + (176 * 128) # Addr of primary handler
11217 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11218 move a0, rSELF # arg0
11219 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011220 move a2, rPC
11221 la t9, MterpCheckBefore
11222 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011223
11224/* ------------------------------ */
11225 .balign 128
11226.L_ALT_op_sub_int_2addr: /* 0xb1 */
11227/* File: mips/alt_stub.S */
11228/*
11229 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11230 * any interesting requests and then jump to the real instruction
11231 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11232 */
11233 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011234 la ra, artMterpAsmInstructionStart + (177 * 128) # Addr of primary handler
11235 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11236 move a0, rSELF # arg0
11237 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011238 move a2, rPC
11239 la t9, MterpCheckBefore
11240 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011241
11242/* ------------------------------ */
11243 .balign 128
11244.L_ALT_op_mul_int_2addr: /* 0xb2 */
11245/* File: mips/alt_stub.S */
11246/*
11247 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11248 * any interesting requests and then jump to the real instruction
11249 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11250 */
11251 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011252 la ra, artMterpAsmInstructionStart + (178 * 128) # Addr of primary handler
11253 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11254 move a0, rSELF # arg0
11255 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011256 move a2, rPC
11257 la t9, MterpCheckBefore
11258 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011259
11260/* ------------------------------ */
11261 .balign 128
11262.L_ALT_op_div_int_2addr: /* 0xb3 */
11263/* File: mips/alt_stub.S */
11264/*
11265 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11266 * any interesting requests and then jump to the real instruction
11267 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11268 */
11269 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011270 la ra, artMterpAsmInstructionStart + (179 * 128) # Addr of primary handler
11271 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11272 move a0, rSELF # arg0
11273 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011274 move a2, rPC
11275 la t9, MterpCheckBefore
11276 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011277
11278/* ------------------------------ */
11279 .balign 128
11280.L_ALT_op_rem_int_2addr: /* 0xb4 */
11281/* File: mips/alt_stub.S */
11282/*
11283 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11284 * any interesting requests and then jump to the real instruction
11285 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11286 */
11287 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011288 la ra, artMterpAsmInstructionStart + (180 * 128) # Addr of primary handler
11289 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11290 move a0, rSELF # arg0
11291 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011292 move a2, rPC
11293 la t9, MterpCheckBefore
11294 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011295
11296/* ------------------------------ */
11297 .balign 128
11298.L_ALT_op_and_int_2addr: /* 0xb5 */
11299/* File: mips/alt_stub.S */
11300/*
11301 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11302 * any interesting requests and then jump to the real instruction
11303 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11304 */
11305 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011306 la ra, artMterpAsmInstructionStart + (181 * 128) # Addr of primary handler
11307 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11308 move a0, rSELF # arg0
11309 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011310 move a2, rPC
11311 la t9, MterpCheckBefore
11312 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011313
11314/* ------------------------------ */
11315 .balign 128
11316.L_ALT_op_or_int_2addr: /* 0xb6 */
11317/* File: mips/alt_stub.S */
11318/*
11319 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11320 * any interesting requests and then jump to the real instruction
11321 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11322 */
11323 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011324 la ra, artMterpAsmInstructionStart + (182 * 128) # Addr of primary handler
11325 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11326 move a0, rSELF # arg0
11327 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011328 move a2, rPC
11329 la t9, MterpCheckBefore
11330 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011331
11332/* ------------------------------ */
11333 .balign 128
11334.L_ALT_op_xor_int_2addr: /* 0xb7 */
11335/* File: mips/alt_stub.S */
11336/*
11337 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11338 * any interesting requests and then jump to the real instruction
11339 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11340 */
11341 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011342 la ra, artMterpAsmInstructionStart + (183 * 128) # Addr of primary handler
11343 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11344 move a0, rSELF # arg0
11345 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011346 move a2, rPC
11347 la t9, MterpCheckBefore
11348 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011349
11350/* ------------------------------ */
11351 .balign 128
11352.L_ALT_op_shl_int_2addr: /* 0xb8 */
11353/* File: mips/alt_stub.S */
11354/*
11355 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11356 * any interesting requests and then jump to the real instruction
11357 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11358 */
11359 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011360 la ra, artMterpAsmInstructionStart + (184 * 128) # Addr of primary handler
11361 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11362 move a0, rSELF # arg0
11363 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011364 move a2, rPC
11365 la t9, MterpCheckBefore
11366 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011367
11368/* ------------------------------ */
11369 .balign 128
11370.L_ALT_op_shr_int_2addr: /* 0xb9 */
11371/* File: mips/alt_stub.S */
11372/*
11373 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11374 * any interesting requests and then jump to the real instruction
11375 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11376 */
11377 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011378 la ra, artMterpAsmInstructionStart + (185 * 128) # Addr of primary handler
11379 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11380 move a0, rSELF # arg0
11381 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011382 move a2, rPC
11383 la t9, MterpCheckBefore
11384 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011385
11386/* ------------------------------ */
11387 .balign 128
11388.L_ALT_op_ushr_int_2addr: /* 0xba */
11389/* File: mips/alt_stub.S */
11390/*
11391 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11392 * any interesting requests and then jump to the real instruction
11393 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11394 */
11395 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011396 la ra, artMterpAsmInstructionStart + (186 * 128) # Addr of primary handler
11397 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11398 move a0, rSELF # arg0
11399 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011400 move a2, rPC
11401 la t9, MterpCheckBefore
11402 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011403
11404/* ------------------------------ */
11405 .balign 128
11406.L_ALT_op_add_long_2addr: /* 0xbb */
11407/* File: mips/alt_stub.S */
11408/*
11409 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11410 * any interesting requests and then jump to the real instruction
11411 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11412 */
11413 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011414 la ra, artMterpAsmInstructionStart + (187 * 128) # Addr of primary handler
11415 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11416 move a0, rSELF # arg0
11417 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011418 move a2, rPC
11419 la t9, MterpCheckBefore
11420 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011421
11422/* ------------------------------ */
11423 .balign 128
11424.L_ALT_op_sub_long_2addr: /* 0xbc */
11425/* File: mips/alt_stub.S */
11426/*
11427 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11428 * any interesting requests and then jump to the real instruction
11429 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11430 */
11431 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011432 la ra, artMterpAsmInstructionStart + (188 * 128) # Addr of primary handler
11433 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11434 move a0, rSELF # arg0
11435 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011436 move a2, rPC
11437 la t9, MterpCheckBefore
11438 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011439
11440/* ------------------------------ */
11441 .balign 128
11442.L_ALT_op_mul_long_2addr: /* 0xbd */
11443/* File: mips/alt_stub.S */
11444/*
11445 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11446 * any interesting requests and then jump to the real instruction
11447 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11448 */
11449 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011450 la ra, artMterpAsmInstructionStart + (189 * 128) # Addr of primary handler
11451 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11452 move a0, rSELF # arg0
11453 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011454 move a2, rPC
11455 la t9, MterpCheckBefore
11456 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011457
11458/* ------------------------------ */
11459 .balign 128
11460.L_ALT_op_div_long_2addr: /* 0xbe */
11461/* File: mips/alt_stub.S */
11462/*
11463 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11464 * any interesting requests and then jump to the real instruction
11465 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11466 */
11467 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011468 la ra, artMterpAsmInstructionStart + (190 * 128) # Addr of primary handler
11469 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11470 move a0, rSELF # arg0
11471 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011472 move a2, rPC
11473 la t9, MterpCheckBefore
11474 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011475
11476/* ------------------------------ */
11477 .balign 128
11478.L_ALT_op_rem_long_2addr: /* 0xbf */
11479/* File: mips/alt_stub.S */
11480/*
11481 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11482 * any interesting requests and then jump to the real instruction
11483 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11484 */
11485 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011486 la ra, artMterpAsmInstructionStart + (191 * 128) # Addr of primary handler
11487 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11488 move a0, rSELF # arg0
11489 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011490 move a2, rPC
11491 la t9, MterpCheckBefore
11492 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011493
11494/* ------------------------------ */
11495 .balign 128
11496.L_ALT_op_and_long_2addr: /* 0xc0 */
11497/* File: mips/alt_stub.S */
11498/*
11499 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11500 * any interesting requests and then jump to the real instruction
11501 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11502 */
11503 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011504 la ra, artMterpAsmInstructionStart + (192 * 128) # Addr of primary handler
11505 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11506 move a0, rSELF # arg0
11507 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011508 move a2, rPC
11509 la t9, MterpCheckBefore
11510 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011511
11512/* ------------------------------ */
11513 .balign 128
11514.L_ALT_op_or_long_2addr: /* 0xc1 */
11515/* File: mips/alt_stub.S */
11516/*
11517 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11518 * any interesting requests and then jump to the real instruction
11519 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11520 */
11521 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011522 la ra, artMterpAsmInstructionStart + (193 * 128) # Addr of primary handler
11523 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11524 move a0, rSELF # arg0
11525 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011526 move a2, rPC
11527 la t9, MterpCheckBefore
11528 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011529
11530/* ------------------------------ */
11531 .balign 128
11532.L_ALT_op_xor_long_2addr: /* 0xc2 */
11533/* File: mips/alt_stub.S */
11534/*
11535 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11536 * any interesting requests and then jump to the real instruction
11537 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11538 */
11539 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011540 la ra, artMterpAsmInstructionStart + (194 * 128) # Addr of primary handler
11541 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11542 move a0, rSELF # arg0
11543 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011544 move a2, rPC
11545 la t9, MterpCheckBefore
11546 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011547
11548/* ------------------------------ */
11549 .balign 128
11550.L_ALT_op_shl_long_2addr: /* 0xc3 */
11551/* File: mips/alt_stub.S */
11552/*
11553 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11554 * any interesting requests and then jump to the real instruction
11555 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11556 */
11557 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011558 la ra, artMterpAsmInstructionStart + (195 * 128) # Addr of primary handler
11559 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11560 move a0, rSELF # arg0
11561 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011562 move a2, rPC
11563 la t9, MterpCheckBefore
11564 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011565
11566/* ------------------------------ */
11567 .balign 128
11568.L_ALT_op_shr_long_2addr: /* 0xc4 */
11569/* File: mips/alt_stub.S */
11570/*
11571 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11572 * any interesting requests and then jump to the real instruction
11573 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11574 */
11575 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011576 la ra, artMterpAsmInstructionStart + (196 * 128) # Addr of primary handler
11577 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11578 move a0, rSELF # arg0
11579 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011580 move a2, rPC
11581 la t9, MterpCheckBefore
11582 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011583
11584/* ------------------------------ */
11585 .balign 128
11586.L_ALT_op_ushr_long_2addr: /* 0xc5 */
11587/* File: mips/alt_stub.S */
11588/*
11589 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11590 * any interesting requests and then jump to the real instruction
11591 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11592 */
11593 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011594 la ra, artMterpAsmInstructionStart + (197 * 128) # Addr of primary handler
11595 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11596 move a0, rSELF # arg0
11597 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011598 move a2, rPC
11599 la t9, MterpCheckBefore
11600 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011601
11602/* ------------------------------ */
11603 .balign 128
11604.L_ALT_op_add_float_2addr: /* 0xc6 */
11605/* File: mips/alt_stub.S */
11606/*
11607 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11608 * any interesting requests and then jump to the real instruction
11609 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11610 */
11611 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011612 la ra, artMterpAsmInstructionStart + (198 * 128) # Addr of primary handler
11613 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11614 move a0, rSELF # arg0
11615 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011616 move a2, rPC
11617 la t9, MterpCheckBefore
11618 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011619
11620/* ------------------------------ */
11621 .balign 128
11622.L_ALT_op_sub_float_2addr: /* 0xc7 */
11623/* File: mips/alt_stub.S */
11624/*
11625 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11626 * any interesting requests and then jump to the real instruction
11627 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11628 */
11629 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011630 la ra, artMterpAsmInstructionStart + (199 * 128) # Addr of primary handler
11631 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11632 move a0, rSELF # arg0
11633 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011634 move a2, rPC
11635 la t9, MterpCheckBefore
11636 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011637
11638/* ------------------------------ */
11639 .balign 128
11640.L_ALT_op_mul_float_2addr: /* 0xc8 */
11641/* File: mips/alt_stub.S */
11642/*
11643 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11644 * any interesting requests and then jump to the real instruction
11645 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11646 */
11647 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011648 la ra, artMterpAsmInstructionStart + (200 * 128) # Addr of primary handler
11649 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11650 move a0, rSELF # arg0
11651 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011652 move a2, rPC
11653 la t9, MterpCheckBefore
11654 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011655
11656/* ------------------------------ */
11657 .balign 128
11658.L_ALT_op_div_float_2addr: /* 0xc9 */
11659/* File: mips/alt_stub.S */
11660/*
11661 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11662 * any interesting requests and then jump to the real instruction
11663 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11664 */
11665 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011666 la ra, artMterpAsmInstructionStart + (201 * 128) # Addr of primary handler
11667 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11668 move a0, rSELF # arg0
11669 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011670 move a2, rPC
11671 la t9, MterpCheckBefore
11672 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011673
11674/* ------------------------------ */
11675 .balign 128
11676.L_ALT_op_rem_float_2addr: /* 0xca */
11677/* File: mips/alt_stub.S */
11678/*
11679 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11680 * any interesting requests and then jump to the real instruction
11681 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11682 */
11683 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011684 la ra, artMterpAsmInstructionStart + (202 * 128) # Addr of primary handler
11685 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11686 move a0, rSELF # arg0
11687 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011688 move a2, rPC
11689 la t9, MterpCheckBefore
11690 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011691
11692/* ------------------------------ */
11693 .balign 128
11694.L_ALT_op_add_double_2addr: /* 0xcb */
11695/* File: mips/alt_stub.S */
11696/*
11697 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11698 * any interesting requests and then jump to the real instruction
11699 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11700 */
11701 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011702 la ra, artMterpAsmInstructionStart + (203 * 128) # Addr of primary handler
11703 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11704 move a0, rSELF # arg0
11705 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011706 move a2, rPC
11707 la t9, MterpCheckBefore
11708 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011709
11710/* ------------------------------ */
11711 .balign 128
11712.L_ALT_op_sub_double_2addr: /* 0xcc */
11713/* File: mips/alt_stub.S */
11714/*
11715 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11716 * any interesting requests and then jump to the real instruction
11717 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11718 */
11719 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011720 la ra, artMterpAsmInstructionStart + (204 * 128) # Addr of primary handler
11721 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11722 move a0, rSELF # arg0
11723 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011724 move a2, rPC
11725 la t9, MterpCheckBefore
11726 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011727
11728/* ------------------------------ */
11729 .balign 128
11730.L_ALT_op_mul_double_2addr: /* 0xcd */
11731/* File: mips/alt_stub.S */
11732/*
11733 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11734 * any interesting requests and then jump to the real instruction
11735 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11736 */
11737 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011738 la ra, artMterpAsmInstructionStart + (205 * 128) # Addr of primary handler
11739 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11740 move a0, rSELF # arg0
11741 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011742 move a2, rPC
11743 la t9, MterpCheckBefore
11744 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011745
11746/* ------------------------------ */
11747 .balign 128
11748.L_ALT_op_div_double_2addr: /* 0xce */
11749/* File: mips/alt_stub.S */
11750/*
11751 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11752 * any interesting requests and then jump to the real instruction
11753 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11754 */
11755 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011756 la ra, artMterpAsmInstructionStart + (206 * 128) # Addr of primary handler
11757 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11758 move a0, rSELF # arg0
11759 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011760 move a2, rPC
11761 la t9, MterpCheckBefore
11762 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011763
11764/* ------------------------------ */
11765 .balign 128
11766.L_ALT_op_rem_double_2addr: /* 0xcf */
11767/* File: mips/alt_stub.S */
11768/*
11769 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11770 * any interesting requests and then jump to the real instruction
11771 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11772 */
11773 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011774 la ra, artMterpAsmInstructionStart + (207 * 128) # Addr of primary handler
11775 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11776 move a0, rSELF # arg0
11777 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011778 move a2, rPC
11779 la t9, MterpCheckBefore
11780 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011781
11782/* ------------------------------ */
11783 .balign 128
11784.L_ALT_op_add_int_lit16: /* 0xd0 */
11785/* File: mips/alt_stub.S */
11786/*
11787 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11788 * any interesting requests and then jump to the real instruction
11789 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11790 */
11791 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011792 la ra, artMterpAsmInstructionStart + (208 * 128) # Addr of primary handler
11793 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11794 move a0, rSELF # arg0
11795 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011796 move a2, rPC
11797 la t9, MterpCheckBefore
11798 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011799
11800/* ------------------------------ */
11801 .balign 128
11802.L_ALT_op_rsub_int: /* 0xd1 */
11803/* File: mips/alt_stub.S */
11804/*
11805 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11806 * any interesting requests and then jump to the real instruction
11807 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11808 */
11809 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011810 la ra, artMterpAsmInstructionStart + (209 * 128) # Addr of primary handler
11811 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11812 move a0, rSELF # arg0
11813 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011814 move a2, rPC
11815 la t9, MterpCheckBefore
11816 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011817
11818/* ------------------------------ */
11819 .balign 128
11820.L_ALT_op_mul_int_lit16: /* 0xd2 */
11821/* File: mips/alt_stub.S */
11822/*
11823 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11824 * any interesting requests and then jump to the real instruction
11825 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11826 */
11827 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011828 la ra, artMterpAsmInstructionStart + (210 * 128) # Addr of primary handler
11829 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11830 move a0, rSELF # arg0
11831 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011832 move a2, rPC
11833 la t9, MterpCheckBefore
11834 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011835
11836/* ------------------------------ */
11837 .balign 128
11838.L_ALT_op_div_int_lit16: /* 0xd3 */
11839/* File: mips/alt_stub.S */
11840/*
11841 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11842 * any interesting requests and then jump to the real instruction
11843 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11844 */
11845 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011846 la ra, artMterpAsmInstructionStart + (211 * 128) # Addr of primary handler
11847 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11848 move a0, rSELF # arg0
11849 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011850 move a2, rPC
11851 la t9, MterpCheckBefore
11852 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011853
11854/* ------------------------------ */
11855 .balign 128
11856.L_ALT_op_rem_int_lit16: /* 0xd4 */
11857/* File: mips/alt_stub.S */
11858/*
11859 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11860 * any interesting requests and then jump to the real instruction
11861 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11862 */
11863 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011864 la ra, artMterpAsmInstructionStart + (212 * 128) # Addr of primary handler
11865 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11866 move a0, rSELF # arg0
11867 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011868 move a2, rPC
11869 la t9, MterpCheckBefore
11870 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011871
11872/* ------------------------------ */
11873 .balign 128
11874.L_ALT_op_and_int_lit16: /* 0xd5 */
11875/* File: mips/alt_stub.S */
11876/*
11877 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11878 * any interesting requests and then jump to the real instruction
11879 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11880 */
11881 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011882 la ra, artMterpAsmInstructionStart + (213 * 128) # Addr of primary handler
11883 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11884 move a0, rSELF # arg0
11885 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011886 move a2, rPC
11887 la t9, MterpCheckBefore
11888 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011889
11890/* ------------------------------ */
11891 .balign 128
11892.L_ALT_op_or_int_lit16: /* 0xd6 */
11893/* File: mips/alt_stub.S */
11894/*
11895 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11896 * any interesting requests and then jump to the real instruction
11897 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11898 */
11899 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011900 la ra, artMterpAsmInstructionStart + (214 * 128) # Addr of primary handler
11901 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11902 move a0, rSELF # arg0
11903 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011904 move a2, rPC
11905 la t9, MterpCheckBefore
11906 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011907
11908/* ------------------------------ */
11909 .balign 128
11910.L_ALT_op_xor_int_lit16: /* 0xd7 */
11911/* File: mips/alt_stub.S */
11912/*
11913 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11914 * any interesting requests and then jump to the real instruction
11915 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11916 */
11917 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011918 la ra, artMterpAsmInstructionStart + (215 * 128) # Addr of primary handler
11919 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11920 move a0, rSELF # arg0
11921 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011922 move a2, rPC
11923 la t9, MterpCheckBefore
11924 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011925
11926/* ------------------------------ */
11927 .balign 128
11928.L_ALT_op_add_int_lit8: /* 0xd8 */
11929/* File: mips/alt_stub.S */
11930/*
11931 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11932 * any interesting requests and then jump to the real instruction
11933 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11934 */
11935 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011936 la ra, artMterpAsmInstructionStart + (216 * 128) # Addr of primary handler
11937 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11938 move a0, rSELF # arg0
11939 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011940 move a2, rPC
11941 la t9, MterpCheckBefore
11942 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011943
11944/* ------------------------------ */
11945 .balign 128
11946.L_ALT_op_rsub_int_lit8: /* 0xd9 */
11947/* File: mips/alt_stub.S */
11948/*
11949 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11950 * any interesting requests and then jump to the real instruction
11951 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11952 */
11953 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011954 la ra, artMterpAsmInstructionStart + (217 * 128) # Addr of primary handler
11955 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11956 move a0, rSELF # arg0
11957 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011958 move a2, rPC
11959 la t9, MterpCheckBefore
11960 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011961
11962/* ------------------------------ */
11963 .balign 128
11964.L_ALT_op_mul_int_lit8: /* 0xda */
11965/* File: mips/alt_stub.S */
11966/*
11967 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11968 * any interesting requests and then jump to the real instruction
11969 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11970 */
11971 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011972 la ra, artMterpAsmInstructionStart + (218 * 128) # Addr of primary handler
11973 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11974 move a0, rSELF # arg0
11975 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011976 move a2, rPC
11977 la t9, MterpCheckBefore
11978 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011979
11980/* ------------------------------ */
11981 .balign 128
11982.L_ALT_op_div_int_lit8: /* 0xdb */
11983/* File: mips/alt_stub.S */
11984/*
11985 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11986 * any interesting requests and then jump to the real instruction
11987 * handler. Note that the call to MterpCheckBefore is done as a tail call.
11988 */
11989 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080011990 la ra, artMterpAsmInstructionStart + (219 * 128) # Addr of primary handler
11991 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
11992 move a0, rSELF # arg0
11993 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000011994 move a2, rPC
11995 la t9, MterpCheckBefore
11996 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080011997
11998/* ------------------------------ */
11999 .balign 128
12000.L_ALT_op_rem_int_lit8: /* 0xdc */
12001/* File: mips/alt_stub.S */
12002/*
12003 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12004 * any interesting requests and then jump to the real instruction
12005 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12006 */
12007 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012008 la ra, artMterpAsmInstructionStart + (220 * 128) # Addr of primary handler
12009 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12010 move a0, rSELF # arg0
12011 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012012 move a2, rPC
12013 la t9, MterpCheckBefore
12014 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012015
12016/* ------------------------------ */
12017 .balign 128
12018.L_ALT_op_and_int_lit8: /* 0xdd */
12019/* File: mips/alt_stub.S */
12020/*
12021 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12022 * any interesting requests and then jump to the real instruction
12023 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12024 */
12025 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012026 la ra, artMterpAsmInstructionStart + (221 * 128) # Addr of primary handler
12027 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12028 move a0, rSELF # arg0
12029 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012030 move a2, rPC
12031 la t9, MterpCheckBefore
12032 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012033
12034/* ------------------------------ */
12035 .balign 128
12036.L_ALT_op_or_int_lit8: /* 0xde */
12037/* File: mips/alt_stub.S */
12038/*
12039 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12040 * any interesting requests and then jump to the real instruction
12041 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12042 */
12043 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012044 la ra, artMterpAsmInstructionStart + (222 * 128) # Addr of primary handler
12045 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12046 move a0, rSELF # arg0
12047 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012048 move a2, rPC
12049 la t9, MterpCheckBefore
12050 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012051
12052/* ------------------------------ */
12053 .balign 128
12054.L_ALT_op_xor_int_lit8: /* 0xdf */
12055/* File: mips/alt_stub.S */
12056/*
12057 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12058 * any interesting requests and then jump to the real instruction
12059 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12060 */
12061 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012062 la ra, artMterpAsmInstructionStart + (223 * 128) # Addr of primary handler
12063 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12064 move a0, rSELF # arg0
12065 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012066 move a2, rPC
12067 la t9, MterpCheckBefore
12068 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012069
12070/* ------------------------------ */
12071 .balign 128
12072.L_ALT_op_shl_int_lit8: /* 0xe0 */
12073/* File: mips/alt_stub.S */
12074/*
12075 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12076 * any interesting requests and then jump to the real instruction
12077 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12078 */
12079 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012080 la ra, artMterpAsmInstructionStart + (224 * 128) # Addr of primary handler
12081 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12082 move a0, rSELF # arg0
12083 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012084 move a2, rPC
12085 la t9, MterpCheckBefore
12086 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012087
12088/* ------------------------------ */
12089 .balign 128
12090.L_ALT_op_shr_int_lit8: /* 0xe1 */
12091/* File: mips/alt_stub.S */
12092/*
12093 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12094 * any interesting requests and then jump to the real instruction
12095 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12096 */
12097 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012098 la ra, artMterpAsmInstructionStart + (225 * 128) # Addr of primary handler
12099 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12100 move a0, rSELF # arg0
12101 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012102 move a2, rPC
12103 la t9, MterpCheckBefore
12104 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012105
12106/* ------------------------------ */
12107 .balign 128
12108.L_ALT_op_ushr_int_lit8: /* 0xe2 */
12109/* File: mips/alt_stub.S */
12110/*
12111 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12112 * any interesting requests and then jump to the real instruction
12113 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12114 */
12115 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012116 la ra, artMterpAsmInstructionStart + (226 * 128) # Addr of primary handler
12117 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12118 move a0, rSELF # arg0
12119 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012120 move a2, rPC
12121 la t9, MterpCheckBefore
12122 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012123
12124/* ------------------------------ */
12125 .balign 128
12126.L_ALT_op_iget_quick: /* 0xe3 */
12127/* File: mips/alt_stub.S */
12128/*
12129 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12130 * any interesting requests and then jump to the real instruction
12131 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12132 */
12133 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012134 la ra, artMterpAsmInstructionStart + (227 * 128) # Addr of primary handler
12135 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12136 move a0, rSELF # arg0
12137 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012138 move a2, rPC
12139 la t9, MterpCheckBefore
12140 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012141
12142/* ------------------------------ */
12143 .balign 128
12144.L_ALT_op_iget_wide_quick: /* 0xe4 */
12145/* File: mips/alt_stub.S */
12146/*
12147 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12148 * any interesting requests and then jump to the real instruction
12149 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12150 */
12151 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012152 la ra, artMterpAsmInstructionStart + (228 * 128) # Addr of primary handler
12153 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12154 move a0, rSELF # arg0
12155 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012156 move a2, rPC
12157 la t9, MterpCheckBefore
12158 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012159
12160/* ------------------------------ */
12161 .balign 128
12162.L_ALT_op_iget_object_quick: /* 0xe5 */
12163/* File: mips/alt_stub.S */
12164/*
12165 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12166 * any interesting requests and then jump to the real instruction
12167 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12168 */
12169 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012170 la ra, artMterpAsmInstructionStart + (229 * 128) # Addr of primary handler
12171 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12172 move a0, rSELF # arg0
12173 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012174 move a2, rPC
12175 la t9, MterpCheckBefore
12176 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012177
12178/* ------------------------------ */
12179 .balign 128
12180.L_ALT_op_iput_quick: /* 0xe6 */
12181/* File: mips/alt_stub.S */
12182/*
12183 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12184 * any interesting requests and then jump to the real instruction
12185 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12186 */
12187 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012188 la ra, artMterpAsmInstructionStart + (230 * 128) # Addr of primary handler
12189 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12190 move a0, rSELF # arg0
12191 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012192 move a2, rPC
12193 la t9, MterpCheckBefore
12194 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012195
12196/* ------------------------------ */
12197 .balign 128
12198.L_ALT_op_iput_wide_quick: /* 0xe7 */
12199/* File: mips/alt_stub.S */
12200/*
12201 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12202 * any interesting requests and then jump to the real instruction
12203 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12204 */
12205 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012206 la ra, artMterpAsmInstructionStart + (231 * 128) # Addr of primary handler
12207 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12208 move a0, rSELF # arg0
12209 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012210 move a2, rPC
12211 la t9, MterpCheckBefore
12212 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012213
12214/* ------------------------------ */
12215 .balign 128
12216.L_ALT_op_iput_object_quick: /* 0xe8 */
12217/* File: mips/alt_stub.S */
12218/*
12219 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12220 * any interesting requests and then jump to the real instruction
12221 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12222 */
12223 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012224 la ra, artMterpAsmInstructionStart + (232 * 128) # Addr of primary handler
12225 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12226 move a0, rSELF # arg0
12227 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012228 move a2, rPC
12229 la t9, MterpCheckBefore
12230 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012231
12232/* ------------------------------ */
12233 .balign 128
12234.L_ALT_op_invoke_virtual_quick: /* 0xe9 */
12235/* File: mips/alt_stub.S */
12236/*
12237 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12238 * any interesting requests and then jump to the real instruction
12239 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12240 */
12241 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012242 la ra, artMterpAsmInstructionStart + (233 * 128) # Addr of primary handler
12243 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12244 move a0, rSELF # arg0
12245 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012246 move a2, rPC
12247 la t9, MterpCheckBefore
12248 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012249
12250/* ------------------------------ */
12251 .balign 128
12252.L_ALT_op_invoke_virtual_range_quick: /* 0xea */
12253/* File: mips/alt_stub.S */
12254/*
12255 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12256 * any interesting requests and then jump to the real instruction
12257 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12258 */
12259 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012260 la ra, artMterpAsmInstructionStart + (234 * 128) # Addr of primary handler
12261 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12262 move a0, rSELF # arg0
12263 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012264 move a2, rPC
12265 la t9, MterpCheckBefore
12266 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012267
12268/* ------------------------------ */
12269 .balign 128
12270.L_ALT_op_iput_boolean_quick: /* 0xeb */
12271/* File: mips/alt_stub.S */
12272/*
12273 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12274 * any interesting requests and then jump to the real instruction
12275 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12276 */
12277 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012278 la ra, artMterpAsmInstructionStart + (235 * 128) # Addr of primary handler
12279 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12280 move a0, rSELF # arg0
12281 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012282 move a2, rPC
12283 la t9, MterpCheckBefore
12284 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012285
12286/* ------------------------------ */
12287 .balign 128
12288.L_ALT_op_iput_byte_quick: /* 0xec */
12289/* File: mips/alt_stub.S */
12290/*
12291 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12292 * any interesting requests and then jump to the real instruction
12293 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12294 */
12295 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012296 la ra, artMterpAsmInstructionStart + (236 * 128) # Addr of primary handler
12297 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12298 move a0, rSELF # arg0
12299 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012300 move a2, rPC
12301 la t9, MterpCheckBefore
12302 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012303
12304/* ------------------------------ */
12305 .balign 128
12306.L_ALT_op_iput_char_quick: /* 0xed */
12307/* File: mips/alt_stub.S */
12308/*
12309 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12310 * any interesting requests and then jump to the real instruction
12311 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12312 */
12313 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012314 la ra, artMterpAsmInstructionStart + (237 * 128) # Addr of primary handler
12315 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12316 move a0, rSELF # arg0
12317 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012318 move a2, rPC
12319 la t9, MterpCheckBefore
12320 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012321
12322/* ------------------------------ */
12323 .balign 128
12324.L_ALT_op_iput_short_quick: /* 0xee */
12325/* File: mips/alt_stub.S */
12326/*
12327 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12328 * any interesting requests and then jump to the real instruction
12329 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12330 */
12331 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012332 la ra, artMterpAsmInstructionStart + (238 * 128) # Addr of primary handler
12333 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12334 move a0, rSELF # arg0
12335 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012336 move a2, rPC
12337 la t9, MterpCheckBefore
12338 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012339
12340/* ------------------------------ */
12341 .balign 128
12342.L_ALT_op_iget_boolean_quick: /* 0xef */
12343/* File: mips/alt_stub.S */
12344/*
12345 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12346 * any interesting requests and then jump to the real instruction
12347 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12348 */
12349 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012350 la ra, artMterpAsmInstructionStart + (239 * 128) # Addr of primary handler
12351 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12352 move a0, rSELF # arg0
12353 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012354 move a2, rPC
12355 la t9, MterpCheckBefore
12356 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012357
12358/* ------------------------------ */
12359 .balign 128
12360.L_ALT_op_iget_byte_quick: /* 0xf0 */
12361/* File: mips/alt_stub.S */
12362/*
12363 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12364 * any interesting requests and then jump to the real instruction
12365 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12366 */
12367 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012368 la ra, artMterpAsmInstructionStart + (240 * 128) # Addr of primary handler
12369 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12370 move a0, rSELF # arg0
12371 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012372 move a2, rPC
12373 la t9, MterpCheckBefore
12374 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012375
12376/* ------------------------------ */
12377 .balign 128
12378.L_ALT_op_iget_char_quick: /* 0xf1 */
12379/* File: mips/alt_stub.S */
12380/*
12381 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12382 * any interesting requests and then jump to the real instruction
12383 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12384 */
12385 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012386 la ra, artMterpAsmInstructionStart + (241 * 128) # Addr of primary handler
12387 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12388 move a0, rSELF # arg0
12389 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012390 move a2, rPC
12391 la t9, MterpCheckBefore
12392 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012393
12394/* ------------------------------ */
12395 .balign 128
12396.L_ALT_op_iget_short_quick: /* 0xf2 */
12397/* File: mips/alt_stub.S */
12398/*
12399 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12400 * any interesting requests and then jump to the real instruction
12401 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12402 */
12403 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012404 la ra, artMterpAsmInstructionStart + (242 * 128) # Addr of primary handler
12405 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12406 move a0, rSELF # arg0
12407 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012408 move a2, rPC
12409 la t9, MterpCheckBefore
12410 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012411
12412/* ------------------------------ */
12413 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012414.L_ALT_op_unused_f3: /* 0xf3 */
Douglas Leung200f0402016-02-25 20:05:47 -080012415/* File: mips/alt_stub.S */
12416/*
12417 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12418 * any interesting requests and then jump to the real instruction
12419 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12420 */
12421 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012422 la ra, artMterpAsmInstructionStart + (243 * 128) # Addr of primary handler
12423 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12424 move a0, rSELF # arg0
12425 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012426 move a2, rPC
12427 la t9, MterpCheckBefore
12428 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012429
12430/* ------------------------------ */
12431 .balign 128
12432.L_ALT_op_unused_f4: /* 0xf4 */
12433/* File: mips/alt_stub.S */
12434/*
12435 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12436 * any interesting requests and then jump to the real instruction
12437 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12438 */
12439 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012440 la ra, artMterpAsmInstructionStart + (244 * 128) # Addr of primary handler
12441 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12442 move a0, rSELF # arg0
12443 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012444 move a2, rPC
12445 la t9, MterpCheckBefore
12446 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012447
12448/* ------------------------------ */
12449 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012450.L_ALT_op_unused_f5: /* 0xf5 */
Douglas Leung200f0402016-02-25 20:05:47 -080012451/* File: mips/alt_stub.S */
12452/*
12453 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12454 * any interesting requests and then jump to the real instruction
12455 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12456 */
12457 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012458 la ra, artMterpAsmInstructionStart + (245 * 128) # Addr of primary handler
12459 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12460 move a0, rSELF # arg0
12461 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012462 move a2, rPC
12463 la t9, MterpCheckBefore
12464 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012465
12466/* ------------------------------ */
12467 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012468.L_ALT_op_unused_f6: /* 0xf6 */
Douglas Leung200f0402016-02-25 20:05:47 -080012469/* File: mips/alt_stub.S */
12470/*
12471 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12472 * any interesting requests and then jump to the real instruction
12473 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12474 */
12475 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012476 la ra, artMterpAsmInstructionStart + (246 * 128) # Addr of primary handler
12477 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12478 move a0, rSELF # arg0
12479 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012480 move a2, rPC
12481 la t9, MterpCheckBefore
12482 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012483
12484/* ------------------------------ */
12485 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012486.L_ALT_op_unused_f7: /* 0xf7 */
Douglas Leung200f0402016-02-25 20:05:47 -080012487/* File: mips/alt_stub.S */
12488/*
12489 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12490 * any interesting requests and then jump to the real instruction
12491 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12492 */
12493 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012494 la ra, artMterpAsmInstructionStart + (247 * 128) # Addr of primary handler
12495 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12496 move a0, rSELF # arg0
12497 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012498 move a2, rPC
12499 la t9, MterpCheckBefore
12500 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012501
12502/* ------------------------------ */
12503 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012504.L_ALT_op_unused_f8: /* 0xf8 */
Douglas Leung200f0402016-02-25 20:05:47 -080012505/* File: mips/alt_stub.S */
12506/*
12507 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12508 * any interesting requests and then jump to the real instruction
12509 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12510 */
12511 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012512 la ra, artMterpAsmInstructionStart + (248 * 128) # Addr of primary handler
12513 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12514 move a0, rSELF # arg0
12515 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012516 move a2, rPC
12517 la t9, MterpCheckBefore
12518 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012519
12520/* ------------------------------ */
12521 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012522.L_ALT_op_unused_f9: /* 0xf9 */
Douglas Leung200f0402016-02-25 20:05:47 -080012523/* File: mips/alt_stub.S */
12524/*
12525 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12526 * any interesting requests and then jump to the real instruction
12527 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12528 */
12529 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012530 la ra, artMterpAsmInstructionStart + (249 * 128) # Addr of primary handler
12531 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12532 move a0, rSELF # arg0
12533 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012534 move a2, rPC
12535 la t9, MterpCheckBefore
12536 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012537
12538/* ------------------------------ */
12539 .balign 128
12540.L_ALT_op_unused_fa: /* 0xfa */
12541/* File: mips/alt_stub.S */
12542/*
12543 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12544 * any interesting requests and then jump to the real instruction
12545 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12546 */
12547 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012548 la ra, artMterpAsmInstructionStart + (250 * 128) # Addr of primary handler
12549 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12550 move a0, rSELF # arg0
12551 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012552 move a2, rPC
12553 la t9, MterpCheckBefore
12554 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012555
12556/* ------------------------------ */
12557 .balign 128
12558.L_ALT_op_unused_fb: /* 0xfb */
12559/* File: mips/alt_stub.S */
12560/*
12561 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12562 * any interesting requests and then jump to the real instruction
12563 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12564 */
12565 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012566 la ra, artMterpAsmInstructionStart + (251 * 128) # Addr of primary handler
12567 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12568 move a0, rSELF # arg0
12569 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012570 move a2, rPC
12571 la t9, MterpCheckBefore
12572 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012573
12574/* ------------------------------ */
12575 .balign 128
12576.L_ALT_op_unused_fc: /* 0xfc */
12577/* File: mips/alt_stub.S */
12578/*
12579 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12580 * any interesting requests and then jump to the real instruction
12581 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12582 */
12583 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012584 la ra, artMterpAsmInstructionStart + (252 * 128) # Addr of primary handler
12585 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12586 move a0, rSELF # arg0
12587 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012588 move a2, rPC
12589 la t9, MterpCheckBefore
12590 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012591
12592/* ------------------------------ */
12593 .balign 128
12594.L_ALT_op_unused_fd: /* 0xfd */
12595/* File: mips/alt_stub.S */
12596/*
12597 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12598 * any interesting requests and then jump to the real instruction
12599 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12600 */
12601 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012602 la ra, artMterpAsmInstructionStart + (253 * 128) # Addr of primary handler
12603 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12604 move a0, rSELF # arg0
12605 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012606 move a2, rPC
12607 la t9, MterpCheckBefore
12608 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012609
12610/* ------------------------------ */
12611 .balign 128
12612.L_ALT_op_unused_fe: /* 0xfe */
12613/* File: mips/alt_stub.S */
12614/*
12615 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12616 * any interesting requests and then jump to the real instruction
12617 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12618 */
12619 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012620 la ra, artMterpAsmInstructionStart + (254 * 128) # Addr of primary handler
12621 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12622 move a0, rSELF # arg0
12623 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012624 move a2, rPC
12625 la t9, MterpCheckBefore
12626 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012627
12628/* ------------------------------ */
12629 .balign 128
12630.L_ALT_op_unused_ff: /* 0xff */
12631/* File: mips/alt_stub.S */
12632/*
12633 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12634 * any interesting requests and then jump to the real instruction
12635 * handler. Note that the call to MterpCheckBefore is done as a tail call.
12636 */
12637 .extern MterpCheckBefore
Douglas Leung200f0402016-02-25 20:05:47 -080012638 la ra, artMterpAsmInstructionStart + (255 * 128) # Addr of primary handler
12639 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF) # refresh IBASE
12640 move a0, rSELF # arg0
12641 addu a1, rFP, OFF_FP_SHADOWFRAME # arg1
Bill Buzbeed47fd902016-07-07 14:42:43 +000012642 move a2, rPC
12643 la t9, MterpCheckBefore
12644 jalr zero, t9 # Tail call to Mterp(self, shadow_frame, dex_pc_ptr)
Douglas Leung200f0402016-02-25 20:05:47 -080012645
12646 .balign 128
12647 .size artMterpAsmAltInstructionStart, .-artMterpAsmAltInstructionStart
12648 .global artMterpAsmAltInstructionEnd
12649artMterpAsmAltInstructionEnd:
12650/* File: mips/footer.S */
12651/*
12652 * ===========================================================================
12653 * Common subroutines and data
12654 * ===========================================================================
12655 */
12656
12657 .text
12658 .align 2
12659
12660/*
12661 * We've detected a condition that will result in an exception, but the exception
12662 * has not yet been thrown. Just bail out to the reference interpreter to deal with it.
12663 * TUNING: for consistency, we may want to just go ahead and handle these here.
12664 */
12665common_errDivideByZero:
12666 EXPORT_PC()
12667#if MTERP_LOGGING
12668 move a0, rSELF
12669 addu a1, rFP, OFF_FP_SHADOWFRAME
12670 JAL(MterpLogDivideByZeroException)
12671#endif
12672 b MterpCommonFallback
12673
12674common_errArrayIndex:
12675 EXPORT_PC()
12676#if MTERP_LOGGING
12677 move a0, rSELF
12678 addu a1, rFP, OFF_FP_SHADOWFRAME
12679 JAL(MterpLogArrayIndexException)
12680#endif
12681 b MterpCommonFallback
12682
12683common_errNegativeArraySize:
12684 EXPORT_PC()
12685#if MTERP_LOGGING
12686 move a0, rSELF
12687 addu a1, rFP, OFF_FP_SHADOWFRAME
12688 JAL(MterpLogNegativeArraySizeException)
12689#endif
12690 b MterpCommonFallback
12691
12692common_errNoSuchMethod:
12693 EXPORT_PC()
12694#if MTERP_LOGGING
12695 move a0, rSELF
12696 addu a1, rFP, OFF_FP_SHADOWFRAME
12697 JAL(MterpLogNoSuchMethodException)
12698#endif
12699 b MterpCommonFallback
12700
12701common_errNullObject:
12702 EXPORT_PC()
12703#if MTERP_LOGGING
12704 move a0, rSELF
12705 addu a1, rFP, OFF_FP_SHADOWFRAME
12706 JAL(MterpLogNullObjectException)
12707#endif
12708 b MterpCommonFallback
12709
12710common_exceptionThrown:
12711 EXPORT_PC()
12712#if MTERP_LOGGING
12713 move a0, rSELF
12714 addu a1, rFP, OFF_FP_SHADOWFRAME
12715 JAL(MterpLogExceptionThrownException)
12716#endif
12717 b MterpCommonFallback
12718
12719MterpSuspendFallback:
12720 EXPORT_PC()
12721#if MTERP_LOGGING
12722 move a0, rSELF
12723 addu a1, rFP, OFF_FP_SHADOWFRAME
12724 lw a2, THREAD_FLAGS_OFFSET(rSELF)
12725 JAL(MterpLogSuspendFallback)
12726#endif
12727 b MterpCommonFallback
12728
12729/*
12730 * If we're here, something is out of the ordinary. If there is a pending
12731 * exception, handle it. Otherwise, roll back and retry with the reference
12732 * interpreter.
12733 */
12734MterpPossibleException:
12735 lw a0, THREAD_EXCEPTION_OFFSET(rSELF)
12736 beqz a0, MterpFallback # If exception, fall back to reference interpreter.
12737 /* intentional fallthrough - handle pending exception. */
12738/*
12739 * On return from a runtime helper routine, we've found a pending exception.
12740 * Can we handle it here - or need to bail out to caller?
12741 *
12742 */
12743MterpException:
12744 move a0, rSELF
12745 addu a1, rFP, OFF_FP_SHADOWFRAME
12746 JAL(MterpHandleException) # (self, shadow_frame)
12747 beqz v0, MterpExceptionReturn # no local catch, back to caller.
12748 lw a0, OFF_FP_CODE_ITEM(rFP)
12749 lw a1, OFF_FP_DEX_PC(rFP)
12750 lw rIBASE, THREAD_CURRENT_IBASE_OFFSET(rSELF)
12751 addu rPC, a0, CODEITEM_INSNS_OFFSET
12752 sll a1, a1, 1
12753 addu rPC, rPC, a1 # generate new dex_pc_ptr
12754 /* Do we need to switch interpreters? */
12755 JAL(MterpShouldSwitchInterpreters)
12756 bnez v0, MterpFallback
12757 /* resume execution at catch block */
12758 EXPORT_PC()
12759 FETCH_INST()
12760 GET_INST_OPCODE(t0)
12761 GOTO_OPCODE(t0)
12762 /* NOTE: no fallthrough */
12763
12764/*
Douglas Leung020b18a2016-06-03 18:05:35 -070012765 * Common handling for branches with support for Jit profiling.
12766 * On entry:
12767 * rINST <= signed offset
12768 * rPROFILE <= signed hotness countdown (expanded to 32 bits)
12769 *
12770 * We have quite a few different cases for branch profiling, OSR detection and
12771 * suspend check support here.
12772 *
12773 * Taken backward branches:
12774 * If profiling active, do hotness countdown and report if we hit zero.
12775 * If in osr check mode, see if our target is a compiled loop header entry and do OSR if so.
12776 * Is there a pending suspend request? If so, suspend.
12777 *
12778 * Taken forward branches and not-taken backward branches:
12779 * If in osr check mode, see if our target is a compiled loop header entry and do OSR if so.
12780 *
12781 * Our most common case is expected to be a taken backward branch with active jit profiling,
12782 * but no full OSR check and no pending suspend request.
12783 * Next most common case is not-taken branch with no full OSR check.
Douglas Leung200f0402016-02-25 20:05:47 -080012784 */
Douglas Leung020b18a2016-06-03 18:05:35 -070012785MterpCommonTakenBranchNoFlags:
12786 bgtz rINST, .L_forward_branch # don't add forward branches to hotness
12787/*
12788 * We need to subtract 1 from positive values and we should not see 0 here,
12789 * so we may use the result of the comparison with -1.
12790 */
12791#if JIT_CHECK_OSR != -1
12792# error "JIT_CHECK_OSR must be -1."
12793#endif
12794 li t0, JIT_CHECK_OSR
12795 beq rPROFILE, t0, .L_osr_check
12796 blt rPROFILE, t0, .L_resume_backward_branch
12797 subu rPROFILE, 1
12798 beqz rPROFILE, .L_add_batch # counted down to zero - report
12799.L_resume_backward_branch:
12800 lw ra, THREAD_FLAGS_OFFSET(rSELF)
12801 REFRESH_IBASE()
12802 addu a2, rINST, rINST # a2<- byte offset
12803 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -080012804 and ra, (THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST)
Douglas Leung020b18a2016-06-03 18:05:35 -070012805 bnez ra, .L_suspend_request_pending
Douglas Leung200f0402016-02-25 20:05:47 -080012806 GET_INST_OPCODE(t0) # extract opcode from rINST
12807 GOTO_OPCODE(t0) # jump to next instruction
Douglas Leung020b18a2016-06-03 18:05:35 -070012808
12809.L_suspend_request_pending:
Douglas Leung200f0402016-02-25 20:05:47 -080012810 EXPORT_PC()
12811 move a0, rSELF
12812 JAL(MterpSuspendCheck) # (self)
12813 bnez v0, MterpFallback
Douglas Leung020b18a2016-06-03 18:05:35 -070012814 REFRESH_IBASE() # might have changed during suspend
12815 GET_INST_OPCODE(t0) # extract opcode from rINST
12816 GOTO_OPCODE(t0) # jump to next instruction
12817
12818.L_no_count_backwards:
12819 li t0, JIT_CHECK_OSR # check for possible OSR re-entry
12820 bne rPROFILE, t0, .L_resume_backward_branch
12821.L_osr_check:
12822 move a0, rSELF
12823 addu a1, rFP, OFF_FP_SHADOWFRAME
12824 move a2, rINST
12825 EXPORT_PC()
12826 JAL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12827 bnez v0, MterpOnStackReplacement
12828 b .L_resume_backward_branch
12829
12830.L_forward_branch:
12831 li t0, JIT_CHECK_OSR # check for possible OSR re-entry
12832 beq rPROFILE, t0, .L_check_osr_forward
12833.L_resume_forward_branch:
12834 add a2, rINST, rINST # a2<- byte offset
12835 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST
12836 GET_INST_OPCODE(t0) # extract opcode from rINST
12837 GOTO_OPCODE(t0) # jump to next instruction
12838
12839.L_check_osr_forward:
12840 move a0, rSELF
12841 addu a1, rFP, OFF_FP_SHADOWFRAME
12842 move a2, rINST
12843 EXPORT_PC()
12844 JAL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12845 bnez v0, MterpOnStackReplacement
12846 b .L_resume_forward_branch
12847
12848.L_add_batch:
12849 addu a1, rFP, OFF_FP_SHADOWFRAME
12850 sh rPROFILE, SHADOWFRAME_HOTNESS_COUNTDOWN_OFFSET(a1)
12851 lw a0, OFF_FP_METHOD(rFP)
12852 move a2, rSELF
12853 JAL(MterpAddHotnessBatch) # (method, shadow_frame, self)
12854 move rPROFILE, v0 # restore new hotness countdown to rPROFILE
12855 b .L_no_count_backwards
12856
12857/*
12858 * Entered from the conditional branch handlers when OSR check request active on
12859 * not-taken path. All Dalvik not-taken conditional branch offsets are 2.
12860 */
12861.L_check_not_taken_osr:
12862 move a0, rSELF
12863 addu a1, rFP, OFF_FP_SHADOWFRAME
12864 li a2, 2
12865 EXPORT_PC()
12866 JAL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12867 bnez v0, MterpOnStackReplacement
12868 FETCH_ADVANCE_INST(2)
Douglas Leung200f0402016-02-25 20:05:47 -080012869 GET_INST_OPCODE(t0) # extract opcode from rINST
12870 GOTO_OPCODE(t0) # jump to next instruction
12871
12872/*
12873 * On-stack replacement has happened, and now we've returned from the compiled method.
12874 */
12875MterpOnStackReplacement:
12876#if MTERP_LOGGING
12877 move a0, rSELF
12878 addu a1, rFP, OFF_FP_SHADOWFRAME
12879 move a2, rINST
12880 JAL(MterpLogOSR)
12881#endif
12882 li v0, 1 # Signal normal return
12883 b MterpDone
12884
12885/*
12886 * Bail out to reference interpreter.
12887 */
12888MterpFallback:
12889 EXPORT_PC()
12890#if MTERP_LOGGING
12891 move a0, rSELF
12892 addu a1, rFP, OFF_FP_SHADOWFRAME
12893 JAL(MterpLogFallback)
12894#endif
12895MterpCommonFallback:
12896 move v0, zero # signal retry with reference interpreter.
12897 b MterpDone
12898/*
12899 * We pushed some registers on the stack in ExecuteMterpImpl, then saved
12900 * SP and LR. Here we restore SP, restore the registers, and then restore
12901 * LR to PC.
12902 *
12903 * On entry:
12904 * uint32_t* rFP (should still be live, pointer to base of vregs)
12905 */
12906MterpExceptionReturn:
12907 li v0, 1 # signal return to caller.
12908 b MterpDone
12909MterpReturn:
12910 lw a2, OFF_FP_RESULT_REGISTER(rFP)
12911 sw v0, 0(a2)
12912 sw v1, 4(a2)
12913 li v0, 1 # signal return to caller.
12914MterpDone:
Douglas Leung020b18a2016-06-03 18:05:35 -070012915/*
12916 * At this point, we expect rPROFILE to be non-zero. If negative, hotness is disabled or we're
12917 * checking for OSR. If greater than zero, we might have unreported hotness to register
12918 * (the difference between the ending rPROFILE and the cached hotness counter). rPROFILE
12919 * should only reach zero immediately after a hotness decrement, and is then reset to either
12920 * a negative special state or the new non-zero countdown value.
12921 */
12922 blez rPROFILE, .L_pop_and_return # if > 0, we may have some counts to report.
12923
12924MterpProfileActive:
12925 move rINST, v0 # stash return value
12926 /* Report cached hotness counts */
12927 lw a0, OFF_FP_METHOD(rFP)
12928 addu a1, rFP, OFF_FP_SHADOWFRAME
12929 move a2, rSELF
12930 sh rPROFILE, SHADOWFRAME_HOTNESS_COUNTDOWN_OFFSET(a1)
12931 JAL(MterpAddHotnessBatch) # (method, shadow_frame, self)
12932 move v0, rINST # restore return value
12933
12934.L_pop_and_return:
Douglas Leung200f0402016-02-25 20:05:47 -080012935/* Restore from the stack and return. Frame size = STACK_SIZE */
12936 STACK_LOAD_FULL()
12937 jalr zero, ra
12938
12939 .end ExecuteMterpImpl
12940