1/* 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#include "../common/asm-constants.h" 9#include "../common/mips-defines.h" 10#include <asm/regdef.h> 11#include <asm/fpregdef.h> 12 13#ifdef __mips_hard_float 14#define HARD_FLOAT 15#else 16#define SOFT_FLOAT 17#endif 18 19#if (__mips==32) && (__mips_isa_rev>=2) 20#define MIPS32R2 21#endif 22 23/* MIPS definitions and declarations 24 25 reg nick purpose 26 s0 rPC interpreted program counter, used for fetching instructions 27 s1 rFP interpreted frame pointer, used for accessing locals and args 28 s2 rSELF self (Thread) pointer 29 s3 rIBASE interpreted instruction base pointer, used for computed goto 30 s4 rINST first 16-bit code unit of current instruction 31*/ 32 33 34/* single-purpose registers, given names for clarity */ 35#define rPC s0 36#define rFP s1 37#define rSELF s2 38#define rIBASE s3 39#define rINST s4 40#define rOBJ s5 41#define rBIX s6 42#define rTEMP s7 43 44/* The long arguments sent to function calls in Big-endian mode should be register 45swapped when sent to functions in little endian mode. In other words long variable 46sent as a0(MSW), a1(LSW) for a function call in LE mode should be sent as a1, a0 in 47Big Endian mode */ 48 49#ifdef HAVE_LITTLE_ENDIAN 50#define rARG0 a0 51#define rARG1 a1 52#define rARG2 a2 53#define rARG3 a3 54#define rRESULT0 v0 55#define rRESULT1 v1 56#else 57#define rARG0 a1 58#define rARG1 a0 59#define rARG2 a3 60#define rARG3 a2 61#define rRESULT0 v1 62#define rRESULT1 v0 63#endif 64 65 66/* save/restore the PC and/or FP from the glue struct */ 67#define LOAD_PC_FROM_SELF() lw rPC, offThread_pc(rSELF) 68#define SAVE_PC_TO_SELF() sw rPC, offThread_pc(rSELF) 69#define LOAD_FP_FROM_SELF() lw rFP, offThread_curFrame(rSELF) 70#define SAVE_FP_TO_SELF() sw rFP, offThread_curFrame(rSELF) 71#define LOAD_PC_FP_FROM_SELF() \ 72 LOAD_PC_FROM_SELF(); \ 73 LOAD_FP_FROM_SELF() 74#define SAVE_PC_FP_TO_SELF() \ 75 SAVE_PC_TO_SELF(); \ 76 SAVE_FP_TO_SELF() 77 78#define EXPORT_PC() \ 79 sw rPC, (offStackSaveArea_currentPc - sizeofStackSaveArea)(rFP) 80 81#define SAVEAREA_FROM_FP(rd, _fpreg) \ 82 subu rd, _fpreg, sizeofStackSaveArea 83 84#define FETCH_INST() lhu rINST, (rPC) 85 86#define FETCH_ADVANCE_INST(_count) lhu rINST, ((_count)*2)(rPC); \ 87 addu rPC, rPC, ((_count) * 2) 88 89#define PREFETCH_ADVANCE_INST(_dreg, _sreg, _count) \ 90 lhu _dreg, ((_count)*2)(_sreg) ; \ 91 addu _sreg, _sreg, (_count)*2 92 93#define FETCH_ADVANCE_INST_RB(rd) addu rPC, rPC, rd; \ 94 lhu rINST, (rPC) 95 96#define FETCH(rd, _count) lhu rd, ((_count) * 2)(rPC) 97#define FETCH_S(rd, _count) lh rd, ((_count) * 2)(rPC) 98 99#ifdef HAVE_LITTLE_ENDIAN 100 101#define FETCH_B(rd, _count) lbu rd, ((_count) * 2)(rPC) 102#define FETCH_C(rd, _count) lbu rd, ((_count) * 2 + 1)(rPC) 103 104#else 105 106#define FETCH_B(rd, _count) lbu rd, ((_count) * 2 + 1)(rPC) 107#define FETCH_C(rd, _count) lbu rd, ((_count) * 2)(rPC) 108 109#endif 110 111#define GET_INST_OPCODE(rd) and rd, rINST, 0xFF 112 113/* 114 * Put the prefetched instruction's opcode field into the specified register. 115 */ 116 117#define GET_PREFETCHED_OPCODE(dreg, sreg) andi dreg, sreg, 255 118 119#define GOTO_OPCODE(rd) sll rd, rd, 7; \ 120 addu rd, rIBASE, rd; \ 121 jr rd 122 123#define GOTO_OPCODE_BASE(_base, rd) sll rd, rd, 7; \ 124 addu rd, _base, rd; \ 125 jr rd 126 127#define GET_VREG(rd, rix) LOAD_eas2(rd, rFP, rix) 128 129#define GET_VREG_F(rd, rix) EAS2(AT, rFP, rix); \ 130 .set noat; l.s rd, (AT); .set at 131 132#define SET_VREG(rd, rix) STORE_eas2(rd, rFP, rix) 133 134#define SET_VREG_GOTO(rd, rix, dst) .set noreorder; \ 135 sll dst, dst, 7; \ 136 addu dst, rIBASE, dst; \ 137 sll t8, rix, 2; \ 138 addu t8, t8, rFP; \ 139 jr dst; \ 140 sw rd, 0(t8); \ 141 .set reorder 142 143#define SET_VREG_F(rd, rix) EAS2(AT, rFP, rix); \ 144 .set noat; s.s rd, (AT); .set at 145 146 147#define GET_OPA(rd) srl rd, rINST, 8 148#ifndef MIPS32R2 149#define GET_OPA4(rd) GET_OPA(rd); and rd, 0xf 150#else 151#define GET_OPA4(rd) ext rd, rINST, 8, 4 152#endif 153#define GET_OPB(rd) srl rd, rINST, 12 154 155#define LOAD_rSELF_OFF(rd, off) lw rd, offThread_##off## (rSELF) 156 157#define LOAD_rSELF_method(rd) LOAD_rSELF_OFF(rd, method) 158#define LOAD_rSELF_methodClassDex(rd) LOAD_rSELF_OFF(rd, methodClassDex) 159#define LOAD_rSELF_interpStackEnd(rd) LOAD_rSELF_OFF(rd, interpStackEnd) 160#define LOAD_rSELF_retval(rd) LOAD_rSELF_OFF(rd, retval) 161#define LOAD_rSELF_pActiveProfilers(rd) LOAD_rSELF_OFF(rd, pActiveProfilers) 162#define LOAD_rSELF_bailPtr(rd) LOAD_rSELF_OFF(rd, bailPtr) 163#define LOAD_rSELF_SelfSuspendCount(rd) LOAD_rSELF_OFF(rd, SelfSuspendCount) 164 165 166/* 167 * Form an Effective Address rd = rbase + roff<<n; 168 * Uses reg AT 169 */ 170#define EASN(rd, rbase, roff, rshift) .set noat; \ 171 sll AT, roff, rshift; \ 172 addu rd, rbase, AT; \ 173 .set at 174 175#define EAS1(rd, rbase, roff) EASN(rd, rbase, roff, 1) 176#define EAS2(rd, rbase, roff) EASN(rd, rbase, roff, 2) 177#define EAS3(rd, rbase, roff) EASN(rd, rbase, roff, 3) 178#define EAS4(rd, rbase, roff) EASN(rd, rbase, roff, 4) 179 180/* 181 * Form an Effective Shift Right rd = rbase + roff>>n; 182 * Uses reg AT 183 */ 184#define ESRN(rd, rbase, roff, rshift) .set noat; \ 185 srl AT, roff, rshift; \ 186 addu rd, rbase, AT; \ 187 .set at 188 189#define LOAD_eas2(rd, rbase, roff) EAS2(AT, rbase, roff); \ 190 .set noat; lw rd, 0(AT); .set at 191 192#define STORE_eas2(rd, rbase, roff) EAS2(AT, rbase, roff); \ 193 .set noat; sw rd, 0(AT); .set at 194 195#define LOAD_RB_OFF(rd, rbase, off) lw rd, off(rbase) 196#define LOADu2_RB_OFF(rd, rbase, off) lhu rd, off(rbase) 197#define STORE_RB_OFF(rd, rbase, off) sw rd, off(rbase) 198 199#ifdef HAVE_LITTLE_ENDIAN 200 201#define STORE64_off(rlo, rhi, rbase, off) sw rlo, off(rbase); \ 202 sw rhi, (off+4)(rbase) 203#define LOAD64_off(rlo, rhi, rbase, off) lw rlo, off(rbase); \ 204 lw rhi, (off+4)(rbase) 205 206#define vSTORE64_off(rlo, rhi, rbase, off) sw rlo, off(rbase); \ 207 sw rhi, (off+4)(rbase) 208#define vLOAD64_off(rlo, rhi, rbase, off) lw rlo, off(rbase); \ 209 lw rhi, (off+4)(rbase) 210 211#define STORE64_off_F(rlo, rhi, rbase, off) s.s rlo, off(rbase); \ 212 s.s rhi, (off+4)(rbase) 213#define LOAD64_off_F(rlo, rhi, rbase, off) l.s rlo, off(rbase); \ 214 l.s rhi, (off+4)(rbase) 215#else 216 217#define STORE64_off(rlo, rhi, rbase, off) sw rlo, (off+4)(rbase); \ 218 sw rhi, (off)(rbase) 219#define LOAD64_off(rlo, rhi, rbase, off) lw rlo, (off+4)(rbase); \ 220 lw rhi, (off)(rbase) 221#define vSTORE64_off(rlo, rhi, rbase, off) sw rlo, (off+4)(rbase); \ 222 sw rhi, (off)(rbase) 223#define vLOAD64_off(rlo, rhi, rbase, off) lw rlo, (off+4)(rbase); \ 224 lw rhi, (off)(rbase) 225#define STORE64_off_F(rlo, rhi, rbase, off) s.s rlo, (off+4)(rbase); \ 226 s.s rhi, (off)(rbase) 227#define LOAD64_off_F(rlo, rhi, rbase, off) l.s rlo, (off+4)(rbase); \ 228 l.s rhi, (off)(rbase) 229#endif 230 231#define STORE64(rlo, rhi, rbase) STORE64_off(rlo, rhi, rbase, 0) 232#define LOAD64(rlo, rhi, rbase) LOAD64_off(rlo, rhi, rbase, 0) 233 234#define vSTORE64(rlo, rhi, rbase) vSTORE64_off(rlo, rhi, rbase, 0) 235#define vLOAD64(rlo, rhi, rbase) vLOAD64_off(rlo, rhi, rbase, 0) 236 237#define STORE64_F(rlo, rhi, rbase) STORE64_off_F(rlo, rhi, rbase, 0) 238#define LOAD64_F(rlo, rhi, rbase) LOAD64_off_F(rlo, rhi, rbase, 0) 239 240#define STORE64_lo(rd, rbase) sw rd, 0(rbase) 241#define STORE64_hi(rd, rbase) sw rd, 4(rbase) 242 243 244#define LOAD_offThread_exception(rd, rbase) LOAD_RB_OFF(rd, rbase, offThread_exception) 245#define LOAD_base_offArrayObject_length(rd, rbase) LOAD_RB_OFF(rd, rbase, offArrayObject_length) 246#define LOAD_base_offClassObject_accessFlags(rd, rbase) LOAD_RB_OFF(rd, rbase, offClassObject_accessFlags) 247#define LOAD_base_offClassObject_descriptor(rd, rbase) LOAD_RB_OFF(rd, rbase, offClassObject_descriptor) 248#define LOAD_base_offClassObject_super(rd, rbase) LOAD_RB_OFF(rd, rbase, offClassObject_super) 249 250#define LOAD_base_offClassObject_vtable(rd, rbase) LOAD_RB_OFF(rd, rbase, offClassObject_vtable) 251#define LOAD_base_offClassObject_vtableCount(rd, rbase) LOAD_RB_OFF(rd, rbase, offClassObject_vtableCount) 252#define LOAD_base_offDvmDex_pResClasses(rd, rbase) LOAD_RB_OFF(rd, rbase, offDvmDex_pResClasses) 253#define LOAD_base_offDvmDex_pResFields(rd, rbase) LOAD_RB_OFF(rd, rbase, offDvmDex_pResFields) 254 255#define LOAD_base_offDvmDex_pResMethods(rd, rbase) LOAD_RB_OFF(rd, rbase, offDvmDex_pResMethods) 256#define LOAD_base_offDvmDex_pResStrings(rd, rbase) LOAD_RB_OFF(rd, rbase, offDvmDex_pResStrings) 257#define LOAD_base_offInstField_byteOffset(rd, rbase) LOAD_RB_OFF(rd, rbase, offInstField_byteOffset) 258#define LOAD_base_offStaticField_value(rd, rbase) LOAD_RB_OFF(rd, rbase, offStaticField_value) 259#define LOAD_base_offMethod_clazz(rd, rbase) LOAD_RB_OFF(rd, rbase, offMethod_clazz) 260 261#define LOAD_base_offMethod_name(rd, rbase) LOAD_RB_OFF(rd, rbase, offMethod_name) 262#define LOAD_base_offObject_clazz(rd, rbase) LOAD_RB_OFF(rd, rbase, offObject_clazz) 263 264#define LOADu2_offMethod_methodIndex(rd, rbase) LOADu2_RB_OFF(rd, rbase, offMethod_methodIndex) 265 266 267#define STORE_offThread_exception(rd, rbase) STORE_RB_OFF(rd, rbase, offThread_exception) 268 269 270#define STACK_STORE(rd, off) sw rd, off(sp) 271#define STACK_LOAD(rd, off) lw rd, off(sp) 272#define CREATE_STACK(n) subu sp, sp, n 273#define DELETE_STACK(n) addu sp, sp, n 274 275#define SAVE_RA(offset) STACK_STORE(ra, offset) 276#define LOAD_RA(offset) STACK_LOAD(ra, offset) 277 278#define LOAD_ADDR(dest, addr) la dest, addr 279#define LOAD_IMM(dest, imm) li dest, imm 280#define MOVE_REG(dest, src) move dest, src 281#define RETURN jr ra 282#define STACK_SIZE 128 283 284#define STACK_OFFSET_ARG04 16 285#define STACK_OFFSET_ARG05 20 286#define STACK_OFFSET_ARG06 24 287#define STACK_OFFSET_ARG07 28 288#define STACK_OFFSET_SCR 32 289#define STACK_OFFSET_SCRMX 80 290#define STACK_OFFSET_GP 84 291#define STACK_OFFSET_rFP 112 292 293#define JAL(n) jal n 294#define BAL(n) bal n 295 296#define STACK_STORE_RA() CREATE_STACK(STACK_SIZE); \ 297 STACK_STORE(gp, STACK_OFFSET_GP); \ 298 STACK_STORE(ra, 124) 299 300#define STACK_STORE_S0() STACK_STORE_RA(); \ 301 STACK_STORE(s0, 116) 302 303#define STACK_STORE_S0S1() STACK_STORE_S0(); \ 304 STACK_STORE(s1, STACK_OFFSET_rFP) 305 306#define STACK_LOAD_RA() STACK_LOAD(ra, 124); \ 307 STACK_LOAD(gp, STACK_OFFSET_GP); \ 308 DELETE_STACK(STACK_SIZE) 309 310#define STACK_LOAD_S0() STACK_LOAD(s0, 116); \ 311 STACK_LOAD_RA() 312 313#define STACK_LOAD_S0S1() STACK_LOAD(s1, STACK_OFFSET_rFP); \ 314 STACK_LOAD_S0() 315 316#define STACK_STORE_FULL() CREATE_STACK(STACK_SIZE); \ 317 STACK_STORE(ra, 124); \ 318 STACK_STORE(fp, 120); \ 319 STACK_STORE(s0, 116); \ 320 STACK_STORE(s1, STACK_OFFSET_rFP); \ 321 STACK_STORE(s2, 108); \ 322 STACK_STORE(s3, 104); \ 323 STACK_STORE(s4, 100); \ 324 STACK_STORE(s5, 96); \ 325 STACK_STORE(s6, 92); \ 326 STACK_STORE(s7, 88); 327 328#define STACK_LOAD_FULL() STACK_LOAD(gp, STACK_OFFSET_GP); \ 329 STACK_LOAD(s7, 88); \ 330 STACK_LOAD(s6, 92); \ 331 STACK_LOAD(s5, 96); \ 332 STACK_LOAD(s4, 100); \ 333 STACK_LOAD(s3, 104); \ 334 STACK_LOAD(s2, 108); \ 335 STACK_LOAD(s1, STACK_OFFSET_rFP); \ 336 STACK_LOAD(s0, 116); \ 337 STACK_LOAD(fp, 120); \ 338 STACK_LOAD(ra, 124); \ 339 DELETE_STACK(STACK_SIZE) 340 341/* 342 * first 8 words are reserved for function calls 343 * Maximum offset is STACK_OFFSET_SCRMX-STACK_OFFSET_SCR 344 */ 345#define SCRATCH_STORE(r,off) \ 346 STACK_STORE(r, STACK_OFFSET_SCR+off); 347#define SCRATCH_LOAD(r,off) \ 348 STACK_LOAD(r, STACK_OFFSET_SCR+off); 349 350#if defined(WITH_JIT) 351#include "../common/jit-config.h" 352#endif 353 354/* File: mips/platform.S */ 355/* 356 * =========================================================================== 357 * CPU-version-specific defines 358 * =========================================================================== 359 */ 360 361#if !defined(ANDROID_SMP) 362# error "Must define ANDROID_SMP" 363#endif 364 365/* 366 * Macro for data memory barrier. 367 */ 368.macro SMP_DMB 369#if ANDROID_SMP != 0 370 sync 371#else 372 /* not SMP */ 373#endif 374.endm 375 376/* 377 * Macro for data memory barrier (store/store variant). 378 */ 379.macro SMP_DMB_ST 380#if ANDROID_SMP != 0 381 // FIXME: Is this really needed? 382 sync 383#else 384 /* not SMP */ 385#endif 386.endm 387 388/* File: mips/entry.S */ 389 390/* 391 * Copyright (C) 2008 The Android Open Source Project 392 * 393 * Licensed under the Apache License, Version 2.0 (the "License"); 394 * you may not use this file except in compliance with the License. 395 * You may obtain a copy of the License at 396 * 397 * http://www.apache.org/licenses/LICENSE-2.0 398 * 399 * Unless required by applicable law or agreed to in writing, software 400 * distributed under the License is distributed on an "AS IS" BASIS, 401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 402 * See the License for the specific language governing permissions and 403 * limitations under the License. 404 */ 405/* 406 * Interpreter entry point. 407 */ 408 409#define ASSIST_DEBUGGER 1 410 411 .text 412 .align 2 413 .global dvmMterpStdRun 414 .ent dvmMterpStdRun 415 .frame sp, STACK_SIZE, ra 416/* 417 * On entry: 418 * r0 Thread* self 419 * 420 * The return comes via a call to dvmMterpStdBail(). 421 */ 422 423dvmMterpStdRun: 424 .set noreorder 425 .cpload t9 426 .set reorder 427/* Save to the stack. Frame size = STACK_SIZE */ 428 STACK_STORE_FULL() 429/* This directive will make sure all subsequent jal restore gp at a known offset */ 430 .cprestore STACK_OFFSET_GP 431 432 addu fp, sp, STACK_SIZE # Move Frame Pointer to the base of frame 433 /* save stack pointer, add magic word for debuggerd */ 434 sw sp, offThread_bailPtr(a0) # Save SP 435 436 /* set up "named" registers, figure out entry point */ 437 move rSELF, a0 # set rSELF 438 LOAD_PC_FROM_SELF() 439 LOAD_FP_FROM_SELF() 440 lw rIBASE, offThread_curHandlerTable(rSELF) 441 442#if defined(WITH_JIT) 443.LentryInstr: 444 /* Entry is always a possible trace start */ 445 lw a0, offThread_pJitProfTable(rSELF) 446 FETCH_INST() # load rINST from rPC 447 sw zero, offThread_inJitCodeCache(rSELF) 448#if !defined(WITH_SELF_VERIFICATION) 449 bnez a0, common_updateProfile # profiling is enabled 450#else 451 lw a2, offThread_shadowSpace(rSELF) # to find out the jit exit state 452 beqz a0, 1f # profiling is disabled 453 lw a3, offShadowSpace_jitExitState(a2) # jit exit state 454 li t0, kSVSTraceSelect 455 bne a3, t0, 2f 456 li a2, kJitTSelectRequestHot # ask for trace selection 457 b common_selectTrace # go build the trace 4582: 459 li a4, kSVSNoProfile 460 beq a3, a4, 1f # don't profile the next instruction? 461 b common_updateProfile # collect profiles 462#endif 4631: 464 GET_INST_OPCODE(t0) # extract opcode from rINST 465 GOTO_OPCODE(t0) # jump to next instruction 466#else 467 /* start executing the instruction at rPC */ 468 FETCH_INST() # load rINST from rPC 469 GET_INST_OPCODE(t0) # extract opcode from rINST 470 GOTO_OPCODE(t0) # jump to next instruction 471#endif 472 473.Lbad_arg: 474 la a0, .LstrBadEntryPoint 475 #a1 holds value of entryPoint 476 JAL(printf) 477 JAL(dvmAbort) 478 479 .end dvmMterpStdRun 480 481 .global dvmMterpStdBail 482 .ent dvmMterpStdBail 483 484/* Restore the stack pointer and all the registers stored at sp from the save 485 * point established on entry. Return to whoever called dvmMterpStdRun. 486 * 487 * On entry: 488 * a0 Thread* self 489 */ 490dvmMterpStdBail: 491 lw sp, offThread_bailPtr(a0) # Restore sp 492 STACK_LOAD_FULL() 493 jr ra 494 495 .end dvmMterpStdBail 496 497 498 .global dvmAsmInstructionStart 499 .type dvmAsmInstructionStart, %function 500dvmAsmInstructionStart = .L_OP_NOP 501 .text 502 503/* ------------------------------ */ 504 .balign 128 505.L_OP_NOP: /* 0x00 */ 506/* File: mips/OP_NOP.S */ 507 FETCH_ADVANCE_INST(1) # advance to next instr, load rINST 508 GET_INST_OPCODE(t0) 509 GOTO_OPCODE(t0) # execute it 510 511#ifdef ASSIST_DEBUGGER 512 /* insert fake function header to help gdb find the stack frame */ 513 .type dalvik_inst, @function 514dalvik_inst: 515 .ent dalvik_inst 516 .end dalvik_inst 517#endif 518 519 520/* ------------------------------ */ 521 .balign 128 522.L_OP_MOVE: /* 0x01 */ 523/* File: mips/OP_MOVE.S */ 524 /* for move, move-object, long-to-int */ 525 /* op vA, vB */ 526 GET_OPB(a1) # a1 <- B from 15:12 527 GET_OPA4(a0) # a0 <- A from 11:8 528 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 529 GET_VREG(a2, a1) # a2 <- fp[B] 530 GET_INST_OPCODE(t0) # t0 <- opcode from rINST 531 SET_VREG_GOTO(a2, a0, t0) # fp[A] <- a2 532 533 534/* ------------------------------ */ 535 .balign 128 536.L_OP_MOVE_FROM16: /* 0x02 */ 537/* File: mips/OP_MOVE_FROM16.S */ 538 /* for: move/from16, move-object/from16 */ 539 /* op vAA, vBBBB */ 540 FETCH(a1, 1) # a1 <- BBBB 541 GET_OPA(a0) # a0 <- AA 542 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 543 GET_VREG(a2, a1) # a2 <- fp[BBBB] 544 GET_INST_OPCODE(t0) # extract opcode from rINST 545 SET_VREG_GOTO(a2, a0, t0) # fp[AA] <- a2 546 547 548/* ------------------------------ */ 549 .balign 128 550.L_OP_MOVE_16: /* 0x03 */ 551/* File: mips/OP_MOVE_16.S */ 552 /* for: move/16, move-object/16 */ 553 /* op vAAAA, vBBBB */ 554 FETCH(a1, 2) # a1 <- BBBB 555 FETCH(a0, 1) # a0 <- AAAA 556 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 557 GET_VREG(a2, a1) # a2 <- fp[BBBB] 558 GET_INST_OPCODE(t0) # extract opcode from rINST 559 SET_VREG_GOTO(a2, a0, t0) # fp[AAAA] <- a2 and jump 560 561 562/* ------------------------------ */ 563 .balign 128 564.L_OP_MOVE_WIDE: /* 0x04 */ 565/* File: mips/OP_MOVE_WIDE.S */ 566 /* move-wide vA, vB */ 567 /* NOTE: regs can overlap, e.g. "move v6, v7" or "move v7, v6" */ 568 GET_OPA4(a2) # a2 <- A(+) 569 GET_OPB(a3) # a3 <- B 570 EAS2(a3, rFP, a3) # a3 <- &fp[B] 571 EAS2(a2, rFP, a2) # a2 <- &fp[A] 572 LOAD64(a0, a1, a3) # a0/a1 <- fp[B] 573 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 574 GET_INST_OPCODE(t0) # extract opcode from rINST 575 STORE64(a0, a1, a2) # fp[A] <- a0/a1 576 GOTO_OPCODE(t0) # jump to next instruction 577 578 579/* ------------------------------ */ 580 .balign 128 581.L_OP_MOVE_WIDE_FROM16: /* 0x05 */ 582/* File: mips/OP_MOVE_WIDE_FROM16.S */ 583 /* move-wide/from16 vAA, vBBBB */ 584 /* NOTE: regs can overlap, e.g. "move v6, v7" or "move v7, v6" */ 585 FETCH(a3, 1) # a3 <- BBBB 586 GET_OPA(a2) # a2 <- AA 587 EAS2(a3, rFP, a3) # a3 <- &fp[BBBB] 588 EAS2(a2, rFP, a2) # a2 <- &fp[AA] 589 LOAD64(a0, a1, a3) # a0/a1 <- fp[BBBB] 590 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 591 GET_INST_OPCODE(t0) # extract opcode from rINST 592 STORE64(a0, a1, a2) # fp[AA] <- a0/a1 593 GOTO_OPCODE(t0) # jump to next instruction 594 595 596/* ------------------------------ */ 597 .balign 128 598.L_OP_MOVE_WIDE_16: /* 0x06 */ 599/* File: mips/OP_MOVE_WIDE_16.S */ 600 /* move-wide/16 vAAAA, vBBBB */ 601 /* NOTE: regs can overlap, e.g. "move v6, v7" or "move v7, v6" */ 602 FETCH(a3, 2) # a3 <- BBBB 603 FETCH(a2, 1) # a2 <- AAAA 604 EAS2(a3, rFP, a3) # a3 <- &fp[BBBB] 605 EAS2(a2, rFP, a2) # a2 <- &fp[AAAA] 606 LOAD64(a0, a1, a3) # a0/a1 <- fp[BBBB] 607 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 608 GET_INST_OPCODE(t0) # extract opcode from rINST 609 STORE64(a0, a1, a2) # fp[AAAA] <- a0/a1 610 GOTO_OPCODE(t0) # jump to next instruction 611 612 613/* ------------------------------ */ 614 .balign 128 615.L_OP_MOVE_OBJECT: /* 0x07 */ 616/* File: mips/OP_MOVE_OBJECT.S */ 617/* File: mips/OP_MOVE.S */ 618 /* for move, move-object, long-to-int */ 619 /* op vA, vB */ 620 GET_OPB(a1) # a1 <- B from 15:12 621 GET_OPA4(a0) # a0 <- A from 11:8 622 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 623 GET_VREG(a2, a1) # a2 <- fp[B] 624 GET_INST_OPCODE(t0) # t0 <- opcode from rINST 625 SET_VREG_GOTO(a2, a0, t0) # fp[A] <- a2 626 627 628 629/* ------------------------------ */ 630 .balign 128 631.L_OP_MOVE_OBJECT_FROM16: /* 0x08 */ 632/* File: mips/OP_MOVE_OBJECT_FROM16.S */ 633/* File: mips/OP_MOVE_FROM16.S */ 634 /* for: move/from16, move-object/from16 */ 635 /* op vAA, vBBBB */ 636 FETCH(a1, 1) # a1 <- BBBB 637 GET_OPA(a0) # a0 <- AA 638 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 639 GET_VREG(a2, a1) # a2 <- fp[BBBB] 640 GET_INST_OPCODE(t0) # extract opcode from rINST 641 SET_VREG_GOTO(a2, a0, t0) # fp[AA] <- a2 642 643 644 645/* ------------------------------ */ 646 .balign 128 647.L_OP_MOVE_OBJECT_16: /* 0x09 */ 648/* File: mips/OP_MOVE_OBJECT_16.S */ 649/* File: mips/OP_MOVE_16.S */ 650 /* for: move/16, move-object/16 */ 651 /* op vAAAA, vBBBB */ 652 FETCH(a1, 2) # a1 <- BBBB 653 FETCH(a0, 1) # a0 <- AAAA 654 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 655 GET_VREG(a2, a1) # a2 <- fp[BBBB] 656 GET_INST_OPCODE(t0) # extract opcode from rINST 657 SET_VREG_GOTO(a2, a0, t0) # fp[AAAA] <- a2 and jump 658 659 660 661/* ------------------------------ */ 662 .balign 128 663.L_OP_MOVE_RESULT: /* 0x0a */ 664/* File: mips/OP_MOVE_RESULT.S */ 665 /* for: move-result, move-result-object */ 666 /* op vAA */ 667 GET_OPA(a2) # a2 <- AA 668 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 669 LOAD_rSELF_retval(a0) # a0 <- self->retval.i 670 GET_INST_OPCODE(t0) # extract opcode from rINST 671 SET_VREG_GOTO(a0, a2, t0) # fp[AA] <- a0 672 673 674/* ------------------------------ */ 675 .balign 128 676.L_OP_MOVE_RESULT_WIDE: /* 0x0b */ 677/* File: mips/OP_MOVE_RESULT_WIDE.S */ 678 /* move-result-wide vAA */ 679 GET_OPA(a2) # a2 <- AA 680 addu a3, rSELF, offThread_retval # a3 <- &self->retval 681 EAS2(a2, rFP, a2) # a2 <- &fp[AA] 682 LOAD64(a0, a1, a3) # a0/a1 <- retval.j 683 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 684 GET_INST_OPCODE(t0) # extract opcode from rINST 685 STORE64(a0, a1, a2) # fp[AA] <- a0/a1 686 GOTO_OPCODE(t0) # jump to next instruction 687 688 689/* ------------------------------ */ 690 .balign 128 691.L_OP_MOVE_RESULT_OBJECT: /* 0x0c */ 692/* File: mips/OP_MOVE_RESULT_OBJECT.S */ 693/* File: mips/OP_MOVE_RESULT.S */ 694 /* for: move-result, move-result-object */ 695 /* op vAA */ 696 GET_OPA(a2) # a2 <- AA 697 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 698 LOAD_rSELF_retval(a0) # a0 <- self->retval.i 699 GET_INST_OPCODE(t0) # extract opcode from rINST 700 SET_VREG_GOTO(a0, a2, t0) # fp[AA] <- a0 701 702 703 704/* ------------------------------ */ 705 .balign 128 706.L_OP_MOVE_EXCEPTION: /* 0x0d */ 707/* File: mips/OP_MOVE_EXCEPTION.S */ 708 /* move-exception vAA */ 709 GET_OPA(a2) # a2 <- AA 710 LOAD_offThread_exception(a3, rSELF) # a3 <- dvmGetException bypass 711 li a1, 0 # a1 <- 0 712 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 713 SET_VREG(a3, a2) # fp[AA] <- exception obj 714 GET_INST_OPCODE(t0) # extract opcode from rINST 715 STORE_offThread_exception(a1, rSELF) # dvmClearException bypass 716 GOTO_OPCODE(t0) # jump to next instruction 717 718 719/* ------------------------------ */ 720 .balign 128 721.L_OP_RETURN_VOID: /* 0x0e */ 722/* File: mips/OP_RETURN_VOID.S */ 723 b common_returnFromMethod 724 725 726/* ------------------------------ */ 727 .balign 128 728.L_OP_RETURN: /* 0x0f */ 729/* File: mips/OP_RETURN.S */ 730 /* 731 * Return a 32-bit value. Copies the return value into the "thread" 732 * structure, then jumps to the return handler. 733 * 734 * for: return, return-object 735 */ 736 /* op vAA */ 737 GET_OPA(a2) # a2 <- AA 738 GET_VREG(a0, a2) # a0 <- vAA 739 sw a0, offThread_retval(rSELF) # retval.i <- vAA 740 b common_returnFromMethod 741 742 743/* ------------------------------ */ 744 .balign 128 745.L_OP_RETURN_WIDE: /* 0x10 */ 746/* File: mips/OP_RETURN_WIDE.S */ 747 /* 748 * Return a 64-bit value. Copies the return value into the "thread" 749 * structure, then jumps to the return handler. 750 */ 751 /* return-wide vAA */ 752 GET_OPA(a2) # a2 <- AA 753 EAS2(a2, rFP, a2) # a2 <- &fp[AA] 754 addu a3, rSELF, offThread_retval # a3 <- &self->retval 755 LOAD64(a0, a1, a2) # a0/a1 <- vAA/vAA+1 756 STORE64(a0, a1, a3) # retval <- a0/a1 757 b common_returnFromMethod 758 759 760/* ------------------------------ */ 761 .balign 128 762.L_OP_RETURN_OBJECT: /* 0x11 */ 763/* File: mips/OP_RETURN_OBJECT.S */ 764/* File: mips/OP_RETURN.S */ 765 /* 766 * Return a 32-bit value. Copies the return value into the "thread" 767 * structure, then jumps to the return handler. 768 * 769 * for: return, return-object 770 */ 771 /* op vAA */ 772 GET_OPA(a2) # a2 <- AA 773 GET_VREG(a0, a2) # a0 <- vAA 774 sw a0, offThread_retval(rSELF) # retval.i <- vAA 775 b common_returnFromMethod 776 777 778 779/* ------------------------------ */ 780 .balign 128 781.L_OP_CONST_4: /* 0x12 */ 782/* File: mips/OP_CONST_4.S */ 783 # const/4 vA, /* +B */ 784 sll a1, rINST, 16 # a1 <- Bxxx0000 785 GET_OPA(a0) # a0 <- A+ 786 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 787 sra a1, a1, 28 # a1 <- sssssssB (sign-extended) 788 and a0, a0, 15 789 GET_INST_OPCODE(t0) # ip <- opcode from rINST 790 SET_VREG_GOTO(a1, a0, t0) # fp[A] <- a1 791 792 793/* ------------------------------ */ 794 .balign 128 795.L_OP_CONST_16: /* 0x13 */ 796/* File: mips/OP_CONST_16.S */ 797 # const/16 vAA, /* +BBBB */ 798 FETCH_S(a0, 1) # a0 <- ssssBBBB (sign-extended) 799 GET_OPA(a3) # a3 <- AA 800 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 801 GET_INST_OPCODE(t0) # extract opcode from rINST 802 SET_VREG_GOTO(a0, a3, t0) # vAA <- a0 803 804 805/* ------------------------------ */ 806 .balign 128 807.L_OP_CONST: /* 0x14 */ 808/* File: mips/OP_CONST.S */ 809 # const vAA, /* +BBBBbbbb */ 810 GET_OPA(a3) # a3 <- AA 811 FETCH(a0, 1) # a0 <- bbbb (low) 812 FETCH(a1, 2) # a1 <- BBBB (high) 813 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 814 sll a1, a1, 16 815 or a0, a1, a0 # a0 <- BBBBbbbb 816 GET_INST_OPCODE(t0) # extract opcode from rINST 817 SET_VREG_GOTO(a0, a3, t0) # vAA <- a0 818 819 820/* ------------------------------ */ 821 .balign 128 822.L_OP_CONST_HIGH16: /* 0x15 */ 823/* File: mips/OP_CONST_HIGH16.S */ 824 # const/high16 vAA, /* +BBBB0000 */ 825 FETCH(a0, 1) # a0 <- 0000BBBB (zero-extended) 826 GET_OPA(a3) # a3 <- AA 827 sll a0, a0, 16 # a0 <- BBBB0000 828 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 829 GET_INST_OPCODE(t0) # extract opcode from rINST 830 SET_VREG_GOTO(a0, a3, t0) # vAA <- a0 831 832 833/* ------------------------------ */ 834 .balign 128 835.L_OP_CONST_WIDE_16: /* 0x16 */ 836/* File: mips/OP_CONST_WIDE_16.S */ 837 # const-wide/16 vAA, /* +BBBB */ 838 FETCH_S(a0, 1) # a0 <- ssssBBBB (sign-extended) 839 GET_OPA(a3) # a3 <- AA 840 sra a1, a0, 31 # a1 <- ssssssss 841 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 842 EAS2(a3, rFP, a3) # a3 <- &fp[AA] 843 GET_INST_OPCODE(t0) # extract opcode from rINST 844 STORE64(a0, a1, a3) # vAA <- a0/a1 845 GOTO_OPCODE(t0) # jump to next instruction 846 847 848/* ------------------------------ */ 849 .balign 128 850.L_OP_CONST_WIDE_32: /* 0x17 */ 851/* File: mips/OP_CONST_WIDE_32.S */ 852 # const-wide/32 vAA, /* +BBBBbbbb */ 853 FETCH(a0, 1) # a0 <- 0000bbbb (low) 854 GET_OPA(a3) # a3 <- AA 855 FETCH_S(a2, 2) # a2 <- ssssBBBB (high) 856 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 857 sll a2, a2, 16 858 or a0, a0, a2 # a0 <- BBBBbbbb 859 EAS2(a3, rFP, a3) # a3 <- &fp[AA] 860 sra a1, a0, 31 # a1 <- ssssssss 861 GET_INST_OPCODE(t0) # extract opcode from rINST 862 STORE64(a0, a1, a3) # vAA <- a0/a1 863 GOTO_OPCODE(t0) # jump to next instruction 864 865 866/* ------------------------------ */ 867 .balign 128 868.L_OP_CONST_WIDE: /* 0x18 */ 869/* File: mips/OP_CONST_WIDE.S */ 870 # const-wide vAA, /* +HHHHhhhhBBBBbbbb */ 871 FETCH(a0, 1) # a0 <- bbbb (low) 872 FETCH(a1, 2) # a1 <- BBBB (low middle) 873 FETCH(a2, 3) # a2 <- hhhh (high middle) 874 sll a1, 16 # 875 or a0, a1 # a0 <- BBBBbbbb (low word) 876 FETCH(a3, 4) # a3 <- HHHH (high) 877 GET_OPA(t1) # t1 <- AA 878 sll a3, 16 879 or a1, a3, a2 # a1 <- HHHHhhhh (high word) 880 FETCH_ADVANCE_INST(5) # advance rPC, load rINST 881 EAS2(t1, rFP, t1) # t1 <- &fp[AA] 882 GET_INST_OPCODE(t0) # extract opcode from rINST 883 STORE64(a0, a1, t1) # vAA <- a0/a1 884 GOTO_OPCODE(t0) # jump to next instruction 885 886 887/* ------------------------------ */ 888 .balign 128 889.L_OP_CONST_WIDE_HIGH16: /* 0x19 */ 890/* File: mips/OP_CONST_WIDE_HIGH16.S */ 891 # const-wide/high16 vAA, /* +BBBB000000000000 */ 892 FETCH(a1, 1) # a1 <- 0000BBBB (zero-extended) 893 GET_OPA(a3) # a3 <- AA 894 li a0, 0 # a0 <- 00000000 895 sll a1, 16 # a1 <- BBBB0000 896 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 897 EAS2(a3, rFP, a3) # a3 <- &fp[AA] 898 GET_INST_OPCODE(t0) # extract opcode from rINST 899 STORE64(a0, a1, a3) # vAA <- a0/a1 900 GOTO_OPCODE(t0) # jump to next instruction 901 902 903/* ------------------------------ */ 904 .balign 128 905.L_OP_CONST_STRING: /* 0x1a */ 906/* File: mips/OP_CONST_STRING.S */ 907 # const/string vAA, String /* BBBB */ 908 FETCH(a1, 1) # a1 <- BBBB 909 LOAD_rSELF_methodClassDex(a2) # a2 <- self->methodClassDex 910 GET_OPA(rOBJ) # rOBJ <- AA 911 LOAD_base_offDvmDex_pResStrings(a2, a2) # a2 <- dvmDex->pResStrings 912 LOAD_eas2(v0, a2, a1) # v0 <- pResStrings[BBBB] 913 # not yet resolved? 914 bnez v0, .LOP_CONST_STRING_resolve 915 /* 916 * Continuation if the String has not yet been resolved. 917 * a1: BBBB (String ref) 918 * rOBJ: target register 919 */ 920 EXPORT_PC() 921 LOAD_rSELF_method(a0) # a0 <- self->method 922 LOAD_base_offMethod_clazz(a0, a0) # a0 <- method->clazz 923 JAL(dvmResolveString) # v0 <- String reference 924 # failed? 925 beqz v0, common_exceptionThrown # yup, handle the exception 926 927.LOP_CONST_STRING_resolve: 928 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 929 GET_INST_OPCODE(t0) # extract opcode from rINST 930 SET_VREG_GOTO(v0, rOBJ, t0) # vAA <- v0 931 932 933 934 935 936 937/* ------------------------------ */ 938 .balign 128 939.L_OP_CONST_STRING_JUMBO: /* 0x1b */ 940/* File: mips/OP_CONST_STRING_JUMBO.S */ 941 # const/string vAA, String /* BBBBBBBB */ 942 FETCH(a0, 1) # a0 <- bbbb (low) 943 FETCH(a1, 2) # a1 <- BBBB (high) 944 LOAD_rSELF_methodClassDex(a2) # a2 <- self->methodClassDex 945 GET_OPA(rOBJ) # rOBJ <- AA 946 LOAD_base_offDvmDex_pResStrings(a2, a2) # a2 <- dvmDex->pResStrings 947 sll a1, a1, 16 948 or a1, a1, a0 # a1 <- BBBBbbbb 949 LOAD_eas2(v0, a2, a1) # v0 <- pResStrings[BBBB] 950 bnez v0, .LOP_CONST_STRING_JUMBO_resolve 951 952 /* 953 * Continuation if the String has not yet been resolved. 954 * a1: BBBBBBBB (String ref) 955 * rOBJ: target register 956 */ 957 EXPORT_PC() 958 LOAD_rSELF_method(a0) # a0 <- self->method 959 LOAD_base_offMethod_clazz(a0, a0) # a0 <- method->clazz 960 JAL(dvmResolveString) # v0 <- String reference 961 # failed? 962 beqz v0, common_exceptionThrown # yup, handle the exception 963 964.LOP_CONST_STRING_JUMBO_resolve: 965 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 966 GET_INST_OPCODE(t1) # extract opcode from rINST 967 SET_VREG_GOTO(v0, rOBJ, t1) # vAA <- v0 968 969 970/* ------------------------------ */ 971 .balign 128 972.L_OP_CONST_CLASS: /* 0x1c */ 973/* File: mips/OP_CONST_CLASS.S */ 974 # const/class vAA, Class /* BBBB */ 975 FETCH(a1, 1) # a1 <- BBBB 976 LOAD_rSELF_methodClassDex(a2) # a2 <- self->methodClassDex 977 GET_OPA(rOBJ) # rOBJ <- AA 978 LOAD_base_offDvmDex_pResClasses(a2, a2) # a2 <- dvmDex->pResClasses 979 LOAD_eas2(v0, a2, a1) # v0 <- pResClasses[BBBB] 980 981 bnez v0, .LOP_CONST_CLASS_resolve # v0!=0 => resolved-ok 982 /* 983 * Continuation if the Class has not yet been resolved. 984 * a1: BBBB (Class ref) 985 * rOBJ: target register 986 */ 987 EXPORT_PC() 988 LOAD_rSELF_method(a0) # a0 <- self->method 989 li a2, 1 # a2 <- true 990 LOAD_base_offMethod_clazz(a0, a0) # a0 <- method->clazz 991 JAL(dvmResolveClass) # v0 <- Class reference 992 # failed==0? 993 beqz v0, common_exceptionThrown # yup, handle the exception 994 995.LOP_CONST_CLASS_resolve: 996 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 997 GET_INST_OPCODE(t0) # extract opcode from rINST 998 SET_VREG_GOTO(v0, rOBJ, t0) # vAA <- v0 999 1000 1001 1002/* ------------------------------ */ 1003 .balign 128 1004.L_OP_MONITOR_ENTER: /* 0x1d */ 1005/* File: mips/OP_MONITOR_ENTER.S */ 1006 /* 1007 * Synchronize on an object. 1008 */ 1009 /* monitor-enter vAA */ 1010 GET_OPA(a2) # a2 <- AA 1011 GET_VREG(a1, a2) # a1 <- vAA (object) 1012 move a0, rSELF # a0 <- self 1013 EXPORT_PC() # export PC so we can grab stack trace 1014 # null object? 1015 beqz a1, common_errNullObject # null object, throw an exception 1016 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 1017 JAL(dvmLockObject) # call(self, obj) 1018 GET_INST_OPCODE(t0) # extract opcode from rINST 1019 GOTO_OPCODE(t0) # jump to next instruction 1020 1021 1022/* ------------------------------ */ 1023 .balign 128 1024.L_OP_MONITOR_EXIT: /* 0x1e */ 1025/* File: mips/OP_MONITOR_EXIT.S */ 1026 /* 1027 * Unlock an object. 1028 * 1029 * Exceptions that occur when unlocking a monitor need to appear as 1030 * if they happened at the following instruction. See the Dalvik 1031 * instruction spec. 1032 */ 1033 /* monitor-exit vAA */ 1034 GET_OPA(a2) # a2 <- AA 1035 EXPORT_PC() # before fetch: export the PC 1036 GET_VREG(a1, a2) # a1 <- vAA (object) 1037 # null object? 1038 beqz a1, 1f 1039 move a0, rSELF # a0 <- self 1040 JAL(dvmUnlockObject) # v0 <- success for unlock(self, obj) 1041 # failed? 1042 FETCH_ADVANCE_INST(1) # before throw: advance rPC, load rINST 1043 beqz v0, common_exceptionThrown # yes, exception is pending 1044 GET_INST_OPCODE(t0) # extract opcode from rINST 1045 GOTO_OPCODE(t0) # jump to next instruction 10461: 1047 FETCH_ADVANCE_INST(1) # before throw: advance rPC, load rINST 1048 b common_errNullObject 1049 1050/* ------------------------------ */ 1051 .balign 128 1052.L_OP_CHECK_CAST: /* 0x1f */ 1053/* File: mips/OP_CHECK_CAST.S */ 1054 /* 1055 * Check to see if a cast from one class to another is allowed. 1056 */ 1057 # check-cast vAA, class /* BBBB */ 1058 GET_OPA(a3) # a3 <- AA 1059 FETCH(a2, 1) # a2 <- BBBB 1060 GET_VREG(rOBJ, a3) # rOBJ <- object 1061 LOAD_rSELF_methodClassDex(a0) # a0 <- pDvmDex 1062 LOAD_base_offDvmDex_pResClasses(a0, a0) # a0 <- pDvmDex->pResClasses 1063 # is object null? 1064 beqz rOBJ, .LOP_CHECK_CAST_okay # null obj, cast always succeeds 1065 LOAD_eas2(a1, a0, a2) # a1 <- resolved class 1066 LOAD_base_offObject_clazz(a0, rOBJ) # a0 <- obj->clazz 1067 # have we resolved this before? 1068 beqz a1, .LOP_CHECK_CAST_resolve # not resolved, do it now 1069.LOP_CHECK_CAST_resolved: 1070 # same class (trivial success)? 1071 bne a0, a1, .LOP_CHECK_CAST_fullcheck # no, do full check 1072.LOP_CHECK_CAST_okay: 1073 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 1074 GET_INST_OPCODE(t0) # extract opcode from rINST 1075 GOTO_OPCODE(t0) # jump to next instruction 1076 1077 /* 1078 * Trivial test failed, need to perform full check. This is common. 1079 * a0 holds obj->clazz 1080 * a1 holds class resolved from BBBB 1081 * rOBJ holds object 1082 */ 1083.LOP_CHECK_CAST_fullcheck: 1084 move rBIX,a1 # avoid ClassObject getting clobbered 1085 JAL(dvmInstanceofNonTrivial) # v0 <- boolean result 1086 # failed? 1087 bnez v0, .LOP_CHECK_CAST_okay # no, success 1088 b .LOP_CHECK_CAST_castfailure 1089 1090/* ------------------------------ */ 1091 .balign 128 1092.L_OP_INSTANCE_OF: /* 0x20 */ 1093/* File: mips/OP_INSTANCE_OF.S */ 1094 /* 1095 * Check to see if an object reference is an instance of a class. 1096 * 1097 * Most common situation is a non-null object, being compared against 1098 * an already-resolved class. 1099 */ 1100 # instance-of vA, vB, class /* CCCC */ 1101 GET_OPB(a3) # a3 <- B 1102 GET_OPA4(rOBJ) # rOBJ <- A+ 1103 GET_VREG(a0, a3) # a0 <- vB (object) 1104 LOAD_rSELF_methodClassDex(a2) # a2 <- pDvmDex 1105 # is object null? 1106 beqz a0, .LOP_INSTANCE_OF_store # null obj, not an instance, store a0 1107 FETCH(a3, 1) # a3 <- CCCC 1108 LOAD_base_offDvmDex_pResClasses(a2, a2) # a2 <- pDvmDex->pResClasses 1109 LOAD_eas2(a1, a2, a3) # a1 <- resolved class 1110 LOAD_base_offObject_clazz(a0, a0) # a0 <- obj->clazz 1111 # have we resolved this before? 1112 beqz a1, .LOP_INSTANCE_OF_resolve # not resolved, do it now 1113.LOP_INSTANCE_OF_resolved: # a0=obj->clazz, a1=resolved class 1114 # same class (trivial success)? 1115 beq a0, a1, .LOP_INSTANCE_OF_trivial # yes, trivial finish 1116 b .LOP_INSTANCE_OF_fullcheck # no, do full check 1117 1118 /* 1119 * Trivial test succeeded, save and bail. 1120 * rOBJ holds A 1121 */ 1122.LOP_INSTANCE_OF_trivial: 1123 li a0, 1 # indicate success 1124 # fall thru 1125 /* 1126 * a0 holds boolean result 1127 * rOBJ holds A 1128 */ 1129.LOP_INSTANCE_OF_store: 1130 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 1131 SET_VREG(a0, rOBJ) # vA <- a0 1132 GET_INST_OPCODE(t0) # extract opcode from rINST 1133 GOTO_OPCODE(t0) # jump to next instruction 1134 1135 1136/* ------------------------------ */ 1137 .balign 128 1138.L_OP_ARRAY_LENGTH: /* 0x21 */ 1139/* File: mips/OP_ARRAY_LENGTH.S */ 1140 /* 1141 * Return the length of an array. 1142 */ 1143 GET_OPB(a1) # a1 <- B 1144 GET_OPA4(a2) # a2 <- A+ 1145 GET_VREG(a0, a1) # a0 <- vB (object ref) 1146 # is object null? 1147 beqz a0, common_errNullObject # yup, fail 1148 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 1149 LOAD_base_offArrayObject_length(a3, a0) # a3 <- array length 1150 GET_INST_OPCODE(t0) # extract opcode from rINST 1151 SET_VREG_GOTO(a3, a2, t0) # vA <- length 1152 1153 1154/* ------------------------------ */ 1155 .balign 128 1156.L_OP_NEW_INSTANCE: /* 0x22 */ 1157/* File: mips/OP_NEW_INSTANCE.S */ 1158 /* 1159 * Create a new instance of a class. 1160 */ 1161 # new-instance vAA, class /* BBBB */ 1162 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 1163 FETCH(a1, 1) # a1 <- BBBB 1164 LOAD_base_offDvmDex_pResClasses(a3, a3) # a3 <- pDvmDex->pResClasses 1165 LOAD_eas2(a0, a3, a1) # a0 <- resolved class 1166#if defined(WITH_JIT) 1167 EAS2(rBIX, a3, a1) # rBIX <- &resolved_class 1168#endif 1169 EXPORT_PC() # req'd for init, resolve, alloc 1170 # already resolved? 1171 beqz a0, .LOP_NEW_INSTANCE_resolve # no, resolve it now 1172.LOP_NEW_INSTANCE_resolved: # a0=class 1173 lbu a1, offClassObject_status(a0) # a1 <- ClassStatus enum 1174 # has class been initialized? 1175 li t0, CLASS_INITIALIZED 1176 move rOBJ, a0 # save a0 1177 bne a1, t0, .LOP_NEW_INSTANCE_needinit # no, init class now 1178 1179.LOP_NEW_INSTANCE_initialized: # a0=class 1180 LOAD_base_offClassObject_accessFlags(a3, a0) # a3 <- clazz->accessFlags 1181 li a1, ALLOC_DONT_TRACK # flags for alloc call 1182 # a0=class 1183 JAL(dvmAllocObject) # v0 <- new object 1184 GET_OPA(a3) # a3 <- AA 1185#if defined(WITH_JIT) 1186 /* 1187 * The JIT needs the class to be fully resolved before it can 1188 * include this instruction in a trace. 1189 */ 1190 lhu a1, offThread_subMode(rSELF) 1191 beqz v0, common_exceptionThrown # yes, handle the exception 1192 and a1, kSubModeJitTraceBuild # under construction? 1193 bnez a1, .LOP_NEW_INSTANCE_jitCheck 1194#else 1195 # failed? 1196 beqz v0, common_exceptionThrown # yes, handle the exception 1197#endif 1198 b .LOP_NEW_INSTANCE_continue 1199 1200 1201/* ------------------------------ */ 1202 .balign 128 1203.L_OP_NEW_ARRAY: /* 0x23 */ 1204/* File: mips/OP_NEW_ARRAY.S */ 1205 /* 1206 * Allocate an array of objects, specified with the array class 1207 * and a count. 1208 * 1209 * The verifier guarantees that this is an array class, so we don't 1210 * check for it here. 1211 */ 1212 /* new-array vA, vB, class@CCCC */ 1213 GET_OPB(a0) # a0 <- B 1214 FETCH(a2, 1) # a2 <- CCCC 1215 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 1216 GET_VREG(a1, a0) # a1 <- vB (array length) 1217 LOAD_base_offDvmDex_pResClasses(a3, a3) # a3 <- pDvmDex->pResClasses 1218 LOAD_eas2(a0, a3, a2) # a0 <- resolved class 1219 # check length 1220 bltz a1, common_errNegativeArraySize # negative length, bail - len in a1 1221 EXPORT_PC() # req'd for resolve, alloc 1222 # already resolved? 1223 beqz a0, .LOP_NEW_ARRAY_resolve 1224 1225 /* 1226 * Finish allocation. 1227 * 1228 * a0 holds class 1229 * a1 holds array length 1230 */ 1231.LOP_NEW_ARRAY_finish: 1232 li a2, ALLOC_DONT_TRACK # don't track in local refs table 1233 JAL(dvmAllocArrayByClass) # v0 <- call(clazz, length, flags) 1234 GET_OPA4(a2) # a2 <- A+ 1235 # failed? 1236 beqz v0, common_exceptionThrown # yes, handle the exception 1237 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 1238 GET_INST_OPCODE(t0) # extract opcode from rINST 1239 SET_VREG(v0, a2) # vA <- v0 1240 GOTO_OPCODE(t0) # jump to next instruction 1241 1242/* ------------------------------ */ 1243 .balign 128 1244.L_OP_FILLED_NEW_ARRAY: /* 0x24 */ 1245/* File: mips/OP_FILLED_NEW_ARRAY.S */ 1246 /* 1247 * Create a new array with elements filled from registers. 1248 * 1249 * for: filled-new-array, filled-new-array/range 1250 */ 1251 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 1252 # op {vCCCC..v(CCCC+AA-1)}, type /* BBBB */ 1253 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 1254 FETCH(a1, 1) # a1 <- BBBB 1255 LOAD_base_offDvmDex_pResClasses(a3, a3) # a3 <- pDvmDex->pResClasses 1256 EXPORT_PC() # need for resolve and alloc 1257 LOAD_eas2(a0, a3, a1) # a0 <- resolved class 1258 GET_OPA(rOBJ) # rOBJ <- AA or BA 1259 # already resolved? 1260 bnez a0, .LOP_FILLED_NEW_ARRAY_continue # yes, continue on 1261 LOAD_rSELF_method(a3) # a3 <- self->method 1262 li a2, 0 # a2 <- false 1263 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 1264 JAL(dvmResolveClass) # v0 <- call(clazz, ref) 1265 move a0, v0 1266 # got null? 1267 beqz v0, common_exceptionThrown # yes, handle exception 1268 b .LOP_FILLED_NEW_ARRAY_continue 1269 1270/* ------------------------------ */ 1271 .balign 128 1272.L_OP_FILLED_NEW_ARRAY_RANGE: /* 0x25 */ 1273/* File: mips/OP_FILLED_NEW_ARRAY_RANGE.S */ 1274/* File: mips/OP_FILLED_NEW_ARRAY.S */ 1275 /* 1276 * Create a new array with elements filled from registers. 1277 * 1278 * for: filled-new-array, filled-new-array/range 1279 */ 1280 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 1281 # op {vCCCC..v(CCCC+AA-1)}, type /* BBBB */ 1282 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 1283 FETCH(a1, 1) # a1 <- BBBB 1284 LOAD_base_offDvmDex_pResClasses(a3, a3) # a3 <- pDvmDex->pResClasses 1285 EXPORT_PC() # need for resolve and alloc 1286 LOAD_eas2(a0, a3, a1) # a0 <- resolved class 1287 GET_OPA(rOBJ) # rOBJ <- AA or BA 1288 # already resolved? 1289 bnez a0, .LOP_FILLED_NEW_ARRAY_RANGE_continue # yes, continue on 1290 LOAD_rSELF_method(a3) # a3 <- self->method 1291 li a2, 0 # a2 <- false 1292 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 1293 JAL(dvmResolveClass) # v0 <- call(clazz, ref) 1294 move a0, v0 1295 # got null? 1296 beqz v0, common_exceptionThrown # yes, handle exception 1297 b .LOP_FILLED_NEW_ARRAY_RANGE_continue 1298 1299 1300/* ------------------------------ */ 1301 .balign 128 1302.L_OP_FILL_ARRAY_DATA: /* 0x26 */ 1303/* File: mips/OP_FILL_ARRAY_DATA.S */ 1304 /* fill-array-data vAA, +BBBBBBBB */ 1305 FETCH(a0, 1) # a0 <- bbbb (lo) 1306 FETCH(a1, 2) # a1 <- BBBB (hi) 1307 GET_OPA(a3) # a3 <- AA 1308 sll a1, a1, 16 # a1 <- BBBBbbbb 1309 or a1, a0, a1 # a1 <- BBBBbbbb 1310 GET_VREG(a0, a3) # a0 <- vAA (array object) 1311 EAS1(a1, rPC, a1) # a1 <- PC + BBBBbbbb*2 (array data off.) 1312 EXPORT_PC() 1313 JAL(dvmInterpHandleFillArrayData) # fill the array with predefined data 1314 # 0 means an exception is thrown 1315 beqz v0, common_exceptionThrown # has exception 1316 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 1317 GET_INST_OPCODE(t0) # extract opcode from rINST 1318 GOTO_OPCODE(t0) # jump to next instruction 1319 1320/* ------------------------------ */ 1321 .balign 128 1322.L_OP_THROW: /* 0x27 */ 1323/* File: mips/OP_THROW.S */ 1324 /* 1325 * Throw an exception object in the current thread. 1326 */ 1327 /* throw vAA */ 1328 GET_OPA(a2) # a2 <- AA 1329 GET_VREG(a1, a2) # a1 <- vAA (exception object) 1330 EXPORT_PC() # exception handler can throw 1331 # null object? 1332 beqz a1, common_errNullObject # yes, throw an NPE instead 1333 # bypass dvmSetException, just store it 1334 STORE_offThread_exception(a1, rSELF) # thread->exception <- obj 1335 b common_exceptionThrown 1336 1337 1338/* ------------------------------ */ 1339 .balign 128 1340.L_OP_GOTO: /* 0x28 */ 1341/* File: mips/OP_GOTO.S */ 1342 /* 1343 * Unconditional branch, 8-bit offset. 1344 * 1345 * The branch distance is a signed code-unit offset, which we need to 1346 * double to get a byte offset. 1347 */ 1348 /* goto +AA */ 1349 sll a0, rINST, 16 # a0 <- AAxx0000 1350 sra a1, a0, 24 # a1 <- ssssssAA (sign-extended) 1351 addu a2, a1, a1 # a2 <- byte offset 1352 /* If backwards branch refresh rBASE */ 1353 bgez a1, 1f 1354 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 13551: 1356 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST 1357#if defined(WITH_JIT) 1358 lw a0, offThread_pJitProfTable(rSELF) 1359 bltz a1, common_testUpdateProfile # (a0) check for trace hotness 1360#endif 1361 GET_INST_OPCODE(t0) # extract opcode from rINST 1362 GOTO_OPCODE(t0) # jump to next instruction 1363 1364/* ------------------------------ */ 1365 .balign 128 1366.L_OP_GOTO_16: /* 0x29 */ 1367/* File: mips/OP_GOTO_16.S */ 1368 /* 1369 * Unconditional branch, 16-bit offset. 1370 * 1371 * The branch distance is a signed code-unit offset, which we need to 1372 * double to get a byte offset. 1373 */ 1374 /* goto/16 +AAAA */ 1375 FETCH_S(a0, 1) # a0 <- ssssAAAA (sign-extended) 1376 addu a1, a0, a0 # a1 <- byte offset, flags set 1377 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 1378 bgez a1, 1f 1379 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 13801: 1381#if defined(WITH_JIT) 1382 lw a0, offThread_pJitProfTable(rSELF) 1383 bltz a1, common_testUpdateProfile # (a0) hot trace head? 1384#endif 1385 GET_INST_OPCODE(t0) # extract opcode from rINST 1386 GOTO_OPCODE(t0) # jump to next instruction 1387 1388/* ------------------------------ */ 1389 .balign 128 1390.L_OP_GOTO_32: /* 0x2a */ 1391/* File: mips/OP_GOTO_32.S */ 1392 /* 1393 * Unconditional branch, 32-bit offset. 1394 * 1395 * The branch distance is a signed code-unit offset, which we need to 1396 * double to get a byte offset. 1397 * 1398 * Unlike most opcodes, this one is allowed to branch to itself, so 1399 * our "backward branch" test must be "<=0" instead of "<0". 1400 */ 1401 /* goto/32 +AAAAAAAA */ 1402 FETCH(a0, 1) # a0 <- aaaa (lo) 1403 FETCH(a1, 2) # a1 <- AAAA (hi) 1404 sll a1, a1, 16 1405 or a0, a0, a1 # a0 <- AAAAaaaa 1406 addu a1, a0, a0 # a1 <- byte offset 1407#if defined(WITH_JIT) 1408 lw a0, offThread_pJitProfTable(rSELF) 1409 bgtz a1, 1f 1410 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 14111: 1412 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 1413 blez a1, common_testUpdateProfile # (a0) hot trace head? 1414#else 1415 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 1416 bgtz a0, 2f 1417 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 14182: 1419#endif 1420 GET_INST_OPCODE(t0) # extract opcode from rINST 1421 GOTO_OPCODE(t0) # jump to next instruction 1422 1423/* ------------------------------ */ 1424 .balign 128 1425.L_OP_PACKED_SWITCH: /* 0x2b */ 1426/* File: mips/OP_PACKED_SWITCH.S */ 1427 /* 1428 * Handle a packed-switch or sparse-switch instruction. In both cases 1429 * we decode it and hand it off to a helper function. 1430 * 1431 * We don't really expect backward branches in a switch statement, but 1432 * they're perfectly legal, so we check for them here. 1433 * 1434 * When the JIT is present, all targets are considered treated as 1435 * a potential trace heads regardless of branch direction. 1436 * 1437 * for: packed-switch, sparse-switch 1438 */ 1439 /* op vAA, +BBBB */ 1440 FETCH(a0, 1) # a0 <- bbbb (lo) 1441 FETCH(a1, 2) # a1 <- BBBB (hi) 1442 GET_OPA(a3) # a3 <- AA 1443 sll t0, a1, 16 1444 or a0, a0, t0 # a0 <- BBBBbbbb 1445 GET_VREG(a1, a3) # a1 <- vAA 1446 EAS1(a0, rPC, a0) # a0 <- PC + BBBBbbbb*2 1447 JAL(dvmInterpHandlePackedSwitch) # a0 <- code-unit branch offset 1448 addu a1, v0, v0 # a1 <- byte offset 1449 bgtz a1, 1f 1450 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 14511: 1452 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 1453#if defined(WITH_JIT) 1454 lw a0, offThread_pJitProfTable(rSELF) 1455 bnez a0, common_updateProfile 1456#endif 1457 GET_INST_OPCODE(t0) # extract opcode from rINST 1458 GOTO_OPCODE(t0) # jump to next instruction 1459 1460/* ------------------------------ */ 1461 .balign 128 1462.L_OP_SPARSE_SWITCH: /* 0x2c */ 1463/* File: mips/OP_SPARSE_SWITCH.S */ 1464/* File: mips/OP_PACKED_SWITCH.S */ 1465 /* 1466 * Handle a packed-switch or sparse-switch instruction. In both cases 1467 * we decode it and hand it off to a helper function. 1468 * 1469 * We don't really expect backward branches in a switch statement, but 1470 * they're perfectly legal, so we check for them here. 1471 * 1472 * When the JIT is present, all targets are considered treated as 1473 * a potential trace heads regardless of branch direction. 1474 * 1475 * for: packed-switch, sparse-switch 1476 */ 1477 /* op vAA, +BBBB */ 1478 FETCH(a0, 1) # a0 <- bbbb (lo) 1479 FETCH(a1, 2) # a1 <- BBBB (hi) 1480 GET_OPA(a3) # a3 <- AA 1481 sll t0, a1, 16 1482 or a0, a0, t0 # a0 <- BBBBbbbb 1483 GET_VREG(a1, a3) # a1 <- vAA 1484 EAS1(a0, rPC, a0) # a0 <- PC + BBBBbbbb*2 1485 JAL(dvmInterpHandleSparseSwitch) # a0 <- code-unit branch offset 1486 addu a1, v0, v0 # a1 <- byte offset 1487 bgtz a1, 1f 1488 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 14891: 1490 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 1491#if defined(WITH_JIT) 1492 lw a0, offThread_pJitProfTable(rSELF) 1493 bnez a0, common_updateProfile 1494#endif 1495 GET_INST_OPCODE(t0) # extract opcode from rINST 1496 GOTO_OPCODE(t0) # jump to next instruction 1497 1498 1499/* ------------------------------ */ 1500 .balign 128 1501.L_OP_CMPL_FLOAT: /* 0x2d */ 1502/* File: mips/OP_CMPL_FLOAT.S */ 1503 /* 1504 * Compare two floating-point values. Puts 0, 1, or -1 into the 1505 * destination register based on the results of the comparison. 1506 * 1507 * Provide a "naninst" instruction that puts 1 or -1 into a1 depending 1508 * on what value we'd like to return when one of the operands is NaN. 1509 * 1510 * The operation we're implementing is: 1511 * if (x == y) 1512 * return 0; 1513 * else if (x < y) 1514 * return -1; 1515 * else if (x > y) 1516 * return 1; 1517 * else 1518 * return {-1,1}; // one or both operands was NaN 1519 * 1520 * for: cmpl-float, cmpg-float 1521 */ 1522 /* op vAA, vBB, vCC */ 1523 1524 /* "clasic" form */ 1525 FETCH(a0, 1) # a0 <- CCBB 1526 and a2, a0, 255 # a2 <- BB 1527 srl a3, a0, 8 1528#ifdef SOFT_FLOAT 1529 GET_VREG(rOBJ, a2) # rOBJ <- vBB 1530 GET_VREG(rBIX, a3) # rBIX <- vCC 1531 move a0, rOBJ # a0 <- vBB 1532 move a1, rBIX # a1 <- vCC 1533 JAL(__eqsf2) # a0 <- (vBB == vCC) 1534 li rTEMP, 0 # set rTEMP to 0 1535 beqz v0, OP_CMPL_FLOAT_finish 1536 move a0, rOBJ # a0 <- vBB 1537 move a1, rBIX # a1 <- vCC 1538 JAL(__ltsf2) # a0 <- (vBB < vCC) 1539 li rTEMP, -1 1540 bltz v0, OP_CMPL_FLOAT_finish 1541 move a0, rOBJ # a0 <- vBB 1542 move a1, rBIX # a1 <- vCC 1543 b OP_CMPL_FLOAT_continue 1544#else 1545 GET_VREG_F(ft0, a2) 1546 GET_VREG_F(ft1, a3) 1547 c.olt.s fcc0, ft0, ft1 # Is ft0 < ft1 1548 li rTEMP, -1 1549 bc1t fcc0, OP_CMPL_FLOAT_finish 1550 c.olt.s fcc0, ft1, ft0 1551 li rTEMP, 1 1552 bc1t fcc0, OP_CMPL_FLOAT_finish 1553 c.eq.s fcc0, ft0, ft1 1554 li rTEMP, 0 1555 bc1t fcc0, OP_CMPL_FLOAT_finish 1556 b OP_CMPL_FLOAT_nan 1557 1558#endif 1559 1560 1561/* ------------------------------ */ 1562 .balign 128 1563.L_OP_CMPG_FLOAT: /* 0x2e */ 1564/* File: mips/OP_CMPG_FLOAT.S */ 1565/* File: mips/OP_CMPL_FLOAT.S */ 1566 /* 1567 * Compare two floating-point values. Puts 0, 1, or -1 into the 1568 * destination register based on the results of the comparison. 1569 * 1570 * Provide a "naninst" instruction that puts 1 or -1 into a1 depending 1571 * on what value we'd like to return when one of the operands is NaN. 1572 * 1573 * The operation we're implementing is: 1574 * if (x == y) 1575 * return 0; 1576 * else if (x < y) 1577 * return -1; 1578 * else if (x > y) 1579 * return 1; 1580 * else 1581 * return {-1,1}; // one or both operands was NaN 1582 * 1583 * for: cmpl-float, cmpg-float 1584 */ 1585 /* op vAA, vBB, vCC */ 1586 1587 /* "clasic" form */ 1588 FETCH(a0, 1) # a0 <- CCBB 1589 and a2, a0, 255 # a2 <- BB 1590 srl a3, a0, 8 1591#ifdef SOFT_FLOAT 1592 GET_VREG(rOBJ, a2) # rOBJ <- vBB 1593 GET_VREG(rBIX, a3) # rBIX <- vCC 1594 move a0, rOBJ # a0 <- vBB 1595 move a1, rBIX # a1 <- vCC 1596 JAL(__eqsf2) # a0 <- (vBB == vCC) 1597 li rTEMP, 0 # set rTEMP to 0 1598 beqz v0, OP_CMPG_FLOAT_finish 1599 move a0, rOBJ # a0 <- vBB 1600 move a1, rBIX # a1 <- vCC 1601 JAL(__ltsf2) # a0 <- (vBB < vCC) 1602 li rTEMP, -1 1603 bltz v0, OP_CMPG_FLOAT_finish 1604 move a0, rOBJ # a0 <- vBB 1605 move a1, rBIX # a1 <- vCC 1606 b OP_CMPG_FLOAT_continue 1607#else 1608 GET_VREG_F(ft0, a2) 1609 GET_VREG_F(ft1, a3) 1610 c.olt.s fcc0, ft0, ft1 # Is ft0 < ft1 1611 li rTEMP, -1 1612 bc1t fcc0, OP_CMPG_FLOAT_finish 1613 c.olt.s fcc0, ft1, ft0 1614 li rTEMP, 1 1615 bc1t fcc0, OP_CMPG_FLOAT_finish 1616 c.eq.s fcc0, ft0, ft1 1617 li rTEMP, 0 1618 bc1t fcc0, OP_CMPG_FLOAT_finish 1619 b OP_CMPG_FLOAT_nan 1620 1621#endif 1622 1623 1624 1625/* ------------------------------ */ 1626 .balign 128 1627.L_OP_CMPL_DOUBLE: /* 0x2f */ 1628/* File: mips/OP_CMPL_DOUBLE.S */ 1629 /* 1630 * Compare two floating-point values. Puts 0, 1, or -1 into the 1631 * destination register based on the results of the comparison. 1632 * 1633 * Provide a "naninst" instruction that puts 1 or -1 into a1 depending 1634 * on what value we'd like to return when one of the operands is NaN. 1635 * 1636 * See OP_CMPL_FLOAT for an explanation. 1637 * 1638 * For: cmpl-double, cmpg-double 1639 */ 1640 /* op vAA, vBB, vCC */ 1641 1642 FETCH(a0, 1) # a0 <- CCBB 1643 and rOBJ, a0, 255 # s0 <- BB 1644 srl rBIX, a0, 8 # t0 <- CC 1645 EAS2(rOBJ, rFP, rOBJ) # s0 <- &fp[BB] 1646 EAS2(rBIX, rFP, rBIX) # t0 <- &fp[CC] 1647#ifdef SOFT_FLOAT 1648 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vBB/vBB+1 1649 LOAD64(rARG2, rARG3, rBIX) # a2/a3 <- vCC/vCC+1 1650 JAL(__eqdf2) # cmp <=: C clear if <, Z set if eq 1651 li rTEMP, 0 1652 beqz v0, OP_CMPL_DOUBLE_finish 1653 1654 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vBB/vBB+1 1655 LOAD64(rARG2, rARG3, rBIX) # a2/a3 <- vCC/vCC+1 1656 JAL(__ltdf2) 1657 li rTEMP, -1 1658 bltz v0, OP_CMPL_DOUBLE_finish 1659 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vBB/vBB+1 1660 b OP_CMPL_DOUBLE_continue 1661#else 1662 LOAD64_F(ft0, ft0f, rOBJ) 1663 LOAD64_F(ft1, ft1f, rBIX) 1664 c.olt.d fcc0, ft0, ft1 1665 li rTEMP, -1 1666 bc1t fcc0, OP_CMPL_DOUBLE_finish 1667 c.olt.d fcc0, ft1, ft0 1668 li rTEMP, 1 1669 bc1t fcc0, OP_CMPL_DOUBLE_finish 1670 c.eq.d fcc0, ft0, ft1 1671 li rTEMP, 0 1672 bc1t fcc0, OP_CMPL_DOUBLE_finish 1673 b OP_CMPL_DOUBLE_nan 1674#endif 1675 1676/* ------------------------------ */ 1677 .balign 128 1678.L_OP_CMPG_DOUBLE: /* 0x30 */ 1679/* File: mips/OP_CMPG_DOUBLE.S */ 1680/* File: mips/OP_CMPL_DOUBLE.S */ 1681 /* 1682 * Compare two floating-point values. Puts 0, 1, or -1 into the 1683 * destination register based on the results of the comparison. 1684 * 1685 * Provide a "naninst" instruction that puts 1 or -1 into a1 depending 1686 * on what value we'd like to return when one of the operands is NaN. 1687 * 1688 * See OP_CMPL_FLOAT for an explanation. 1689 * 1690 * For: cmpl-double, cmpg-double 1691 */ 1692 /* op vAA, vBB, vCC */ 1693 1694 FETCH(a0, 1) # a0 <- CCBB 1695 and rOBJ, a0, 255 # s0 <- BB 1696 srl rBIX, a0, 8 # t0 <- CC 1697 EAS2(rOBJ, rFP, rOBJ) # s0 <- &fp[BB] 1698 EAS2(rBIX, rFP, rBIX) # t0 <- &fp[CC] 1699#ifdef SOFT_FLOAT 1700 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vBB/vBB+1 1701 LOAD64(rARG2, rARG3, rBIX) # a2/a3 <- vCC/vCC+1 1702 JAL(__eqdf2) # cmp <=: C clear if <, Z set if eq 1703 li rTEMP, 0 1704 beqz v0, OP_CMPG_DOUBLE_finish 1705 1706 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vBB/vBB+1 1707 LOAD64(rARG2, rARG3, rBIX) # a2/a3 <- vCC/vCC+1 1708 JAL(__ltdf2) 1709 li rTEMP, -1 1710 bltz v0, OP_CMPG_DOUBLE_finish 1711 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vBB/vBB+1 1712 b OP_CMPG_DOUBLE_continue 1713#else 1714 LOAD64_F(ft0, ft0f, rOBJ) 1715 LOAD64_F(ft1, ft1f, rBIX) 1716 c.olt.d fcc0, ft0, ft1 1717 li rTEMP, -1 1718 bc1t fcc0, OP_CMPG_DOUBLE_finish 1719 c.olt.d fcc0, ft1, ft0 1720 li rTEMP, 1 1721 bc1t fcc0, OP_CMPG_DOUBLE_finish 1722 c.eq.d fcc0, ft0, ft1 1723 li rTEMP, 0 1724 bc1t fcc0, OP_CMPG_DOUBLE_finish 1725 b OP_CMPG_DOUBLE_nan 1726#endif 1727 1728 1729/* ------------------------------ */ 1730 .balign 128 1731.L_OP_CMP_LONG: /* 0x31 */ 1732/* File: mips/OP_CMP_LONG.S */ 1733 /* 1734 * Compare two 64-bit values 1735 * x = y return 0 1736 * x < y return -1 1737 * x > y return 1 1738 * 1739 * I think I can improve on the ARM code by the following observation 1740 * slt t0, x.hi, y.hi; # (x.hi < y.hi) ? 1:0 1741 * sgt t1, x.hi, y.hi; # (y.hi > x.hi) ? 1:0 1742 * subu v0, t0, t1 # v0= -1:1:0 for [ < > = ] 1743 */ 1744 /* cmp-long vAA, vBB, vCC */ 1745 FETCH(a0, 1) # a0 <- CCBB 1746 GET_OPA(rOBJ) # rOBJ <- AA 1747 and a2, a0, 255 # a2 <- BB 1748 srl a3, a0, 8 # a3 <- CC 1749 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 1750 EAS2(a3, rFP, a3) # a3 <- &fp[CC] 1751 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 1752 LOAD64(a2, a3, a3) # a2/a3 <- vCC/vCC+1 1753 1754 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 1755 slt t0, a1, a3 # compare hi 1756 sgt t1, a1, a3 1757 subu v0, t1, t0 # v0 <- (-1, 1, 0) 1758 bnez v0, .LOP_CMP_LONG_finish 1759 # at this point x.hi==y.hi 1760 sltu t0, a0, a2 # compare lo 1761 sgtu t1, a0, a2 1762 subu v0, t1, t0 # v0 <- (-1, 1, 0) for [< > =] 1763 1764.LOP_CMP_LONG_finish: 1765 SET_VREG(v0, rOBJ) # vAA <- v0 1766 GET_INST_OPCODE(t0) # extract opcode from rINST 1767 GOTO_OPCODE(t0) # jump to next instruction 1768 1769 1770/* ------------------------------ */ 1771 .balign 128 1772.L_OP_IF_EQ: /* 0x32 */ 1773/* File: mips/OP_IF_EQ.S */ 1774/* File: mips/bincmp.S */ 1775 /* 1776 * Generic two-operand compare-and-branch operation. Provide a "revcmp" 1777 * fragment that specifies the *reverse* comparison to perform, e.g. 1778 * for "if-le" you would use "gt". 1779 * 1780 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le 1781 */ 1782 /* if-cmp vA, vB, +CCCC */ 1783 GET_OPA4(a0) # a0 <- A+ 1784 GET_OPB(a1) # a1 <- B 1785 GET_VREG(a3, a1) # a3 <- vB 1786 GET_VREG(a2, a0) # a2 <- vA 1787 bne a2, a3, 1f # branch to 1 if comparison failed 1788 FETCH_S(a1, 1) # a1<- branch offset, in code units 1789 b 2f 17901: 1791 li a1, 2 # a1- BYTE branch dist for not-taken 17922: 1793 addu a2, a1, a1 # convert to bytes 1794 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST 1795#if defined(WITH_JIT) 1796 lw a0, offThread_pJitProfTable(rSELF) 1797 bgez a2, 3f 1798 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 17993: 1800 bnez a0, common_updateProfile 1801#else 1802 bgez a2, 4f 1803 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 18044: 1805#endif 1806 GET_INST_OPCODE(t0) # extract opcode from rINST 1807 GOTO_OPCODE(t0) # jump to next instruction 1808 1809 1810/* ------------------------------ */ 1811 .balign 128 1812.L_OP_IF_NE: /* 0x33 */ 1813/* File: mips/OP_IF_NE.S */ 1814/* File: mips/bincmp.S */ 1815 /* 1816 * Generic two-operand compare-and-branch operation. Provide a "revcmp" 1817 * fragment that specifies the *reverse* comparison to perform, e.g. 1818 * for "if-le" you would use "gt". 1819 * 1820 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le 1821 */ 1822 /* if-cmp vA, vB, +CCCC */ 1823 GET_OPA4(a0) # a0 <- A+ 1824 GET_OPB(a1) # a1 <- B 1825 GET_VREG(a3, a1) # a3 <- vB 1826 GET_VREG(a2, a0) # a2 <- vA 1827 beq a2, a3, 1f # branch to 1 if comparison failed 1828 FETCH_S(a1, 1) # a1<- branch offset, in code units 1829 b 2f 18301: 1831 li a1, 2 # a1- BYTE branch dist for not-taken 18322: 1833 addu a2, a1, a1 # convert to bytes 1834 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST 1835#if defined(WITH_JIT) 1836 lw a0, offThread_pJitProfTable(rSELF) 1837 bgez a2, 3f 1838 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 18393: 1840 bnez a0, common_updateProfile 1841#else 1842 bgez a2, 4f 1843 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 18444: 1845#endif 1846 GET_INST_OPCODE(t0) # extract opcode from rINST 1847 GOTO_OPCODE(t0) # jump to next instruction 1848 1849 1850/* ------------------------------ */ 1851 .balign 128 1852.L_OP_IF_LT: /* 0x34 */ 1853/* File: mips/OP_IF_LT.S */ 1854/* File: mips/bincmp.S */ 1855 /* 1856 * Generic two-operand compare-and-branch operation. Provide a "revcmp" 1857 * fragment that specifies the *reverse* comparison to perform, e.g. 1858 * for "if-le" you would use "gt". 1859 * 1860 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le 1861 */ 1862 /* if-cmp vA, vB, +CCCC */ 1863 GET_OPA4(a0) # a0 <- A+ 1864 GET_OPB(a1) # a1 <- B 1865 GET_VREG(a3, a1) # a3 <- vB 1866 GET_VREG(a2, a0) # a2 <- vA 1867 bge a2, a3, 1f # branch to 1 if comparison failed 1868 FETCH_S(a1, 1) # a1<- branch offset, in code units 1869 b 2f 18701: 1871 li a1, 2 # a1- BYTE branch dist for not-taken 18722: 1873 addu a2, a1, a1 # convert to bytes 1874 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST 1875#if defined(WITH_JIT) 1876 lw a0, offThread_pJitProfTable(rSELF) 1877 bgez a2, 3f 1878 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 18793: 1880 bnez a0, common_updateProfile 1881#else 1882 bgez a2, 4f 1883 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 18844: 1885#endif 1886 GET_INST_OPCODE(t0) # extract opcode from rINST 1887 GOTO_OPCODE(t0) # jump to next instruction 1888 1889 1890/* ------------------------------ */ 1891 .balign 128 1892.L_OP_IF_GE: /* 0x35 */ 1893/* File: mips/OP_IF_GE.S */ 1894/* File: mips/bincmp.S */ 1895 /* 1896 * Generic two-operand compare-and-branch operation. Provide a "revcmp" 1897 * fragment that specifies the *reverse* comparison to perform, e.g. 1898 * for "if-le" you would use "gt". 1899 * 1900 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le 1901 */ 1902 /* if-cmp vA, vB, +CCCC */ 1903 GET_OPA4(a0) # a0 <- A+ 1904 GET_OPB(a1) # a1 <- B 1905 GET_VREG(a3, a1) # a3 <- vB 1906 GET_VREG(a2, a0) # a2 <- vA 1907 blt a2, a3, 1f # branch to 1 if comparison failed 1908 FETCH_S(a1, 1) # a1<- branch offset, in code units 1909 b 2f 19101: 1911 li a1, 2 # a1- BYTE branch dist for not-taken 19122: 1913 addu a2, a1, a1 # convert to bytes 1914 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST 1915#if defined(WITH_JIT) 1916 lw a0, offThread_pJitProfTable(rSELF) 1917 bgez a2, 3f 1918 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 19193: 1920 bnez a0, common_updateProfile 1921#else 1922 bgez a2, 4f 1923 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 19244: 1925#endif 1926 GET_INST_OPCODE(t0) # extract opcode from rINST 1927 GOTO_OPCODE(t0) # jump to next instruction 1928 1929 1930/* ------------------------------ */ 1931 .balign 128 1932.L_OP_IF_GT: /* 0x36 */ 1933/* File: mips/OP_IF_GT.S */ 1934/* File: mips/bincmp.S */ 1935 /* 1936 * Generic two-operand compare-and-branch operation. Provide a "revcmp" 1937 * fragment that specifies the *reverse* comparison to perform, e.g. 1938 * for "if-le" you would use "gt". 1939 * 1940 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le 1941 */ 1942 /* if-cmp vA, vB, +CCCC */ 1943 GET_OPA4(a0) # a0 <- A+ 1944 GET_OPB(a1) # a1 <- B 1945 GET_VREG(a3, a1) # a3 <- vB 1946 GET_VREG(a2, a0) # a2 <- vA 1947 ble a2, a3, 1f # branch to 1 if comparison failed 1948 FETCH_S(a1, 1) # a1<- branch offset, in code units 1949 b 2f 19501: 1951 li a1, 2 # a1- BYTE branch dist for not-taken 19522: 1953 addu a2, a1, a1 # convert to bytes 1954 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST 1955#if defined(WITH_JIT) 1956 lw a0, offThread_pJitProfTable(rSELF) 1957 bgez a2, 3f 1958 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 19593: 1960 bnez a0, common_updateProfile 1961#else 1962 bgez a2, 4f 1963 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 19644: 1965#endif 1966 GET_INST_OPCODE(t0) # extract opcode from rINST 1967 GOTO_OPCODE(t0) # jump to next instruction 1968 1969 1970/* ------------------------------ */ 1971 .balign 128 1972.L_OP_IF_LE: /* 0x37 */ 1973/* File: mips/OP_IF_LE.S */ 1974/* File: mips/bincmp.S */ 1975 /* 1976 * Generic two-operand compare-and-branch operation. Provide a "revcmp" 1977 * fragment that specifies the *reverse* comparison to perform, e.g. 1978 * for "if-le" you would use "gt". 1979 * 1980 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le 1981 */ 1982 /* if-cmp vA, vB, +CCCC */ 1983 GET_OPA4(a0) # a0 <- A+ 1984 GET_OPB(a1) # a1 <- B 1985 GET_VREG(a3, a1) # a3 <- vB 1986 GET_VREG(a2, a0) # a2 <- vA 1987 bgt a2, a3, 1f # branch to 1 if comparison failed 1988 FETCH_S(a1, 1) # a1<- branch offset, in code units 1989 b 2f 19901: 1991 li a1, 2 # a1- BYTE branch dist for not-taken 19922: 1993 addu a2, a1, a1 # convert to bytes 1994 FETCH_ADVANCE_INST_RB(a2) # update rPC, load rINST 1995#if defined(WITH_JIT) 1996 lw a0, offThread_pJitProfTable(rSELF) 1997 bgez a2, 3f 1998 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 19993: 2000 bnez a0, common_updateProfile 2001#else 2002 bgez a2, 4f 2003 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 20044: 2005#endif 2006 GET_INST_OPCODE(t0) # extract opcode from rINST 2007 GOTO_OPCODE(t0) # jump to next instruction 2008 2009 2010/* ------------------------------ */ 2011 .balign 128 2012.L_OP_IF_EQZ: /* 0x38 */ 2013/* File: mips/OP_IF_EQZ.S */ 2014/* File: mips/zcmp.S */ 2015 /* 2016 * Generic one-operand compare-and-branch operation. Provide a "revcmp" 2017 * fragment that specifies the *reverse* comparison to perform, e.g. 2018 * for "if-le" you would use "gt". 2019 * 2020 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez 2021 */ 2022 /* if-cmp vAA, +BBBB */ 2023 GET_OPA(a0) # a0 <- AA 2024 GET_VREG(a2, a0) # a2 <- vAA 2025 FETCH_S(a1, 1) # a1 <- branch offset, in code units 2026 bne a2, zero, 1f # branch to 1 if comparison failed 2027 b 2f 20281: 2029 li a1, 2 # a1- BYTE branch dist for not-taken 20302: 2031 addu a1, a1, a1 # convert to bytes 2032 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 2033#if defined(WITH_JIT) 2034 lw a0, offThread_pJitProfTable(rSELF) 2035 bgez a1, 3f 2036 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh table base 20373: 2038 bnez a0, common_updateProfile # test for JIT off at target 2039#else 2040 bgez a1, 4f 2041 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rtable base 20424: 2043#endif 2044 GET_INST_OPCODE(t0) # extract opcode from rINST 2045 GOTO_OPCODE(t0) # jump to next instruction 2046 2047 2048/* ------------------------------ */ 2049 .balign 128 2050.L_OP_IF_NEZ: /* 0x39 */ 2051/* File: mips/OP_IF_NEZ.S */ 2052/* File: mips/zcmp.S */ 2053 /* 2054 * Generic one-operand compare-and-branch operation. Provide a "revcmp" 2055 * fragment that specifies the *reverse* comparison to perform, e.g. 2056 * for "if-le" you would use "gt". 2057 * 2058 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez 2059 */ 2060 /* if-cmp vAA, +BBBB */ 2061 GET_OPA(a0) # a0 <- AA 2062 GET_VREG(a2, a0) # a2 <- vAA 2063 FETCH_S(a1, 1) # a1 <- branch offset, in code units 2064 beq a2, zero, 1f # branch to 1 if comparison failed 2065 b 2f 20661: 2067 li a1, 2 # a1- BYTE branch dist for not-taken 20682: 2069 addu a1, a1, a1 # convert to bytes 2070 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 2071#if defined(WITH_JIT) 2072 lw a0, offThread_pJitProfTable(rSELF) 2073 bgez a1, 3f 2074 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh table base 20753: 2076 bnez a0, common_updateProfile # test for JIT off at target 2077#else 2078 bgez a1, 4f 2079 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rtable base 20804: 2081#endif 2082 GET_INST_OPCODE(t0) # extract opcode from rINST 2083 GOTO_OPCODE(t0) # jump to next instruction 2084 2085 2086/* ------------------------------ */ 2087 .balign 128 2088.L_OP_IF_LTZ: /* 0x3a */ 2089/* File: mips/OP_IF_LTZ.S */ 2090/* File: mips/zcmp.S */ 2091 /* 2092 * Generic one-operand compare-and-branch operation. Provide a "revcmp" 2093 * fragment that specifies the *reverse* comparison to perform, e.g. 2094 * for "if-le" you would use "gt". 2095 * 2096 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez 2097 */ 2098 /* if-cmp vAA, +BBBB */ 2099 GET_OPA(a0) # a0 <- AA 2100 GET_VREG(a2, a0) # a2 <- vAA 2101 FETCH_S(a1, 1) # a1 <- branch offset, in code units 2102 bge a2, zero, 1f # branch to 1 if comparison failed 2103 b 2f 21041: 2105 li a1, 2 # a1- BYTE branch dist for not-taken 21062: 2107 addu a1, a1, a1 # convert to bytes 2108 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 2109#if defined(WITH_JIT) 2110 lw a0, offThread_pJitProfTable(rSELF) 2111 bgez a1, 3f 2112 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh table base 21133: 2114 bnez a0, common_updateProfile # test for JIT off at target 2115#else 2116 bgez a1, 4f 2117 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rtable base 21184: 2119#endif 2120 GET_INST_OPCODE(t0) # extract opcode from rINST 2121 GOTO_OPCODE(t0) # jump to next instruction 2122 2123 2124/* ------------------------------ */ 2125 .balign 128 2126.L_OP_IF_GEZ: /* 0x3b */ 2127/* File: mips/OP_IF_GEZ.S */ 2128/* File: mips/zcmp.S */ 2129 /* 2130 * Generic one-operand compare-and-branch operation. Provide a "revcmp" 2131 * fragment that specifies the *reverse* comparison to perform, e.g. 2132 * for "if-le" you would use "gt". 2133 * 2134 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez 2135 */ 2136 /* if-cmp vAA, +BBBB */ 2137 GET_OPA(a0) # a0 <- AA 2138 GET_VREG(a2, a0) # a2 <- vAA 2139 FETCH_S(a1, 1) # a1 <- branch offset, in code units 2140 blt a2, zero, 1f # branch to 1 if comparison failed 2141 b 2f 21421: 2143 li a1, 2 # a1- BYTE branch dist for not-taken 21442: 2145 addu a1, a1, a1 # convert to bytes 2146 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 2147#if defined(WITH_JIT) 2148 lw a0, offThread_pJitProfTable(rSELF) 2149 bgez a1, 3f 2150 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh table base 21513: 2152 bnez a0, common_updateProfile # test for JIT off at target 2153#else 2154 bgez a1, 4f 2155 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rtable base 21564: 2157#endif 2158 GET_INST_OPCODE(t0) # extract opcode from rINST 2159 GOTO_OPCODE(t0) # jump to next instruction 2160 2161 2162/* ------------------------------ */ 2163 .balign 128 2164.L_OP_IF_GTZ: /* 0x3c */ 2165/* File: mips/OP_IF_GTZ.S */ 2166/* File: mips/zcmp.S */ 2167 /* 2168 * Generic one-operand compare-and-branch operation. Provide a "revcmp" 2169 * fragment that specifies the *reverse* comparison to perform, e.g. 2170 * for "if-le" you would use "gt". 2171 * 2172 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez 2173 */ 2174 /* if-cmp vAA, +BBBB */ 2175 GET_OPA(a0) # a0 <- AA 2176 GET_VREG(a2, a0) # a2 <- vAA 2177 FETCH_S(a1, 1) # a1 <- branch offset, in code units 2178 ble a2, zero, 1f # branch to 1 if comparison failed 2179 b 2f 21801: 2181 li a1, 2 # a1- BYTE branch dist for not-taken 21822: 2183 addu a1, a1, a1 # convert to bytes 2184 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 2185#if defined(WITH_JIT) 2186 lw a0, offThread_pJitProfTable(rSELF) 2187 bgez a1, 3f 2188 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh table base 21893: 2190 bnez a0, common_updateProfile # test for JIT off at target 2191#else 2192 bgez a1, 4f 2193 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rtable base 21944: 2195#endif 2196 GET_INST_OPCODE(t0) # extract opcode from rINST 2197 GOTO_OPCODE(t0) # jump to next instruction 2198 2199 2200/* ------------------------------ */ 2201 .balign 128 2202.L_OP_IF_LEZ: /* 0x3d */ 2203/* File: mips/OP_IF_LEZ.S */ 2204/* File: mips/zcmp.S */ 2205 /* 2206 * Generic one-operand compare-and-branch operation. Provide a "revcmp" 2207 * fragment that specifies the *reverse* comparison to perform, e.g. 2208 * for "if-le" you would use "gt". 2209 * 2210 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez 2211 */ 2212 /* if-cmp vAA, +BBBB */ 2213 GET_OPA(a0) # a0 <- AA 2214 GET_VREG(a2, a0) # a2 <- vAA 2215 FETCH_S(a1, 1) # a1 <- branch offset, in code units 2216 bgt a2, zero, 1f # branch to 1 if comparison failed 2217 b 2f 22181: 2219 li a1, 2 # a1- BYTE branch dist for not-taken 22202: 2221 addu a1, a1, a1 # convert to bytes 2222 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 2223#if defined(WITH_JIT) 2224 lw a0, offThread_pJitProfTable(rSELF) 2225 bgez a1, 3f 2226 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh table base 22273: 2228 bnez a0, common_updateProfile # test for JIT off at target 2229#else 2230 bgez a1, 4f 2231 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rtable base 22324: 2233#endif 2234 GET_INST_OPCODE(t0) # extract opcode from rINST 2235 GOTO_OPCODE(t0) # jump to next instruction 2236 2237 2238/* ------------------------------ */ 2239 .balign 128 2240.L_OP_UNUSED_3E: /* 0x3e */ 2241/* File: mips/OP_UNUSED_3E.S */ 2242/* File: mips/unused.S */ 2243 BAL(common_abort) 2244 2245 2246 2247/* ------------------------------ */ 2248 .balign 128 2249.L_OP_UNUSED_3F: /* 0x3f */ 2250/* File: mips/OP_UNUSED_3F.S */ 2251/* File: mips/unused.S */ 2252 BAL(common_abort) 2253 2254 2255 2256/* ------------------------------ */ 2257 .balign 128 2258.L_OP_UNUSED_40: /* 0x40 */ 2259/* File: mips/OP_UNUSED_40.S */ 2260/* File: mips/unused.S */ 2261 BAL(common_abort) 2262 2263 2264 2265/* ------------------------------ */ 2266 .balign 128 2267.L_OP_UNUSED_41: /* 0x41 */ 2268/* File: mips/OP_UNUSED_41.S */ 2269/* File: mips/unused.S */ 2270 BAL(common_abort) 2271 2272 2273 2274/* ------------------------------ */ 2275 .balign 128 2276.L_OP_UNUSED_42: /* 0x42 */ 2277/* File: mips/OP_UNUSED_42.S */ 2278/* File: mips/unused.S */ 2279 BAL(common_abort) 2280 2281 2282 2283/* ------------------------------ */ 2284 .balign 128 2285.L_OP_UNUSED_43: /* 0x43 */ 2286/* File: mips/OP_UNUSED_43.S */ 2287/* File: mips/unused.S */ 2288 BAL(common_abort) 2289 2290 2291 2292/* ------------------------------ */ 2293 .balign 128 2294.L_OP_AGET: /* 0x44 */ 2295/* File: mips/OP_AGET.S */ 2296 /* 2297 * Array get, 32 bits or less. vAA <- vBB[vCC]. 2298 * 2299 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17 2300 * instructions. We use a pair of FETCH_Bs instead. 2301 * 2302 * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short 2303 */ 2304 /* op vAA, vBB, vCC */ 2305 FETCH_B(a2, 1) # a2 <- BB 2306 GET_OPA(rOBJ) # rOBJ <- AA 2307 FETCH_C(a3, 1) # a3 <- CC 2308 GET_VREG(a0, a2) # a0 <- vBB (array object) 2309 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2310 # null array object? 2311 beqz a0, common_errNullObject # yes, bail 2312 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2313 .if 2 2314 EASN(a0, a0, a1, 2) # a0 <- arrayObj + index*width 2315 .else 2316 addu a0, a0, a1 2317 .endif 2318 # a1 >= a3; compare unsigned index 2319 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2320 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2321 lw a2, offArrayObject_contents(a0) # a2 <- vBB[vCC] 2322 GET_INST_OPCODE(t0) # extract opcode from rINST 2323 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2 2324 2325 2326/* ------------------------------ */ 2327 .balign 128 2328.L_OP_AGET_WIDE: /* 0x45 */ 2329/* File: mips/OP_AGET_WIDE.S */ 2330 /* 2331 * Array get, 64 bits. vAA <- vBB[vCC]. 2332 * 2333 * Arrays of long/double are 64-bit aligned. 2334 */ 2335 /* aget-wide vAA, vBB, vCC */ 2336 FETCH(a0, 1) # a0 <- CCBB 2337 GET_OPA(rOBJ) # rOBJ <- AA 2338 and a2, a0, 255 # a2 <- BB 2339 srl a3, a0, 8 # a3 <- CC 2340 GET_VREG(a0, a2) # a0 <- vBB (array object) 2341 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2342 # null array object? 2343 beqz a0, common_errNullObject # yes, bail 2344 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2345 EAS3(a0, a0, a1) # a0 <- arrayObj + index*width 2346 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2347 2348.LOP_AGET_WIDE_finish: 2349 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2350 LOAD64_off(a2, a3, a0, offArrayObject_contents) 2351 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 2352 GET_INST_OPCODE(t0) # extract opcode from rINST 2353 STORE64(a2, a3, rOBJ) # vAA/vAA+1 <- a2/a3 2354 GOTO_OPCODE(t0) # jump to next instruction 2355 2356 2357/* ------------------------------ */ 2358 .balign 128 2359.L_OP_AGET_OBJECT: /* 0x46 */ 2360/* File: mips/OP_AGET_OBJECT.S */ 2361/* File: mips/OP_AGET.S */ 2362 /* 2363 * Array get, 32 bits or less. vAA <- vBB[vCC]. 2364 * 2365 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17 2366 * instructions. We use a pair of FETCH_Bs instead. 2367 * 2368 * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short 2369 */ 2370 /* op vAA, vBB, vCC */ 2371 FETCH_B(a2, 1) # a2 <- BB 2372 GET_OPA(rOBJ) # rOBJ <- AA 2373 FETCH_C(a3, 1) # a3 <- CC 2374 GET_VREG(a0, a2) # a0 <- vBB (array object) 2375 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2376 # null array object? 2377 beqz a0, common_errNullObject # yes, bail 2378 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2379 .if 2 2380 EASN(a0, a0, a1, 2) # a0 <- arrayObj + index*width 2381 .else 2382 addu a0, a0, a1 2383 .endif 2384 # a1 >= a3; compare unsigned index 2385 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2386 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2387 lw a2, offArrayObject_contents(a0) # a2 <- vBB[vCC] 2388 GET_INST_OPCODE(t0) # extract opcode from rINST 2389 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2 2390 2391 2392 2393/* ------------------------------ */ 2394 .balign 128 2395.L_OP_AGET_BOOLEAN: /* 0x47 */ 2396/* File: mips/OP_AGET_BOOLEAN.S */ 2397/* File: mips/OP_AGET.S */ 2398 /* 2399 * Array get, 32 bits or less. vAA <- vBB[vCC]. 2400 * 2401 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17 2402 * instructions. We use a pair of FETCH_Bs instead. 2403 * 2404 * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short 2405 */ 2406 /* op vAA, vBB, vCC */ 2407 FETCH_B(a2, 1) # a2 <- BB 2408 GET_OPA(rOBJ) # rOBJ <- AA 2409 FETCH_C(a3, 1) # a3 <- CC 2410 GET_VREG(a0, a2) # a0 <- vBB (array object) 2411 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2412 # null array object? 2413 beqz a0, common_errNullObject # yes, bail 2414 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2415 .if 0 2416 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width 2417 .else 2418 addu a0, a0, a1 2419 .endif 2420 # a1 >= a3; compare unsigned index 2421 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2422 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2423 lbu a2, offArrayObject_contents(a0) # a2 <- vBB[vCC] 2424 GET_INST_OPCODE(t0) # extract opcode from rINST 2425 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2 2426 2427 2428 2429/* ------------------------------ */ 2430 .balign 128 2431.L_OP_AGET_BYTE: /* 0x48 */ 2432/* File: mips/OP_AGET_BYTE.S */ 2433/* File: mips/OP_AGET.S */ 2434 /* 2435 * Array get, 32 bits or less. vAA <- vBB[vCC]. 2436 * 2437 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17 2438 * instructions. We use a pair of FETCH_Bs instead. 2439 * 2440 * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short 2441 */ 2442 /* op vAA, vBB, vCC */ 2443 FETCH_B(a2, 1) # a2 <- BB 2444 GET_OPA(rOBJ) # rOBJ <- AA 2445 FETCH_C(a3, 1) # a3 <- CC 2446 GET_VREG(a0, a2) # a0 <- vBB (array object) 2447 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2448 # null array object? 2449 beqz a0, common_errNullObject # yes, bail 2450 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2451 .if 0 2452 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width 2453 .else 2454 addu a0, a0, a1 2455 .endif 2456 # a1 >= a3; compare unsigned index 2457 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2458 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2459 lb a2, offArrayObject_contents(a0) # a2 <- vBB[vCC] 2460 GET_INST_OPCODE(t0) # extract opcode from rINST 2461 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2 2462 2463 2464 2465/* ------------------------------ */ 2466 .balign 128 2467.L_OP_AGET_CHAR: /* 0x49 */ 2468/* File: mips/OP_AGET_CHAR.S */ 2469/* File: mips/OP_AGET.S */ 2470 /* 2471 * Array get, 32 bits or less. vAA <- vBB[vCC]. 2472 * 2473 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17 2474 * instructions. We use a pair of FETCH_Bs instead. 2475 * 2476 * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short 2477 */ 2478 /* op vAA, vBB, vCC */ 2479 FETCH_B(a2, 1) # a2 <- BB 2480 GET_OPA(rOBJ) # rOBJ <- AA 2481 FETCH_C(a3, 1) # a3 <- CC 2482 GET_VREG(a0, a2) # a0 <- vBB (array object) 2483 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2484 # null array object? 2485 beqz a0, common_errNullObject # yes, bail 2486 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2487 .if 1 2488 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width 2489 .else 2490 addu a0, a0, a1 2491 .endif 2492 # a1 >= a3; compare unsigned index 2493 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2494 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2495 lhu a2, offArrayObject_contents(a0) # a2 <- vBB[vCC] 2496 GET_INST_OPCODE(t0) # extract opcode from rINST 2497 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2 2498 2499 2500 2501/* ------------------------------ */ 2502 .balign 128 2503.L_OP_AGET_SHORT: /* 0x4a */ 2504/* File: mips/OP_AGET_SHORT.S */ 2505/* File: mips/OP_AGET.S */ 2506 /* 2507 * Array get, 32 bits or less. vAA <- vBB[vCC]. 2508 * 2509 * Note: using the usual FETCH/and/shift stuff, this fits in exactly 17 2510 * instructions. We use a pair of FETCH_Bs instead. 2511 * 2512 * for: aget, aget-object, aget-boolean, aget-byte, aget-char, aget-short 2513 */ 2514 /* op vAA, vBB, vCC */ 2515 FETCH_B(a2, 1) # a2 <- BB 2516 GET_OPA(rOBJ) # rOBJ <- AA 2517 FETCH_C(a3, 1) # a3 <- CC 2518 GET_VREG(a0, a2) # a0 <- vBB (array object) 2519 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2520 # null array object? 2521 beqz a0, common_errNullObject # yes, bail 2522 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2523 .if 1 2524 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width 2525 .else 2526 addu a0, a0, a1 2527 .endif 2528 # a1 >= a3; compare unsigned index 2529 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2530 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2531 lh a2, offArrayObject_contents(a0) # a2 <- vBB[vCC] 2532 GET_INST_OPCODE(t0) # extract opcode from rINST 2533 SET_VREG_GOTO(a2, rOBJ, t0) # vAA <- a2 2534 2535 2536 2537/* ------------------------------ */ 2538 .balign 128 2539.L_OP_APUT: /* 0x4b */ 2540/* File: mips/OP_APUT.S */ 2541 /* 2542 * Array put, 32 bits or less. vBB[vCC] <- vAA. 2543 * for: aput, aput-boolean, aput-byte, aput-char, aput-short 2544 */ 2545 /* op vAA, vBB, vCC */ 2546 FETCH_B(a2, 1) # a2 <- BB 2547 GET_OPA(rOBJ) # rOBJ <- AA 2548 FETCH_C(a3, 1) # a3 <- CC 2549 GET_VREG(a0, a2) # a0 <- vBB (array object) 2550 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2551 # null array object? 2552 beqz a0, common_errNullObject # yes, bail 2553 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2554 .if 2 2555 EASN(a0, a0, a1, 2) # a0 <- arrayObj + index*width 2556 .else 2557 addu a0, a0, a1 2558 .endif 2559 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2560 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2561 GET_VREG(a2, rOBJ) # a2 <- vAA 2562 GET_INST_OPCODE(t0) # extract opcode from rINST 2563 sw a2, offArrayObject_contents(a0) # vBB[vCC] <- a2 2564 GOTO_OPCODE(t0) # jump to next instruction 2565 2566 2567/* ------------------------------ */ 2568 .balign 128 2569.L_OP_APUT_WIDE: /* 0x4c */ 2570/* File: mips/OP_APUT_WIDE.S */ 2571 /* 2572 * Array put, 64 bits. vBB[vCC] <- vAA. 2573 * 2574 * Arrays of long/double are 64-bit aligned, so it's okay to use STRD. 2575 */ 2576 /* aput-wide vAA, vBB, vCC */ 2577 FETCH(a0, 1) # a0 <- CCBB 2578 GET_OPA(t0) # t0 <- AA 2579 and a2, a0, 255 # a2 <- BB 2580 srl a3, a0, 8 # a3 <- CC 2581 GET_VREG(a0, a2) # a0 <- vBB (array object) 2582 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2583 # null array object? 2584 beqz a0, common_errNullObject # yes, bail 2585 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2586 EAS3(a0, a0, a1) # a0 <- arrayObj + index*width 2587 EAS2(rOBJ, rFP, t0) # rOBJ <- &fp[AA] 2588 # compare unsigned index, length 2589 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2590 2591 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2592 LOAD64(a2, a3, rOBJ) # a2/a3 <- vAA/vAA+1 2593 GET_INST_OPCODE(t0) # extract opcode from rINST 2594 STORE64_off(a2, a3, a0, offArrayObject_contents) # a2/a3 <- vBB[vCC] 2595 GOTO_OPCODE(t0) # jump to next instruction 2596 2597 2598/* ------------------------------ */ 2599 .balign 128 2600.L_OP_APUT_OBJECT: /* 0x4d */ 2601/* File: mips/OP_APUT_OBJECT.S */ 2602 /* 2603 * Store an object into an array. vBB[vCC] <- vAA. 2604 * 2605 */ 2606 /* op vAA, vBB, vCC */ 2607 FETCH(a0, 1) # a0 <- CCBB 2608 GET_OPA(t1) # t1 <- AA 2609 and a2, a0, 255 # a2 <- BB 2610 srl a3, a0, 8 # a3 <- CC 2611 GET_VREG(rINST, a2) # rINST <- vBB (array object) 2612 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2613 GET_VREG(rBIX, t1) # rBIX <- vAA 2614 # null array object? 2615 beqz rINST, common_errNullObject # yes, bail 2616 2617 LOAD_base_offArrayObject_length(a3, rINST) # a3 <- arrayObj->length 2618 EAS2(rOBJ, rINST, a1) # rOBJ <- arrayObj + index*width 2619 # compare unsigned index, length 2620 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2621 /* 2622 * On entry: 2623 * rINST = vBB (arrayObj) 2624 * rBIX = vAA (obj) 2625 * rOBJ = offset into array (vBB + vCC * width) 2626 */ 2627 bnez rBIX, .LOP_APUT_OBJECT_checks # yes, skip type checks 2628.LOP_APUT_OBJECT_finish: 2629 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2630 GET_INST_OPCODE(t0) # extract opcode from rINST 2631 sw rBIX, offArrayObject_contents(rOBJ) # vBB[vCC] <- vAA 2632 GOTO_OPCODE(t0) # jump to next instruction 2633 2634 2635/* ------------------------------ */ 2636 .balign 128 2637.L_OP_APUT_BOOLEAN: /* 0x4e */ 2638/* File: mips/OP_APUT_BOOLEAN.S */ 2639/* File: mips/OP_APUT.S */ 2640 /* 2641 * Array put, 32 bits or less. vBB[vCC] <- vAA. 2642 * for: aput, aput-boolean, aput-byte, aput-char, aput-short 2643 */ 2644 /* op vAA, vBB, vCC */ 2645 FETCH_B(a2, 1) # a2 <- BB 2646 GET_OPA(rOBJ) # rOBJ <- AA 2647 FETCH_C(a3, 1) # a3 <- CC 2648 GET_VREG(a0, a2) # a0 <- vBB (array object) 2649 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2650 # null array object? 2651 beqz a0, common_errNullObject # yes, bail 2652 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2653 .if 0 2654 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width 2655 .else 2656 addu a0, a0, a1 2657 .endif 2658 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2659 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2660 GET_VREG(a2, rOBJ) # a2 <- vAA 2661 GET_INST_OPCODE(t0) # extract opcode from rINST 2662 sb a2, offArrayObject_contents(a0) # vBB[vCC] <- a2 2663 GOTO_OPCODE(t0) # jump to next instruction 2664 2665 2666 2667/* ------------------------------ */ 2668 .balign 128 2669.L_OP_APUT_BYTE: /* 0x4f */ 2670/* File: mips/OP_APUT_BYTE.S */ 2671/* File: mips/OP_APUT.S */ 2672 /* 2673 * Array put, 32 bits or less. vBB[vCC] <- vAA. 2674 * for: aput, aput-boolean, aput-byte, aput-char, aput-short 2675 */ 2676 /* op vAA, vBB, vCC */ 2677 FETCH_B(a2, 1) # a2 <- BB 2678 GET_OPA(rOBJ) # rOBJ <- AA 2679 FETCH_C(a3, 1) # a3 <- CC 2680 GET_VREG(a0, a2) # a0 <- vBB (array object) 2681 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2682 # null array object? 2683 beqz a0, common_errNullObject # yes, bail 2684 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2685 .if 0 2686 EASN(a0, a0, a1, 0) # a0 <- arrayObj + index*width 2687 .else 2688 addu a0, a0, a1 2689 .endif 2690 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2691 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2692 GET_VREG(a2, rOBJ) # a2 <- vAA 2693 GET_INST_OPCODE(t0) # extract opcode from rINST 2694 sb a2, offArrayObject_contents(a0) # vBB[vCC] <- a2 2695 GOTO_OPCODE(t0) # jump to next instruction 2696 2697 2698 2699/* ------------------------------ */ 2700 .balign 128 2701.L_OP_APUT_CHAR: /* 0x50 */ 2702/* File: mips/OP_APUT_CHAR.S */ 2703/* File: mips/OP_APUT.S */ 2704 /* 2705 * Array put, 32 bits or less. vBB[vCC] <- vAA. 2706 * for: aput, aput-boolean, aput-byte, aput-char, aput-short 2707 */ 2708 /* op vAA, vBB, vCC */ 2709 FETCH_B(a2, 1) # a2 <- BB 2710 GET_OPA(rOBJ) # rOBJ <- AA 2711 FETCH_C(a3, 1) # a3 <- CC 2712 GET_VREG(a0, a2) # a0 <- vBB (array object) 2713 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2714 # null array object? 2715 beqz a0, common_errNullObject # yes, bail 2716 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2717 .if 1 2718 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width 2719 .else 2720 addu a0, a0, a1 2721 .endif 2722 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2723 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2724 GET_VREG(a2, rOBJ) # a2 <- vAA 2725 GET_INST_OPCODE(t0) # extract opcode from rINST 2726 sh a2, offArrayObject_contents(a0) # vBB[vCC] <- a2 2727 GOTO_OPCODE(t0) # jump to next instruction 2728 2729 2730 2731/* ------------------------------ */ 2732 .balign 128 2733.L_OP_APUT_SHORT: /* 0x51 */ 2734/* File: mips/OP_APUT_SHORT.S */ 2735/* File: mips/OP_APUT.S */ 2736 /* 2737 * Array put, 32 bits or less. vBB[vCC] <- vAA. 2738 * for: aput, aput-boolean, aput-byte, aput-char, aput-short 2739 */ 2740 /* op vAA, vBB, vCC */ 2741 FETCH_B(a2, 1) # a2 <- BB 2742 GET_OPA(rOBJ) # rOBJ <- AA 2743 FETCH_C(a3, 1) # a3 <- CC 2744 GET_VREG(a0, a2) # a0 <- vBB (array object) 2745 GET_VREG(a1, a3) # a1 <- vCC (requested index) 2746 # null array object? 2747 beqz a0, common_errNullObject # yes, bail 2748 LOAD_base_offArrayObject_length(a3, a0) # a3 <- arrayObj->length 2749 .if 1 2750 EASN(a0, a0, a1, 1) # a0 <- arrayObj + index*width 2751 .else 2752 addu a0, a0, a1 2753 .endif 2754 bgeu a1, a3, common_errArrayIndex # index >= length, bail 2755 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 2756 GET_VREG(a2, rOBJ) # a2 <- vAA 2757 GET_INST_OPCODE(t0) # extract opcode from rINST 2758 sh a2, offArrayObject_contents(a0) # vBB[vCC] <- a2 2759 GOTO_OPCODE(t0) # jump to next instruction 2760 2761 2762 2763/* ------------------------------ */ 2764 .balign 128 2765.L_OP_IGET: /* 0x52 */ 2766/* File: mips/OP_IGET.S */ 2767 /* 2768 * General 32-bit instance field get. 2769 * 2770 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 2771 */ 2772 # op vA, vB, field /* CCCC */ 2773 GET_OPB(a0) # a0 <- B 2774 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2775 FETCH(a1, 1) # a1 <- field ref CCCC 2776 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 2777 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2778 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2779 # is resolved entry null? 2780 bnez a0, .LOP_IGET_finish # no, already resolved 2781 LOAD_rSELF_method(a2) # a2 <- current method 2782 EXPORT_PC() # resolve() could throw 2783 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2784 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2785 # test results 2786 move a0, v0 2787 bnez v0, .LOP_IGET_finish 2788 b common_exceptionThrown 2789 2790/* ------------------------------ */ 2791 .balign 128 2792.L_OP_IGET_WIDE: /* 0x53 */ 2793/* File: mips/OP_IGET_WIDE.S */ 2794 /* 2795 * Wide 32-bit instance field get. 2796 */ 2797 # iget-wide vA, vB, field /* CCCC */ 2798 GET_OPB(a0) # a0 <- B 2799 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2800 FETCH(a1, 1) # a1 <- field ref CCCC 2801 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pResFields 2802 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2803 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2804 # is resolved entry null? 2805 bnez a0, .LOP_IGET_WIDE_finish # no, already resolved 2806 LOAD_rSELF_method(a2) # a2 <- current method 2807 EXPORT_PC() # resolve() could throw 2808 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2809 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2810 # test return code 2811 move a0, v0 2812 bnez v0, .LOP_IGET_WIDE_finish 2813 b common_exceptionThrown 2814 2815/* ------------------------------ */ 2816 .balign 128 2817.L_OP_IGET_OBJECT: /* 0x54 */ 2818/* File: mips/OP_IGET_OBJECT.S */ 2819/* File: mips/OP_IGET.S */ 2820 /* 2821 * General 32-bit instance field get. 2822 * 2823 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 2824 */ 2825 # op vA, vB, field /* CCCC */ 2826 GET_OPB(a0) # a0 <- B 2827 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2828 FETCH(a1, 1) # a1 <- field ref CCCC 2829 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 2830 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2831 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2832 # is resolved entry null? 2833 bnez a0, .LOP_IGET_OBJECT_finish # no, already resolved 2834 LOAD_rSELF_method(a2) # a2 <- current method 2835 EXPORT_PC() # resolve() could throw 2836 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2837 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2838 # test results 2839 move a0, v0 2840 bnez v0, .LOP_IGET_OBJECT_finish 2841 b common_exceptionThrown 2842 2843 2844/* ------------------------------ */ 2845 .balign 128 2846.L_OP_IGET_BOOLEAN: /* 0x55 */ 2847/* File: mips/OP_IGET_BOOLEAN.S */ 2848/* File: mips/OP_IGET.S */ 2849 /* 2850 * General 32-bit instance field get. 2851 * 2852 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 2853 */ 2854 # op vA, vB, field /* CCCC */ 2855 GET_OPB(a0) # a0 <- B 2856 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2857 FETCH(a1, 1) # a1 <- field ref CCCC 2858 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 2859 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2860 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2861 # is resolved entry null? 2862 bnez a0, .LOP_IGET_BOOLEAN_finish # no, already resolved 2863 LOAD_rSELF_method(a2) # a2 <- current method 2864 EXPORT_PC() # resolve() could throw 2865 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2866 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2867 # test results 2868 move a0, v0 2869 bnez v0, .LOP_IGET_BOOLEAN_finish 2870 b common_exceptionThrown 2871 2872 2873/* ------------------------------ */ 2874 .balign 128 2875.L_OP_IGET_BYTE: /* 0x56 */ 2876/* File: mips/OP_IGET_BYTE.S */ 2877/* File: mips/OP_IGET.S */ 2878 /* 2879 * General 32-bit instance field get. 2880 * 2881 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 2882 */ 2883 # op vA, vB, field /* CCCC */ 2884 GET_OPB(a0) # a0 <- B 2885 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2886 FETCH(a1, 1) # a1 <- field ref CCCC 2887 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 2888 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2889 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2890 # is resolved entry null? 2891 bnez a0, .LOP_IGET_BYTE_finish # no, already resolved 2892 LOAD_rSELF_method(a2) # a2 <- current method 2893 EXPORT_PC() # resolve() could throw 2894 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2895 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2896 # test results 2897 move a0, v0 2898 bnez v0, .LOP_IGET_BYTE_finish 2899 b common_exceptionThrown 2900 2901 2902/* ------------------------------ */ 2903 .balign 128 2904.L_OP_IGET_CHAR: /* 0x57 */ 2905/* File: mips/OP_IGET_CHAR.S */ 2906/* File: mips/OP_IGET.S */ 2907 /* 2908 * General 32-bit instance field get. 2909 * 2910 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 2911 */ 2912 # op vA, vB, field /* CCCC */ 2913 GET_OPB(a0) # a0 <- B 2914 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2915 FETCH(a1, 1) # a1 <- field ref CCCC 2916 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 2917 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2918 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2919 # is resolved entry null? 2920 bnez a0, .LOP_IGET_CHAR_finish # no, already resolved 2921 LOAD_rSELF_method(a2) # a2 <- current method 2922 EXPORT_PC() # resolve() could throw 2923 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2924 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2925 # test results 2926 move a0, v0 2927 bnez v0, .LOP_IGET_CHAR_finish 2928 b common_exceptionThrown 2929 2930 2931/* ------------------------------ */ 2932 .balign 128 2933.L_OP_IGET_SHORT: /* 0x58 */ 2934/* File: mips/OP_IGET_SHORT.S */ 2935/* File: mips/OP_IGET.S */ 2936 /* 2937 * General 32-bit instance field get. 2938 * 2939 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 2940 */ 2941 # op vA, vB, field /* CCCC */ 2942 GET_OPB(a0) # a0 <- B 2943 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2944 FETCH(a1, 1) # a1 <- field ref CCCC 2945 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 2946 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2947 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2948 # is resolved entry null? 2949 bnez a0, .LOP_IGET_SHORT_finish # no, already resolved 2950 LOAD_rSELF_method(a2) # a2 <- current method 2951 EXPORT_PC() # resolve() could throw 2952 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2953 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2954 # test results 2955 move a0, v0 2956 bnez v0, .LOP_IGET_SHORT_finish 2957 b common_exceptionThrown 2958 2959 2960/* ------------------------------ */ 2961 .balign 128 2962.L_OP_IPUT: /* 0x59 */ 2963/* File: mips/OP_IPUT.S */ 2964 /* 2965 * General 32-bit instance field put. 2966 * 2967 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short 2968 */ 2969 # op vA, vB, field /* CCCC */ 2970 GET_OPB(a0) # a0 <- B 2971 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2972 FETCH(a1, 1) # a1 <- field ref CCCC 2973 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 2974 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2975 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2976 # is resolved entry null? 2977 bnez a0, .LOP_IPUT_finish # no, already resolved 2978 LOAD_rSELF_method(a2) # a2 <- current method 2979 EXPORT_PC() # resolve() could throw 2980 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 2981 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 2982 # success? 2983 move a0, v0 2984 bnez v0, .LOP_IPUT_finish # yes, finish up 2985 b common_exceptionThrown 2986 2987/* ------------------------------ */ 2988 .balign 128 2989.L_OP_IPUT_WIDE: /* 0x5a */ 2990/* File: mips/OP_IPUT_WIDE.S */ 2991 # iput-wide vA, vB, field /* CCCC */ 2992 GET_OPB(a0) # a0 <- B 2993 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 2994 FETCH(a1, 1) # a1 <- field ref CCCC 2995 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pResFields 2996 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 2997 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 2998 # is resolved entry null? 2999 bnez a0, .LOP_IPUT_WIDE_finish # no, already resolved 3000 LOAD_rSELF_method(a2) # a2 <- current method 3001 EXPORT_PC() # resolve() could throw 3002 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3003 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 3004 # success? 3005 move a0, v0 3006 bnez v0, .LOP_IPUT_WIDE_finish # yes, finish up 3007 b common_exceptionThrown 3008 3009/* ------------------------------ */ 3010 .balign 128 3011.L_OP_IPUT_OBJECT: /* 0x5b */ 3012/* File: mips/OP_IPUT_OBJECT.S */ 3013 /* 3014 * 32-bit instance field put. 3015 * 3016 * for: iput-object, iput-object-volatile 3017 */ 3018 # op vA, vB, field /* CCCC */ 3019 GET_OPB(a0) # a0 <- B 3020 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 3021 FETCH(a1, 1) # a1 <- field ref CCCC 3022 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 3023 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 3024 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 3025 # is resolved entry null? 3026 bnez a0, .LOP_IPUT_OBJECT_finish # no, already resolved 3027 LOAD_rSELF_method(a2) # a2 <- current method 3028 EXPORT_PC() # resolve() could throw 3029 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3030 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 3031 # success? 3032 move a0, v0 3033 bnez v0, .LOP_IPUT_OBJECT_finish # yes, finish up 3034 b common_exceptionThrown 3035 3036/* ------------------------------ */ 3037 .balign 128 3038.L_OP_IPUT_BOOLEAN: /* 0x5c */ 3039/* File: mips/OP_IPUT_BOOLEAN.S */ 3040/* File: mips/OP_IPUT.S */ 3041 /* 3042 * General 32-bit instance field put. 3043 * 3044 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short 3045 */ 3046 # op vA, vB, field /* CCCC */ 3047 GET_OPB(a0) # a0 <- B 3048 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 3049 FETCH(a1, 1) # a1 <- field ref CCCC 3050 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 3051 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 3052 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 3053 # is resolved entry null? 3054 bnez a0, .LOP_IPUT_BOOLEAN_finish # no, already resolved 3055 LOAD_rSELF_method(a2) # a2 <- current method 3056 EXPORT_PC() # resolve() could throw 3057 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3058 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 3059 # success? 3060 move a0, v0 3061 bnez v0, .LOP_IPUT_BOOLEAN_finish # yes, finish up 3062 b common_exceptionThrown 3063 3064 3065/* ------------------------------ */ 3066 .balign 128 3067.L_OP_IPUT_BYTE: /* 0x5d */ 3068/* File: mips/OP_IPUT_BYTE.S */ 3069/* File: mips/OP_IPUT.S */ 3070 /* 3071 * General 32-bit instance field put. 3072 * 3073 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short 3074 */ 3075 # op vA, vB, field /* CCCC */ 3076 GET_OPB(a0) # a0 <- B 3077 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 3078 FETCH(a1, 1) # a1 <- field ref CCCC 3079 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 3080 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 3081 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 3082 # is resolved entry null? 3083 bnez a0, .LOP_IPUT_BYTE_finish # no, already resolved 3084 LOAD_rSELF_method(a2) # a2 <- current method 3085 EXPORT_PC() # resolve() could throw 3086 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3087 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 3088 # success? 3089 move a0, v0 3090 bnez v0, .LOP_IPUT_BYTE_finish # yes, finish up 3091 b common_exceptionThrown 3092 3093 3094/* ------------------------------ */ 3095 .balign 128 3096.L_OP_IPUT_CHAR: /* 0x5e */ 3097/* File: mips/OP_IPUT_CHAR.S */ 3098/* File: mips/OP_IPUT.S */ 3099 /* 3100 * General 32-bit instance field put. 3101 * 3102 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short 3103 */ 3104 # op vA, vB, field /* CCCC */ 3105 GET_OPB(a0) # a0 <- B 3106 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 3107 FETCH(a1, 1) # a1 <- field ref CCCC 3108 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 3109 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 3110 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 3111 # is resolved entry null? 3112 bnez a0, .LOP_IPUT_CHAR_finish # no, already resolved 3113 LOAD_rSELF_method(a2) # a2 <- current method 3114 EXPORT_PC() # resolve() could throw 3115 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3116 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 3117 # success? 3118 move a0, v0 3119 bnez v0, .LOP_IPUT_CHAR_finish # yes, finish up 3120 b common_exceptionThrown 3121 3122 3123/* ------------------------------ */ 3124 .balign 128 3125.L_OP_IPUT_SHORT: /* 0x5f */ 3126/* File: mips/OP_IPUT_SHORT.S */ 3127/* File: mips/OP_IPUT.S */ 3128 /* 3129 * General 32-bit instance field put. 3130 * 3131 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short 3132 */ 3133 # op vA, vB, field /* CCCC */ 3134 GET_OPB(a0) # a0 <- B 3135 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 3136 FETCH(a1, 1) # a1 <- field ref CCCC 3137 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 3138 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 3139 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 3140 # is resolved entry null? 3141 bnez a0, .LOP_IPUT_SHORT_finish # no, already resolved 3142 LOAD_rSELF_method(a2) # a2 <- current method 3143 EXPORT_PC() # resolve() could throw 3144 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3145 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 3146 # success? 3147 move a0, v0 3148 bnez v0, .LOP_IPUT_SHORT_finish # yes, finish up 3149 b common_exceptionThrown 3150 3151 3152/* ------------------------------ */ 3153 .balign 128 3154.L_OP_SGET: /* 0x60 */ 3155/* File: mips/OP_SGET.S */ 3156 /* 3157 * General 32-bit SGET handler. 3158 * 3159 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 3160 */ 3161 # op vAA, field /* BBBB */ 3162 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3163 FETCH(a1, 1) # a1 <- field ref BBBB 3164 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3165 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3166 # is resolved entry !null? 3167 bnez a0, .LOP_SGET_finish 3168 3169 /* 3170 * Continuation if the field has not yet been resolved. 3171 * a1: BBBB field ref 3172 * rBIX: dvmDex->pResFields 3173 */ 3174 LOAD_rSELF_method(a2) # a2 <- current method 3175#if defined(WITH_JIT) 3176 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3177#endif 3178 EXPORT_PC() # resolve() could throw, so export now 3179 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3180 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3181 move a0, v0 3182 # success? 3183 beqz v0, common_exceptionThrown # no, handle exception 3184#if defined(WITH_JIT) 3185 /* 3186 * If the JIT is actively building a trace we need to make sure 3187 * that the field is fully resolved before including this instruction. 3188 */ 3189 JAL(common_verifyField) 3190#endif 3191 b .LOP_SGET_finish # resume 3192 3193/* ------------------------------ */ 3194 .balign 128 3195.L_OP_SGET_WIDE: /* 0x61 */ 3196/* File: mips/OP_SGET_WIDE.S */ 3197 /* 3198 * 64-bit SGET handler. 3199 */ 3200 # sget-wide vAA, field /* BBBB */ 3201 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3202 FETCH(a1, 1) # a1 <- field ref BBBB 3203 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3204 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3205 # is resolved entry null? 3206 bnez a0, .LOP_SGET_WIDE_finish 3207 3208 /* 3209 * Continuation if the field has not yet been resolved. 3210 * a1: BBBB field ref 3211 * rBIX: dvmDex->pResFields 3212 * 3213 * Returns StaticField pointer in v0. 3214 */ 3215 LOAD_rSELF_method(a2) # a2 <- current method 3216#if defined(WITH_JIT) 3217 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3218#endif 3219 EXPORT_PC() # resolve() could throw, so export now 3220 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3221 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3222 move a0, v0 3223 # success? 3224 beqz v0, common_exceptionThrown # no, handle exception 3225#if defined(WITH_JIT) 3226 /* 3227 * If the JIT is actively building a trace we need to make sure 3228 * that the field is fully resolved before including this instruction. 3229 */ 3230 JAL(common_verifyField) 3231#endif 3232 3233 b .LOP_SGET_WIDE_finish # resume 3234 3235/* ------------------------------ */ 3236 .balign 128 3237.L_OP_SGET_OBJECT: /* 0x62 */ 3238/* File: mips/OP_SGET_OBJECT.S */ 3239/* File: mips/OP_SGET.S */ 3240 /* 3241 * General 32-bit SGET handler. 3242 * 3243 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 3244 */ 3245 # op vAA, field /* BBBB */ 3246 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3247 FETCH(a1, 1) # a1 <- field ref BBBB 3248 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3249 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3250 # is resolved entry !null? 3251 bnez a0, .LOP_SGET_OBJECT_finish 3252 3253 /* 3254 * Continuation if the field has not yet been resolved. 3255 * a1: BBBB field ref 3256 * rBIX: dvmDex->pResFields 3257 */ 3258 LOAD_rSELF_method(a2) # a2 <- current method 3259#if defined(WITH_JIT) 3260 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3261#endif 3262 EXPORT_PC() # resolve() could throw, so export now 3263 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3264 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3265 move a0, v0 3266 # success? 3267 beqz v0, common_exceptionThrown # no, handle exception 3268#if defined(WITH_JIT) 3269 /* 3270 * If the JIT is actively building a trace we need to make sure 3271 * that the field is fully resolved before including this instruction. 3272 */ 3273 JAL(common_verifyField) 3274#endif 3275 b .LOP_SGET_OBJECT_finish # resume 3276 3277 3278/* ------------------------------ */ 3279 .balign 128 3280.L_OP_SGET_BOOLEAN: /* 0x63 */ 3281/* File: mips/OP_SGET_BOOLEAN.S */ 3282/* File: mips/OP_SGET.S */ 3283 /* 3284 * General 32-bit SGET handler. 3285 * 3286 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 3287 */ 3288 # op vAA, field /* BBBB */ 3289 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3290 FETCH(a1, 1) # a1 <- field ref BBBB 3291 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3292 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3293 # is resolved entry !null? 3294 bnez a0, .LOP_SGET_BOOLEAN_finish 3295 3296 /* 3297 * Continuation if the field has not yet been resolved. 3298 * a1: BBBB field ref 3299 * rBIX: dvmDex->pResFields 3300 */ 3301 LOAD_rSELF_method(a2) # a2 <- current method 3302#if defined(WITH_JIT) 3303 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3304#endif 3305 EXPORT_PC() # resolve() could throw, so export now 3306 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3307 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3308 move a0, v0 3309 # success? 3310 beqz v0, common_exceptionThrown # no, handle exception 3311#if defined(WITH_JIT) 3312 /* 3313 * If the JIT is actively building a trace we need to make sure 3314 * that the field is fully resolved before including this instruction. 3315 */ 3316 JAL(common_verifyField) 3317#endif 3318 b .LOP_SGET_BOOLEAN_finish # resume 3319 3320 3321/* ------------------------------ */ 3322 .balign 128 3323.L_OP_SGET_BYTE: /* 0x64 */ 3324/* File: mips/OP_SGET_BYTE.S */ 3325/* File: mips/OP_SGET.S */ 3326 /* 3327 * General 32-bit SGET handler. 3328 * 3329 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 3330 */ 3331 # op vAA, field /* BBBB */ 3332 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3333 FETCH(a1, 1) # a1 <- field ref BBBB 3334 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3335 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3336 # is resolved entry !null? 3337 bnez a0, .LOP_SGET_BYTE_finish 3338 3339 /* 3340 * Continuation if the field has not yet been resolved. 3341 * a1: BBBB field ref 3342 * rBIX: dvmDex->pResFields 3343 */ 3344 LOAD_rSELF_method(a2) # a2 <- current method 3345#if defined(WITH_JIT) 3346 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3347#endif 3348 EXPORT_PC() # resolve() could throw, so export now 3349 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3350 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3351 move a0, v0 3352 # success? 3353 beqz v0, common_exceptionThrown # no, handle exception 3354#if defined(WITH_JIT) 3355 /* 3356 * If the JIT is actively building a trace we need to make sure 3357 * that the field is fully resolved before including this instruction. 3358 */ 3359 JAL(common_verifyField) 3360#endif 3361 b .LOP_SGET_BYTE_finish # resume 3362 3363 3364/* ------------------------------ */ 3365 .balign 128 3366.L_OP_SGET_CHAR: /* 0x65 */ 3367/* File: mips/OP_SGET_CHAR.S */ 3368/* File: mips/OP_SGET.S */ 3369 /* 3370 * General 32-bit SGET handler. 3371 * 3372 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 3373 */ 3374 # op vAA, field /* BBBB */ 3375 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3376 FETCH(a1, 1) # a1 <- field ref BBBB 3377 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3378 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3379 # is resolved entry !null? 3380 bnez a0, .LOP_SGET_CHAR_finish 3381 3382 /* 3383 * Continuation if the field has not yet been resolved. 3384 * a1: BBBB field ref 3385 * rBIX: dvmDex->pResFields 3386 */ 3387 LOAD_rSELF_method(a2) # a2 <- current method 3388#if defined(WITH_JIT) 3389 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3390#endif 3391 EXPORT_PC() # resolve() could throw, so export now 3392 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3393 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3394 move a0, v0 3395 # success? 3396 beqz v0, common_exceptionThrown # no, handle exception 3397#if defined(WITH_JIT) 3398 /* 3399 * If the JIT is actively building a trace we need to make sure 3400 * that the field is fully resolved before including this instruction. 3401 */ 3402 JAL(common_verifyField) 3403#endif 3404 b .LOP_SGET_CHAR_finish # resume 3405 3406 3407/* ------------------------------ */ 3408 .balign 128 3409.L_OP_SGET_SHORT: /* 0x66 */ 3410/* File: mips/OP_SGET_SHORT.S */ 3411/* File: mips/OP_SGET.S */ 3412 /* 3413 * General 32-bit SGET handler. 3414 * 3415 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 3416 */ 3417 # op vAA, field /* BBBB */ 3418 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3419 FETCH(a1, 1) # a1 <- field ref BBBB 3420 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3421 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3422 # is resolved entry !null? 3423 bnez a0, .LOP_SGET_SHORT_finish 3424 3425 /* 3426 * Continuation if the field has not yet been resolved. 3427 * a1: BBBB field ref 3428 * rBIX: dvmDex->pResFields 3429 */ 3430 LOAD_rSELF_method(a2) # a2 <- current method 3431#if defined(WITH_JIT) 3432 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3433#endif 3434 EXPORT_PC() # resolve() could throw, so export now 3435 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3436 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3437 move a0, v0 3438 # success? 3439 beqz v0, common_exceptionThrown # no, handle exception 3440#if defined(WITH_JIT) 3441 /* 3442 * If the JIT is actively building a trace we need to make sure 3443 * that the field is fully resolved before including this instruction. 3444 */ 3445 JAL(common_verifyField) 3446#endif 3447 b .LOP_SGET_SHORT_finish # resume 3448 3449 3450/* ------------------------------ */ 3451 .balign 128 3452.L_OP_SPUT: /* 0x67 */ 3453/* File: mips/OP_SPUT.S */ 3454 /* 3455 * General 32-bit SPUT handler. 3456 * 3457 * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short 3458 */ 3459 # op vAA, field /* BBBB */ 3460 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3461 FETCH(a1, 1) # a1 <- field ref BBBB 3462 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3463 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3464 bnez a0, .LOP_SPUT_finish # is resolved entry null? 3465 /* 3466 * Continuation if the field has not yet been resolved. 3467 * a1: BBBB field ref 3468 * rBIX: dvmDex->pResFields 3469 */ 3470 LOAD_rSELF_method(a2) # a2 <- current method 3471#if defined(WITH_JIT) 3472 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3473#endif 3474 EXPORT_PC() # resolve() may throw, so export now 3475 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3476 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3477 move a0, v0 3478 beqz v0, common_exceptionThrown # success? no, handle exception 3479#if defined(WITH_JIT) 3480 /* 3481 * If the JIT is actively building a trace we need to make sure 3482 * that the field is fully resolved before including this instruction. 3483 */ 3484 JAL(common_verifyField) 3485#endif 3486 b .LOP_SPUT_finish # resume 3487 3488/* ------------------------------ */ 3489 .balign 128 3490.L_OP_SPUT_WIDE: /* 0x68 */ 3491/* File: mips/OP_SPUT_WIDE.S */ 3492 /* 3493 * 64-bit SPUT handler. 3494 */ 3495 # sput-wide vAA, field /* BBBB */ 3496 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3497 FETCH(a1, 1) # a1 <- field ref BBBB 3498 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3499 GET_OPA(t0) # t0 <- AA 3500 LOAD_eas2(a2, rBIX, a1) # a2 <- resolved StaticField ptr 3501 EAS2(rOBJ, rFP, t0) # rOBJ<- &fp[AA] 3502 # is resolved entry null? 3503 beqz a2, .LOP_SPUT_WIDE_resolve # yes, do resolve 3504.LOP_SPUT_WIDE_finish: # field ptr in a2, AA in rOBJ 3505 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 3506 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 3507 GET_INST_OPCODE(rBIX) # extract opcode from rINST 3508 .if 0 3509 addu a2, offStaticField_value # a2<- pointer to data 3510 JAL(dvmQuasiAtomicSwap64Sync) # stores a0/a1 into addr a2 3511 .else 3512 STORE64_off(a0, a1, a2, offStaticField_value) # field <- vAA/vAA+1 3513 .endif 3514 GOTO_OPCODE(rBIX) # jump to next instruction 3515 3516/* ------------------------------ */ 3517 .balign 128 3518.L_OP_SPUT_OBJECT: /* 0x69 */ 3519/* File: mips/OP_SPUT_OBJECT.S */ 3520 /* 3521 * General 32-bit SPUT handler. 3522 * 3523 * for: sput-object, sput-object-volatile 3524 */ 3525 /* op vAA, field@BBBB */ 3526 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3527 FETCH(a1, 1) # a1 <- field ref BBBB 3528 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3529 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3530 bnez a0, .LOP_SPUT_OBJECT_finish # is resolved entry null? 3531 3532 /* Continuation if the field has not yet been resolved. 3533 * a1: BBBB field ref 3534 * rBIX: dvmDex->pResFields 3535 */ 3536 LOAD_rSELF_method(a2) # a2 <- current method 3537#if defined(WITH_JIT) 3538 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3539#endif 3540 EXPORT_PC() # resolve() may throw, so export now 3541 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3542 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3543 move a0, v0 3544 beqz v0, common_exceptionThrown # success? no, handle exception 3545#if defined(WITH_JIT) 3546 /* 3547 * If the JIT is actively building a trace we need to make sure 3548 * that the field is fully resolved before including this instruction. 3549 */ 3550 JAL(common_verifyField) 3551#endif 3552 b .LOP_SPUT_OBJECT_finish # resume 3553 3554 3555/* ------------------------------ */ 3556 .balign 128 3557.L_OP_SPUT_BOOLEAN: /* 0x6a */ 3558/* File: mips/OP_SPUT_BOOLEAN.S */ 3559/* File: mips/OP_SPUT.S */ 3560 /* 3561 * General 32-bit SPUT handler. 3562 * 3563 * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short 3564 */ 3565 # op vAA, field /* BBBB */ 3566 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3567 FETCH(a1, 1) # a1 <- field ref BBBB 3568 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3569 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3570 bnez a0, .LOP_SPUT_BOOLEAN_finish # is resolved entry null? 3571 /* 3572 * Continuation if the field has not yet been resolved. 3573 * a1: BBBB field ref 3574 * rBIX: dvmDex->pResFields 3575 */ 3576 LOAD_rSELF_method(a2) # a2 <- current method 3577#if defined(WITH_JIT) 3578 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3579#endif 3580 EXPORT_PC() # resolve() may throw, so export now 3581 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3582 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3583 move a0, v0 3584 beqz v0, common_exceptionThrown # success? no, handle exception 3585#if defined(WITH_JIT) 3586 /* 3587 * If the JIT is actively building a trace we need to make sure 3588 * that the field is fully resolved before including this instruction. 3589 */ 3590 JAL(common_verifyField) 3591#endif 3592 b .LOP_SPUT_BOOLEAN_finish # resume 3593 3594 3595/* ------------------------------ */ 3596 .balign 128 3597.L_OP_SPUT_BYTE: /* 0x6b */ 3598/* File: mips/OP_SPUT_BYTE.S */ 3599/* File: mips/OP_SPUT.S */ 3600 /* 3601 * General 32-bit SPUT handler. 3602 * 3603 * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short 3604 */ 3605 # op vAA, field /* BBBB */ 3606 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3607 FETCH(a1, 1) # a1 <- field ref BBBB 3608 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3609 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3610 bnez a0, .LOP_SPUT_BYTE_finish # is resolved entry null? 3611 /* 3612 * Continuation if the field has not yet been resolved. 3613 * a1: BBBB field ref 3614 * rBIX: dvmDex->pResFields 3615 */ 3616 LOAD_rSELF_method(a2) # a2 <- current method 3617#if defined(WITH_JIT) 3618 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3619#endif 3620 EXPORT_PC() # resolve() may throw, so export now 3621 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3622 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3623 move a0, v0 3624 beqz v0, common_exceptionThrown # success? no, handle exception 3625#if defined(WITH_JIT) 3626 /* 3627 * If the JIT is actively building a trace we need to make sure 3628 * that the field is fully resolved before including this instruction. 3629 */ 3630 JAL(common_verifyField) 3631#endif 3632 b .LOP_SPUT_BYTE_finish # resume 3633 3634 3635/* ------------------------------ */ 3636 .balign 128 3637.L_OP_SPUT_CHAR: /* 0x6c */ 3638/* File: mips/OP_SPUT_CHAR.S */ 3639/* File: mips/OP_SPUT.S */ 3640 /* 3641 * General 32-bit SPUT handler. 3642 * 3643 * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short 3644 */ 3645 # op vAA, field /* BBBB */ 3646 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3647 FETCH(a1, 1) # a1 <- field ref BBBB 3648 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3649 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3650 bnez a0, .LOP_SPUT_CHAR_finish # is resolved entry null? 3651 /* 3652 * Continuation if the field has not yet been resolved. 3653 * a1: BBBB field ref 3654 * rBIX: dvmDex->pResFields 3655 */ 3656 LOAD_rSELF_method(a2) # a2 <- current method 3657#if defined(WITH_JIT) 3658 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3659#endif 3660 EXPORT_PC() # resolve() may throw, so export now 3661 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3662 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3663 move a0, v0 3664 beqz v0, common_exceptionThrown # success? no, handle exception 3665#if defined(WITH_JIT) 3666 /* 3667 * If the JIT is actively building a trace we need to make sure 3668 * that the field is fully resolved before including this instruction. 3669 */ 3670 JAL(common_verifyField) 3671#endif 3672 b .LOP_SPUT_CHAR_finish # resume 3673 3674 3675/* ------------------------------ */ 3676 .balign 128 3677.L_OP_SPUT_SHORT: /* 0x6d */ 3678/* File: mips/OP_SPUT_SHORT.S */ 3679/* File: mips/OP_SPUT.S */ 3680 /* 3681 * General 32-bit SPUT handler. 3682 * 3683 * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short 3684 */ 3685 # op vAA, field /* BBBB */ 3686 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 3687 FETCH(a1, 1) # a1 <- field ref BBBB 3688 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 3689 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 3690 bnez a0, .LOP_SPUT_SHORT_finish # is resolved entry null? 3691 /* 3692 * Continuation if the field has not yet been resolved. 3693 * a1: BBBB field ref 3694 * rBIX: dvmDex->pResFields 3695 */ 3696 LOAD_rSELF_method(a2) # a2 <- current method 3697#if defined(WITH_JIT) 3698 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 3699#endif 3700 EXPORT_PC() # resolve() may throw, so export now 3701 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 3702 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 3703 move a0, v0 3704 beqz v0, common_exceptionThrown # success? no, handle exception 3705#if defined(WITH_JIT) 3706 /* 3707 * If the JIT is actively building a trace we need to make sure 3708 * that the field is fully resolved before including this instruction. 3709 */ 3710 JAL(common_verifyField) 3711#endif 3712 b .LOP_SPUT_SHORT_finish # resume 3713 3714 3715/* ------------------------------ */ 3716 .balign 128 3717.L_OP_INVOKE_VIRTUAL: /* 0x6e */ 3718/* File: mips/OP_INVOKE_VIRTUAL.S */ 3719 /* 3720 * Handle a virtual method call. 3721 * 3722 * for: invoke-virtual, invoke-virtual/range 3723 */ 3724 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 3725 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 3726 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 3727 FETCH(a1, 1) # a1 <- BBBB 3728 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 3729 FETCH(rBIX, 2) # rBIX <- GFED or CCCC 3730 LOAD_eas2(a0, a3, a1) # a0 <- resolved baseMethod 3731 .if (!0) 3732 and rBIX, rBIX, 15 # rBIX <- D (or stays CCCC) 3733 .endif 3734 EXPORT_PC() # must export for invoke 3735 # already resolved? 3736 bnez a0, .LOP_INVOKE_VIRTUAL_continue # yes, continue on 3737 3738 LOAD_rSELF_method(a3) # a3 <- self->method 3739 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 3740 li a2, METHOD_VIRTUAL # resolver method type 3741 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 3742 move a0, v0 3743 # got null? 3744 bnez v0, .LOP_INVOKE_VIRTUAL_continue # no, continue 3745 b common_exceptionThrown # yes, handle exception 3746 3747/* ------------------------------ */ 3748 .balign 128 3749.L_OP_INVOKE_SUPER: /* 0x6f */ 3750/* File: mips/OP_INVOKE_SUPER.S */ 3751 /* 3752 * Handle a "super" method call. 3753 * 3754 * for: invoke-super, invoke-super/range 3755 */ 3756 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 3757 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 3758 FETCH(t0, 2) # t0 <- GFED or CCCC 3759 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 3760 .if (!0) 3761 and t0, t0, 15 # t0 <- D (or stays CCCC) 3762 .endif 3763 FETCH(a1, 1) # a1 <- BBBB 3764 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 3765 GET_VREG(rOBJ, t0) # rOBJ <- "this" ptr 3766 LOAD_eas2(a0, a3, a1) # a0 <- resolved baseMethod 3767 # null "this"? 3768 LOAD_rSELF_method(t1) # t1 <- current method 3769 beqz rOBJ, common_errNullObject # null "this", throw exception 3770 # cmp a0, 0; already resolved? 3771 LOAD_base_offMethod_clazz(rBIX, t1) # rBIX <- method->clazz 3772 EXPORT_PC() # must export for invoke 3773 bnez a0, .LOP_INVOKE_SUPER_continue # resolved, continue on 3774 3775 move a0, rBIX # a0 <- method->clazz 3776 li a2, METHOD_VIRTUAL # resolver method type 3777 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 3778 move a0, v0 3779 # got null? 3780 beqz v0, common_exceptionThrown # yes, handle exception 3781 b .LOP_INVOKE_SUPER_continue 3782 3783/* ------------------------------ */ 3784 .balign 128 3785.L_OP_INVOKE_DIRECT: /* 0x70 */ 3786/* File: mips/OP_INVOKE_DIRECT.S */ 3787 /* 3788 * Handle a direct method call. 3789 * 3790 * (We could defer the "is 'this' pointer null" test to the common 3791 * method invocation code, and use a flag to indicate that static 3792 * calls don't count. If we do this as part of copying the arguments 3793 * out we could avoiding loading the first arg twice.) 3794 * 3795 * for: invoke-direct, invoke-direct/range 3796 */ 3797 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 3798 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 3799 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 3800 FETCH(a1, 1) # a1 <- BBBB 3801 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 3802 FETCH(rBIX, 2) # rBIX <- GFED or CCCC 3803 LOAD_eas2(a0, a3, a1) # a0 <- resolved methodToCall 3804 .if (!0) 3805 and rBIX, rBIX, 15 # rBIX <- D (or stays CCCC) 3806 .endif 3807 EXPORT_PC() # must export for invoke 3808 GET_VREG(rOBJ, rBIX) # rOBJ <- "this" ptr 3809 # already resolved? 3810 bnez a0, 1f # resolved, call the function 3811 3812 lw a3, offThread_method(rSELF) # a3 <- self->method 3813 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 3814 li a2, METHOD_DIRECT # resolver method type 3815 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 3816 move a0, v0 3817 # got null? 3818 beqz v0, common_exceptionThrown # yes, handle exception 3819 38201: 3821 bnez rOBJ, common_invokeMethodNoRange # a0=method, rOBJ="this" 3822 b common_errNullObject # yes, throw exception 3823 3824 3825 3826 3827/* ------------------------------ */ 3828 .balign 128 3829.L_OP_INVOKE_STATIC: /* 0x71 */ 3830/* File: mips/OP_INVOKE_STATIC.S */ 3831 /* 3832 * Handle a static method call. 3833 * 3834 * for: invoke-static, invoke-static/range 3835 */ 3836 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 3837 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 3838 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 3839 FETCH(a1, 1) # a1 <- BBBB 3840 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 3841 li rOBJ, 0 # null "this" in delay slot 3842 LOAD_eas2(a0, a3, a1) # a0 <- resolved methodToCall 3843#if defined(WITH_JIT) 3844 EAS2(rBIX, a3, a1) # rBIX<- &resolved_metherToCall 3845#endif 3846 EXPORT_PC() # must export for invoke 3847 # already resolved? 3848 bnez a0, common_invokeMethodNoRange # yes, continue on 3849 b .LOP_INVOKE_STATIC_resolve 3850 3851/* ------------------------------ */ 3852 .balign 128 3853.L_OP_INVOKE_INTERFACE: /* 0x72 */ 3854/* File: mips/OP_INVOKE_INTERFACE.S */ 3855 /* 3856 * Handle an interface method call. 3857 * 3858 * for: invoke-interface, invoke-interface/range 3859 */ 3860 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */ 3861 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */ 3862 FETCH(a2, 2) # a2 <- FEDC or CCCC 3863 FETCH(a1, 1) # a1 <- BBBB 3864 .if (!0) 3865 and a2, 15 # a2 <- C (or stays CCCC) 3866 .endif 3867 EXPORT_PC() # must export for invoke 3868 GET_VREG(rOBJ, a2) # rOBJ <- first arg ("this") 3869 LOAD_rSELF_methodClassDex(a3) # a3 <- methodClassDex 3870 LOAD_rSELF_method(a2) # a2 <- method 3871 # null obj? 3872 beqz rOBJ, common_errNullObject # yes, fail 3873 LOAD_base_offObject_clazz(a0, rOBJ) # a0 <- thisPtr->clazz 3874 JAL(dvmFindInterfaceMethodInCache) # v0 <- call(class, ref, method, dex) 3875 move a0, v0 3876 # failed? 3877 beqz v0, common_exceptionThrown # yes, handle exception 3878 b common_invokeMethodNoRange # (a0=method, rOBJ="this") 3879 3880/* ------------------------------ */ 3881 .balign 128 3882.L_OP_UNUSED_73: /* 0x73 */ 3883/* File: mips/OP_UNUSED_73.S */ 3884/* File: mips/unused.S */ 3885 BAL(common_abort) 3886 3887 3888 3889/* ------------------------------ */ 3890 .balign 128 3891.L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */ 3892/* File: mips/OP_INVOKE_VIRTUAL_RANGE.S */ 3893/* File: mips/OP_INVOKE_VIRTUAL.S */ 3894 /* 3895 * Handle a virtual method call. 3896 * 3897 * for: invoke-virtual, invoke-virtual/range 3898 */ 3899 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 3900 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 3901 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 3902 FETCH(a1, 1) # a1 <- BBBB 3903 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 3904 FETCH(rBIX, 2) # rBIX <- GFED or CCCC 3905 LOAD_eas2(a0, a3, a1) # a0 <- resolved baseMethod 3906 .if (!1) 3907 and rBIX, rBIX, 15 # rBIX <- D (or stays CCCC) 3908 .endif 3909 EXPORT_PC() # must export for invoke 3910 # already resolved? 3911 bnez a0, .LOP_INVOKE_VIRTUAL_RANGE_continue # yes, continue on 3912 3913 LOAD_rSELF_method(a3) # a3 <- self->method 3914 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 3915 li a2, METHOD_VIRTUAL # resolver method type 3916 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 3917 move a0, v0 3918 # got null? 3919 bnez v0, .LOP_INVOKE_VIRTUAL_RANGE_continue # no, continue 3920 b common_exceptionThrown # yes, handle exception 3921 3922 3923/* ------------------------------ */ 3924 .balign 128 3925.L_OP_INVOKE_SUPER_RANGE: /* 0x75 */ 3926/* File: mips/OP_INVOKE_SUPER_RANGE.S */ 3927/* File: mips/OP_INVOKE_SUPER.S */ 3928 /* 3929 * Handle a "super" method call. 3930 * 3931 * for: invoke-super, invoke-super/range 3932 */ 3933 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 3934 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 3935 FETCH(t0, 2) # t0 <- GFED or CCCC 3936 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 3937 .if (!1) 3938 and t0, t0, 15 # t0 <- D (or stays CCCC) 3939 .endif 3940 FETCH(a1, 1) # a1 <- BBBB 3941 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 3942 GET_VREG(rOBJ, t0) # rOBJ <- "this" ptr 3943 LOAD_eas2(a0, a3, a1) # a0 <- resolved baseMethod 3944 # null "this"? 3945 LOAD_rSELF_method(t1) # t1 <- current method 3946 beqz rOBJ, common_errNullObject # null "this", throw exception 3947 # cmp a0, 0; already resolved? 3948 LOAD_base_offMethod_clazz(rBIX, t1) # rBIX <- method->clazz 3949 EXPORT_PC() # must export for invoke 3950 bnez a0, .LOP_INVOKE_SUPER_RANGE_continue # resolved, continue on 3951 3952 move a0, rBIX # a0 <- method->clazz 3953 li a2, METHOD_VIRTUAL # resolver method type 3954 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 3955 move a0, v0 3956 # got null? 3957 beqz v0, common_exceptionThrown # yes, handle exception 3958 b .LOP_INVOKE_SUPER_RANGE_continue 3959 3960 3961/* ------------------------------ */ 3962 .balign 128 3963.L_OP_INVOKE_DIRECT_RANGE: /* 0x76 */ 3964/* File: mips/OP_INVOKE_DIRECT_RANGE.S */ 3965/* File: mips/OP_INVOKE_DIRECT.S */ 3966 /* 3967 * Handle a direct method call. 3968 * 3969 * (We could defer the "is 'this' pointer null" test to the common 3970 * method invocation code, and use a flag to indicate that static 3971 * calls don't count. If we do this as part of copying the arguments 3972 * out we could avoiding loading the first arg twice.) 3973 * 3974 * for: invoke-direct, invoke-direct/range 3975 */ 3976 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 3977 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 3978 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 3979 FETCH(a1, 1) # a1 <- BBBB 3980 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 3981 FETCH(rBIX, 2) # rBIX <- GFED or CCCC 3982 LOAD_eas2(a0, a3, a1) # a0 <- resolved methodToCall 3983 .if (!1) 3984 and rBIX, rBIX, 15 # rBIX <- D (or stays CCCC) 3985 .endif 3986 EXPORT_PC() # must export for invoke 3987 GET_VREG(rOBJ, rBIX) # rOBJ <- "this" ptr 3988 # already resolved? 3989 bnez a0, 1f # resolved, call the function 3990 3991 lw a3, offThread_method(rSELF) # a3 <- self->method 3992 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 3993 li a2, METHOD_DIRECT # resolver method type 3994 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 3995 move a0, v0 3996 # got null? 3997 beqz v0, common_exceptionThrown # yes, handle exception 3998 39991: 4000 bnez rOBJ, common_invokeMethodRange # a0=method, rOBJ="this" 4001 b common_errNullObject # yes, throw exception 4002 4003 4004 4005 4006 4007/* ------------------------------ */ 4008 .balign 128 4009.L_OP_INVOKE_STATIC_RANGE: /* 0x77 */ 4010/* File: mips/OP_INVOKE_STATIC_RANGE.S */ 4011/* File: mips/OP_INVOKE_STATIC.S */ 4012 /* 4013 * Handle a static method call. 4014 * 4015 * for: invoke-static, invoke-static/range 4016 */ 4017 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 4018 # op {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 4019 LOAD_rSELF_methodClassDex(a3) # a3 <- pDvmDex 4020 FETCH(a1, 1) # a1 <- BBBB 4021 LOAD_base_offDvmDex_pResMethods(a3, a3) # a3 <- pDvmDex->pResMethods 4022 li rOBJ, 0 # null "this" in delay slot 4023 LOAD_eas2(a0, a3, a1) # a0 <- resolved methodToCall 4024#if defined(WITH_JIT) 4025 EAS2(rBIX, a3, a1) # rBIX<- &resolved_metherToCall 4026#endif 4027 EXPORT_PC() # must export for invoke 4028 # already resolved? 4029 bnez a0, common_invokeMethodRange # yes, continue on 4030 b .LOP_INVOKE_STATIC_RANGE_resolve 4031 4032 4033/* ------------------------------ */ 4034 .balign 128 4035.L_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */ 4036/* File: mips/OP_INVOKE_INTERFACE_RANGE.S */ 4037/* File: mips/OP_INVOKE_INTERFACE.S */ 4038 /* 4039 * Handle an interface method call. 4040 * 4041 * for: invoke-interface, invoke-interface/range 4042 */ 4043 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */ 4044 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */ 4045 FETCH(a2, 2) # a2 <- FEDC or CCCC 4046 FETCH(a1, 1) # a1 <- BBBB 4047 .if (!1) 4048 and a2, 15 # a2 <- C (or stays CCCC) 4049 .endif 4050 EXPORT_PC() # must export for invoke 4051 GET_VREG(rOBJ, a2) # rOBJ <- first arg ("this") 4052 LOAD_rSELF_methodClassDex(a3) # a3 <- methodClassDex 4053 LOAD_rSELF_method(a2) # a2 <- method 4054 # null obj? 4055 beqz rOBJ, common_errNullObject # yes, fail 4056 LOAD_base_offObject_clazz(a0, rOBJ) # a0 <- thisPtr->clazz 4057 JAL(dvmFindInterfaceMethodInCache) # v0 <- call(class, ref, method, dex) 4058 move a0, v0 4059 # failed? 4060 beqz v0, common_exceptionThrown # yes, handle exception 4061 b common_invokeMethodRange # (a0=method, rOBJ="this") 4062 4063 4064/* ------------------------------ */ 4065 .balign 128 4066.L_OP_UNUSED_79: /* 0x79 */ 4067/* File: mips/OP_UNUSED_79.S */ 4068/* File: mips/unused.S */ 4069 BAL(common_abort) 4070 4071 4072 4073/* ------------------------------ */ 4074 .balign 128 4075.L_OP_UNUSED_7A: /* 0x7a */ 4076/* File: mips/OP_UNUSED_7A.S */ 4077/* File: mips/unused.S */ 4078 BAL(common_abort) 4079 4080 4081 4082/* ------------------------------ */ 4083 .balign 128 4084.L_OP_NEG_INT: /* 0x7b */ 4085/* File: mips/OP_NEG_INT.S */ 4086/* File: mips/unop.S */ 4087 /* 4088 * Generic 32-bit unary operation. Provide an "instr" line that 4089 * specifies an instruction that performs "result = op a0". 4090 * This could be a MIPS instruction or a function call. 4091 * 4092 * for: neg-int, not-int, neg-float, int-to-float, float-to-int, 4093 * int-to-byte, int-to-char, int-to-short 4094 */ 4095 /* unop vA, vB */ 4096 GET_OPB(a3) # a3 <- B 4097 GET_OPA4(t0) # t0 <- A+ 4098 GET_VREG(a0, a3) # a0 <- vB 4099 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4100 # optional op 4101 negu a0, a0 # a0 <- op, a0-a3 changed 4102 GET_INST_OPCODE(t1) # extract opcode from rINST 4103 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0 4104 /* 9-10 instructions */ 4105 4106 4107/* ------------------------------ */ 4108 .balign 128 4109.L_OP_NOT_INT: /* 0x7c */ 4110/* File: mips/OP_NOT_INT.S */ 4111/* File: mips/unop.S */ 4112 /* 4113 * Generic 32-bit unary operation. Provide an "instr" line that 4114 * specifies an instruction that performs "result = op a0". 4115 * This could be a MIPS instruction or a function call. 4116 * 4117 * for: neg-int, not-int, neg-float, int-to-float, float-to-int, 4118 * int-to-byte, int-to-char, int-to-short 4119 */ 4120 /* unop vA, vB */ 4121 GET_OPB(a3) # a3 <- B 4122 GET_OPA4(t0) # t0 <- A+ 4123 GET_VREG(a0, a3) # a0 <- vB 4124 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4125 # optional op 4126 not a0, a0 # a0 <- op, a0-a3 changed 4127 GET_INST_OPCODE(t1) # extract opcode from rINST 4128 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0 4129 /* 9-10 instructions */ 4130 4131 4132/* ------------------------------ */ 4133 .balign 128 4134.L_OP_NEG_LONG: /* 0x7d */ 4135/* File: mips/OP_NEG_LONG.S */ 4136/* File: mips/unopWide.S */ 4137 /* 4138 * Generic 64-bit unary operation. Provide an "instr" line that 4139 * specifies an instruction that performs "result = op a0/a1". 4140 * This could be MIPS instruction or a function call. 4141 * 4142 * For: neg-long, not-long, neg-double, long-to-double, double-to-long 4143 */ 4144 /* unop vA, vB */ 4145 GET_OPA4(t1) # t1 <- A+ 4146 GET_OPB(a3) # a3 <- B 4147 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4148 EAS2(rOBJ, rFP, t1) # rOBJ <- &fp[A] 4149 LOAD64(a0, a1, a3) # a0/a1 <- vAA 4150 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4151 negu v0, a0 # optional op 4152 negu v1, a1; sltu a0, zero, v0; subu v1, v1, a0 # a0/a1 <- op, a2-a3 changed 4153 GET_INST_OPCODE(t0) # extract opcode from rINST 4154 STORE64(v0, v1, rOBJ) # vAA <- a0/a1 4155 GOTO_OPCODE(t0) # jump to next instruction 4156 /* 12-13 instructions */ 4157 4158 4159 4160 4161/* ------------------------------ */ 4162 .balign 128 4163.L_OP_NOT_LONG: /* 0x7e */ 4164/* File: mips/OP_NOT_LONG.S */ 4165/* File: mips/unopWide.S */ 4166 /* 4167 * Generic 64-bit unary operation. Provide an "instr" line that 4168 * specifies an instruction that performs "result = op a0/a1". 4169 * This could be MIPS instruction or a function call. 4170 * 4171 * For: neg-long, not-long, neg-double, long-to-double, double-to-long 4172 */ 4173 /* unop vA, vB */ 4174 GET_OPA4(t1) # t1 <- A+ 4175 GET_OPB(a3) # a3 <- B 4176 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4177 EAS2(rOBJ, rFP, t1) # rOBJ <- &fp[A] 4178 LOAD64(a0, a1, a3) # a0/a1 <- vAA 4179 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4180 not a0, a0 # optional op 4181 not a1, a1 # a0/a1 <- op, a2-a3 changed 4182 GET_INST_OPCODE(t0) # extract opcode from rINST 4183 STORE64(a0, a1, rOBJ) # vAA <- a0/a1 4184 GOTO_OPCODE(t0) # jump to next instruction 4185 /* 12-13 instructions */ 4186 4187 4188 4189/* ------------------------------ */ 4190 .balign 128 4191.L_OP_NEG_FLOAT: /* 0x7f */ 4192/* File: mips/OP_NEG_FLOAT.S */ 4193/* File: mips/unop.S */ 4194 /* 4195 * Generic 32-bit unary operation. Provide an "instr" line that 4196 * specifies an instruction that performs "result = op a0". 4197 * This could be a MIPS instruction or a function call. 4198 * 4199 * for: neg-int, not-int, neg-float, int-to-float, float-to-int, 4200 * int-to-byte, int-to-char, int-to-short 4201 */ 4202 /* unop vA, vB */ 4203 GET_OPB(a3) # a3 <- B 4204 GET_OPA4(t0) # t0 <- A+ 4205 GET_VREG(a0, a3) # a0 <- vB 4206 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4207 # optional op 4208 addu a0, a0, 0x80000000 # a0 <- op, a0-a3 changed 4209 GET_INST_OPCODE(t1) # extract opcode from rINST 4210 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0 4211 /* 9-10 instructions */ 4212 4213 4214/* ------------------------------ */ 4215 .balign 128 4216.L_OP_NEG_DOUBLE: /* 0x80 */ 4217/* File: mips/OP_NEG_DOUBLE.S */ 4218/* File: mips/unopWide.S */ 4219 /* 4220 * Generic 64-bit unary operation. Provide an "instr" line that 4221 * specifies an instruction that performs "result = op a0/a1". 4222 * This could be MIPS instruction or a function call. 4223 * 4224 * For: neg-long, not-long, neg-double, long-to-double, double-to-long 4225 */ 4226 /* unop vA, vB */ 4227 GET_OPA4(t1) # t1 <- A+ 4228 GET_OPB(a3) # a3 <- B 4229 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4230 EAS2(rOBJ, rFP, t1) # rOBJ <- &fp[A] 4231 LOAD64(a0, a1, a3) # a0/a1 <- vAA 4232 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4233 # optional op 4234 addu a1, a1, 0x80000000 # a0/a1 <- op, a2-a3 changed 4235 GET_INST_OPCODE(t0) # extract opcode from rINST 4236 STORE64(a0, a1, rOBJ) # vAA <- a0/a1 4237 GOTO_OPCODE(t0) # jump to next instruction 4238 /* 12-13 instructions */ 4239 4240 4241 4242/* ------------------------------ */ 4243 .balign 128 4244.L_OP_INT_TO_LONG: /* 0x81 */ 4245/* File: mips/OP_INT_TO_LONG.S */ 4246/* File: mips/unopWider.S */ 4247 /* 4248 * Generic 32bit-to-64bit unary operation. Provide an "instr" line 4249 * that specifies an instruction that performs "result = op a0", where 4250 * "result" is a 64-bit quantity in a0/a1. 4251 * 4252 * For: int-to-long, int-to-double, float-to-long, float-to-double 4253 */ 4254 /* unop vA, vB */ 4255 GET_OPA4(t1) # t1 <- A+ 4256 GET_OPB(a3) # a3 <- B 4257 GET_VREG(a0, a3) # a0 <- vB 4258 EAS2(rOBJ, rFP, t1) # rOBJ <- &fp[A] 4259 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4260 # optional op 4261 sra a1, a0, 31 # result <- op, a0-a3 changed 4262 GET_INST_OPCODE(t0) # extract opcode from rINST 4263 STORE64(a0, a1, rOBJ) # vA/vA+1 <- a0/a1 4264 GOTO_OPCODE(t0) # jump to next instruction 4265 /* 10-11 instructions */ 4266 4267 4268/* ------------------------------ */ 4269 .balign 128 4270.L_OP_INT_TO_FLOAT: /* 0x82 */ 4271/* File: mips/OP_INT_TO_FLOAT.S */ 4272/* File: mips/unflop.S */ 4273 /* 4274 * Generic 32-bit unary operation. Provide an "instr" line that 4275 * specifies an instruction that performs "result = op a0". 4276 * This could be a MIPS instruction or a function call. 4277 * 4278 * for: int-to-float, float-to-int 4279 */ 4280 /* unop vA, vB */ 4281 GET_OPB(a3) # a3 <- B 4282 GET_OPA4(rOBJ) # t0 <- A+ 4283#ifdef SOFT_FLOAT 4284 GET_VREG(a0, a3) # a0 <- vB 4285#else 4286 GET_VREG_F(fa0, a3) 4287#endif 4288 # optional op 4289 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4290#ifdef SOFT_FLOAT 4291 JAL(__floatsisf) # a0 <- op, a0-a3 changed 4292 4293.LOP_INT_TO_FLOAT_set_vreg: 4294 SET_VREG(v0, rOBJ) # vAA <- result0 4295#else 4296 cvt.s.w fv0, fa0 4297 4298.LOP_INT_TO_FLOAT_set_vreg_f: 4299 SET_VREG_F(fv0, rOBJ) 4300#endif 4301 GET_INST_OPCODE(t1) # extract opcode from rINST 4302 GOTO_OPCODE(t1) # jump to next instruction 4303 /* 9-10 instructions */ 4304 4305 4306/* ------------------------------ */ 4307 .balign 128 4308.L_OP_INT_TO_DOUBLE: /* 0x83 */ 4309/* File: mips/OP_INT_TO_DOUBLE.S */ 4310/* File: mips/unflopWider.S */ 4311 /* 4312 * Generic 32bit-to-64bit unary operation. Provide an "instr" line 4313 * that specifies an instruction that performs "result = op a0", where 4314 * "result" is a 64-bit quantity in a0/a1. 4315 * 4316 * For: int-to-double, float-to-long, float-to-double 4317 */ 4318 /* unop vA, vB */ 4319 GET_OPA4(rOBJ) # rOBJ <- A+ 4320 GET_OPB(a3) # a3 <- B 4321#ifdef SOFT_FLOAT 4322 GET_VREG(a0, a3) # a0 <- vB 4323#else 4324 GET_VREG_F(fa0, a3) 4325#endif 4326 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 4327 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4328 # optional op 4329#ifdef SOFT_FLOAT 4330 JAL(__floatsidf) # result <- op, a0-a3 changed 4331 4332.LOP_INT_TO_DOUBLE_set_vreg: 4333 STORE64(rRESULT0, rRESULT1, rOBJ) # vA/vA+1 <- a0/a1 4334#else 4335 cvt.d.w fv0, fa0 4336 4337.LOP_INT_TO_DOUBLE_set_vreg: 4338 STORE64_F(fv0, fv0f, rOBJ) # vA/vA+1 <- a0/a1 4339#endif 4340 GET_INST_OPCODE(t0) # extract opcode from rINST 4341 GOTO_OPCODE(t0) # jump to next instruction 4342 /* 10-11 instructions */ 4343 4344 4345/* ------------------------------ */ 4346 .balign 128 4347.L_OP_LONG_TO_INT: /* 0x84 */ 4348/* File: mips/OP_LONG_TO_INT.S */ 4349 GET_OPB(a1) # a1 <- B from 15:12 4350 GET_OPA4(a0) # a0 <- A from 11:8 4351 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4352#ifdef HAVE_BIG_ENDIAN 4353 addu a1, a1, 1 4354#endif 4355 GET_VREG(a2, a1) # a2 <- fp[B] 4356 GET_INST_OPCODE(t0) # t0 <- opcode from rINST 4357 SET_VREG_GOTO(a2, a0, t0) # fp[A] <- a2 4358 4359/* ------------------------------ */ 4360 .balign 128 4361.L_OP_LONG_TO_FLOAT: /* 0x85 */ 4362/* File: mips/OP_LONG_TO_FLOAT.S */ 4363/* File: mips/unopNarrower.S */ 4364 /* 4365 * Generic 64bit-to-32bit unary operation. Provide an "instr" line 4366 * that specifies an instruction that performs "result = op a0/a1", where 4367 * "result" is a 32-bit quantity in a0. 4368 * 4369 * For: long-to-float, double-to-int, double-to-float 4370 * If hard floating point support is available, use fa0 as the parameter, except for 4371 * long-to-float opcode. 4372 * (This would work for long-to-int, but that instruction is actually 4373 * an exact match for OP_MOVE.) 4374 */ 4375 /* unop vA, vB */ 4376 GET_OPB(a3) # a3 <- B 4377 GET_OPA4(rOBJ) # t1 <- A+ 4378 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4379#ifdef SOFT_FLOAT 4380 LOAD64(rARG0, rARG1, a3) # a0/a1 <- vB/vB+1 4381#else 4382 LOAD64(rARG0, rARG1, a3) 4383#endif 4384 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4385 # optional op 4386#ifdef SOFT_FLOAT 4387 JAL(__floatdisf) # a0 <- op, a0-a3 changed 4388 4389.LOP_LONG_TO_FLOAT_set_vreg: 4390 SET_VREG(v0, rOBJ) # vA <- result0 4391#else 4392 JAL(__floatdisf) 4393 4394.LOP_LONG_TO_FLOAT_set_vreg_f: 4395 SET_VREG_F(fv0, rOBJ) # vA <- result0 4396#endif 4397 GET_INST_OPCODE(t0) # extract opcode from rINST 4398 GOTO_OPCODE(t0) # jump to next instruction 4399 /* 10-11 instructions */ 4400 4401 4402/* ------------------------------ */ 4403 .balign 128 4404.L_OP_LONG_TO_DOUBLE: /* 0x86 */ 4405/* File: mips/OP_LONG_TO_DOUBLE.S */ 4406/* File: mips/unflopWide.S */ 4407 /* 4408 * Generic 64-bit unary operation. Provide an "instr" line that 4409 * specifies an instruction that performs "result = op a0/a1". 4410 * This could be a MIPS instruction or a function call. 4411 * 4412 * long-to-double, double-to-long 4413 */ 4414 /* unop vA, vB */ 4415 GET_OPA4(rOBJ) # t1 <- A+ 4416 GET_OPB(a3) # a3 <- B 4417 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4418 EAS2(rOBJ, rFP, rOBJ) # t1 <- &fp[A] 4419#ifdef SOFT_FLOAT 4420 LOAD64(rARG0, rARG1, a3) # a0/a1 <- vAA 4421#else 4422 LOAD64(rARG0, rARG1, a3) 4423#endif 4424 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4425 # optional op 4426 JAL(__floatdidf) # a0/a1 <- op, a2-a3 changed 4427 4428.LOP_LONG_TO_DOUBLE_set_vreg: 4429#ifdef SOFT_FLOAT 4430 STORE64(rRESULT0, rRESULT1, rOBJ) # vAA <- a0/a1 4431#else 4432 STORE64_F(fv0, fv0f, rOBJ) # vAA <- a0/a1 4433#endif 4434 GET_INST_OPCODE(t0) # extract opcode from rINST 4435 GOTO_OPCODE(t0) # jump to next instruction 4436 /* 12-13 instructions */ 4437 4438 4439 4440/* ------------------------------ */ 4441 .balign 128 4442.L_OP_FLOAT_TO_INT: /* 0x87 */ 4443/* File: mips/OP_FLOAT_TO_INT.S */ 4444/* File: mips/unflop.S */ 4445 /* 4446 * Generic 32-bit unary operation. Provide an "instr" line that 4447 * specifies an instruction that performs "result = op a0". 4448 * This could be a MIPS instruction or a function call. 4449 * 4450 * for: int-to-float, float-to-int 4451 */ 4452 /* unop vA, vB */ 4453 GET_OPB(a3) # a3 <- B 4454 GET_OPA4(rOBJ) # t0 <- A+ 4455#ifdef SOFT_FLOAT 4456 GET_VREG(a0, a3) # a0 <- vB 4457#else 4458 GET_VREG_F(fa0, a3) 4459#endif 4460 # optional op 4461 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4462#ifdef SOFT_FLOAT 4463 b f2i_doconv # a0 <- op, a0-a3 changed 4464 4465.LOP_FLOAT_TO_INT_set_vreg: 4466 SET_VREG(v0, rOBJ) # vAA <- result0 4467#else 4468 b f2i_doconv 4469 4470.LOP_FLOAT_TO_INT_set_vreg_f: 4471 SET_VREG_F(fv0, rOBJ) 4472#endif 4473 GET_INST_OPCODE(t1) # extract opcode from rINST 4474 GOTO_OPCODE(t1) # jump to next instruction 4475 /* 9-10 instructions */ 4476 4477 4478/* ------------------------------ */ 4479 .balign 128 4480.L_OP_FLOAT_TO_LONG: /* 0x88 */ 4481/* File: mips/OP_FLOAT_TO_LONG.S */ 4482/* File: mips/unflopWider.S */ 4483 /* 4484 * Generic 32bit-to-64bit unary operation. Provide an "instr" line 4485 * that specifies an instruction that performs "result = op a0", where 4486 * "result" is a 64-bit quantity in a0/a1. 4487 * 4488 * For: int-to-double, float-to-long, float-to-double 4489 */ 4490 /* unop vA, vB */ 4491 GET_OPA4(rOBJ) # rOBJ <- A+ 4492 GET_OPB(a3) # a3 <- B 4493#ifdef SOFT_FLOAT 4494 GET_VREG(a0, a3) # a0 <- vB 4495#else 4496 GET_VREG_F(fa0, a3) 4497#endif 4498 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 4499 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4500 # optional op 4501#ifdef SOFT_FLOAT 4502 b f2l_doconv # result <- op, a0-a3 changed 4503 4504.LOP_FLOAT_TO_LONG_set_vreg: 4505 STORE64(rRESULT0, rRESULT1, rOBJ) # vA/vA+1 <- a0/a1 4506#else 4507 b f2l_doconv 4508 4509.LOP_FLOAT_TO_LONG_set_vreg: 4510 STORE64(rRESULT0, rRESULT1, rOBJ) # vA/vA+1 <- a0/a1 4511#endif 4512 GET_INST_OPCODE(t0) # extract opcode from rINST 4513 GOTO_OPCODE(t0) # jump to next instruction 4514 /* 10-11 instructions */ 4515 4516 4517/* ------------------------------ */ 4518 .balign 128 4519.L_OP_FLOAT_TO_DOUBLE: /* 0x89 */ 4520/* File: mips/OP_FLOAT_TO_DOUBLE.S */ 4521/* File: mips/unflopWider.S */ 4522 /* 4523 * Generic 32bit-to-64bit unary operation. Provide an "instr" line 4524 * that specifies an instruction that performs "result = op a0", where 4525 * "result" is a 64-bit quantity in a0/a1. 4526 * 4527 * For: int-to-double, float-to-long, float-to-double 4528 */ 4529 /* unop vA, vB */ 4530 GET_OPA4(rOBJ) # rOBJ <- A+ 4531 GET_OPB(a3) # a3 <- B 4532#ifdef SOFT_FLOAT 4533 GET_VREG(a0, a3) # a0 <- vB 4534#else 4535 GET_VREG_F(fa0, a3) 4536#endif 4537 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 4538 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4539 # optional op 4540#ifdef SOFT_FLOAT 4541 JAL(__extendsfdf2) # result <- op, a0-a3 changed 4542 4543.LOP_FLOAT_TO_DOUBLE_set_vreg: 4544 STORE64(rRESULT0, rRESULT1, rOBJ) # vA/vA+1 <- a0/a1 4545#else 4546 cvt.d.s fv0, fa0 4547 4548.LOP_FLOAT_TO_DOUBLE_set_vreg: 4549 STORE64_F(fv0, fv0f, rOBJ) # vA/vA+1 <- a0/a1 4550#endif 4551 GET_INST_OPCODE(t0) # extract opcode from rINST 4552 GOTO_OPCODE(t0) # jump to next instruction 4553 /* 10-11 instructions */ 4554 4555 4556/* ------------------------------ */ 4557 .balign 128 4558.L_OP_DOUBLE_TO_INT: /* 0x8a */ 4559/* File: mips/OP_DOUBLE_TO_INT.S */ 4560/* File: mips/unopNarrower.S */ 4561 /* 4562 * Generic 64bit-to-32bit unary operation. Provide an "instr" line 4563 * that specifies an instruction that performs "result = op a0/a1", where 4564 * "result" is a 32-bit quantity in a0. 4565 * 4566 * For: long-to-float, double-to-int, double-to-float 4567 * If hard floating point support is available, use fa0 as the parameter, except for 4568 * long-to-float opcode. 4569 * (This would work for long-to-int, but that instruction is actually 4570 * an exact match for OP_MOVE.) 4571 */ 4572 /* unop vA, vB */ 4573 GET_OPB(a3) # a3 <- B 4574 GET_OPA4(rOBJ) # t1 <- A+ 4575 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4576#ifdef SOFT_FLOAT 4577 LOAD64(rARG0, rARG1, a3) # a0/a1 <- vB/vB+1 4578#else 4579 LOAD64_F(fa0, fa0f, a3) 4580#endif 4581 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4582 # optional op 4583#ifdef SOFT_FLOAT 4584 b d2i_doconv # a0 <- op, a0-a3 changed 4585 4586.LOP_DOUBLE_TO_INT_set_vreg: 4587 SET_VREG(v0, rOBJ) # vA <- result0 4588#else 4589 b d2i_doconv 4590 4591.LOP_DOUBLE_TO_INT_set_vreg_f: 4592 SET_VREG_F(fv0, rOBJ) # vA <- result0 4593#endif 4594 GET_INST_OPCODE(t0) # extract opcode from rINST 4595 GOTO_OPCODE(t0) # jump to next instruction 4596 /* 10-11 instructions */ 4597 4598/* 4599 * Convert the double in a0/a1 to an int in a0. 4600 * 4601 * We have to clip values to int min/max per the specification. The 4602 * expected common case is a "reasonable" value that converts directly 4603 * to modest integer. The EABI convert function isn't doing this for us. 4604 * Use rBIX / rTEMP as global to hold arguments (they are not bound to a global var) 4605 */ 4606 4607/* ------------------------------ */ 4608 .balign 128 4609.L_OP_DOUBLE_TO_LONG: /* 0x8b */ 4610/* File: mips/OP_DOUBLE_TO_LONG.S */ 4611/* File: mips/unflopWide.S */ 4612 /* 4613 * Generic 64-bit unary operation. Provide an "instr" line that 4614 * specifies an instruction that performs "result = op a0/a1". 4615 * This could be a MIPS instruction or a function call. 4616 * 4617 * long-to-double, double-to-long 4618 */ 4619 /* unop vA, vB */ 4620 GET_OPA4(rOBJ) # t1 <- A+ 4621 GET_OPB(a3) # a3 <- B 4622 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4623 EAS2(rOBJ, rFP, rOBJ) # t1 <- &fp[A] 4624#ifdef SOFT_FLOAT 4625 LOAD64(rARG0, rARG1, a3) # a0/a1 <- vAA 4626#else 4627 LOAD64_F(fa0, fa0f, a3) 4628#endif 4629 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4630 # optional op 4631 b d2l_doconv # a0/a1 <- op, a2-a3 changed 4632 4633.LOP_DOUBLE_TO_LONG_set_vreg: 4634#ifdef SOFT_FLOAT 4635 STORE64(rRESULT0, rRESULT1, rOBJ) # vAA <- a0/a1 4636#else 4637 STORE64(rRESULT0, rRESULT1, rOBJ) # vAA <- a0/a1 4638#endif 4639 GET_INST_OPCODE(t0) # extract opcode from rINST 4640 GOTO_OPCODE(t0) # jump to next instruction 4641 /* 12-13 instructions */ 4642 4643 4644 4645/* ------------------------------ */ 4646 .balign 128 4647.L_OP_DOUBLE_TO_FLOAT: /* 0x8c */ 4648/* File: mips/OP_DOUBLE_TO_FLOAT.S */ 4649/* File: mips/unopNarrower.S */ 4650 /* 4651 * Generic 64bit-to-32bit unary operation. Provide an "instr" line 4652 * that specifies an instruction that performs "result = op a0/a1", where 4653 * "result" is a 32-bit quantity in a0. 4654 * 4655 * For: long-to-float, double-to-int, double-to-float 4656 * If hard floating point support is available, use fa0 as the parameter, except for 4657 * long-to-float opcode. 4658 * (This would work for long-to-int, but that instruction is actually 4659 * an exact match for OP_MOVE.) 4660 */ 4661 /* unop vA, vB */ 4662 GET_OPB(a3) # a3 <- B 4663 GET_OPA4(rOBJ) # t1 <- A+ 4664 EAS2(a3, rFP, a3) # a3 <- &fp[B] 4665#ifdef SOFT_FLOAT 4666 LOAD64(rARG0, rARG1, a3) # a0/a1 <- vB/vB+1 4667#else 4668 LOAD64_F(fa0, fa0f, a3) 4669#endif 4670 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4671 # optional op 4672#ifdef SOFT_FLOAT 4673 JAL(__truncdfsf2) # a0 <- op, a0-a3 changed 4674 4675.LOP_DOUBLE_TO_FLOAT_set_vreg: 4676 SET_VREG(v0, rOBJ) # vA <- result0 4677#else 4678 cvt.s.d fv0, fa0 4679 4680.LOP_DOUBLE_TO_FLOAT_set_vreg_f: 4681 SET_VREG_F(fv0, rOBJ) # vA <- result0 4682#endif 4683 GET_INST_OPCODE(t0) # extract opcode from rINST 4684 GOTO_OPCODE(t0) # jump to next instruction 4685 /* 10-11 instructions */ 4686 4687 4688/* ------------------------------ */ 4689 .balign 128 4690.L_OP_INT_TO_BYTE: /* 0x8d */ 4691/* File: mips/OP_INT_TO_BYTE.S */ 4692/* File: mips/unop.S */ 4693 /* 4694 * Generic 32-bit unary operation. Provide an "instr" line that 4695 * specifies an instruction that performs "result = op a0". 4696 * This could be a MIPS instruction or a function call. 4697 * 4698 * for: neg-int, not-int, neg-float, int-to-float, float-to-int, 4699 * int-to-byte, int-to-char, int-to-short 4700 */ 4701 /* unop vA, vB */ 4702 GET_OPB(a3) # a3 <- B 4703 GET_OPA4(t0) # t0 <- A+ 4704 GET_VREG(a0, a3) # a0 <- vB 4705 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4706 sll a0, a0, 24 # optional op 4707 sra a0, a0, 24 # a0 <- op, a0-a3 changed 4708 GET_INST_OPCODE(t1) # extract opcode from rINST 4709 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0 4710 /* 9-10 instructions */ 4711 4712 4713/* ------------------------------ */ 4714 .balign 128 4715.L_OP_INT_TO_CHAR: /* 0x8e */ 4716/* File: mips/OP_INT_TO_CHAR.S */ 4717/* File: mips/unop.S */ 4718 /* 4719 * Generic 32-bit unary operation. Provide an "instr" line that 4720 * specifies an instruction that performs "result = op a0". 4721 * This could be a MIPS instruction or a function call. 4722 * 4723 * for: neg-int, not-int, neg-float, int-to-float, float-to-int, 4724 * int-to-byte, int-to-char, int-to-short 4725 */ 4726 /* unop vA, vB */ 4727 GET_OPB(a3) # a3 <- B 4728 GET_OPA4(t0) # t0 <- A+ 4729 GET_VREG(a0, a3) # a0 <- vB 4730 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4731 # optional op 4732 and a0, 0xffff # a0 <- op, a0-a3 changed 4733 GET_INST_OPCODE(t1) # extract opcode from rINST 4734 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0 4735 /* 9-10 instructions */ 4736 4737 4738/* ------------------------------ */ 4739 .balign 128 4740.L_OP_INT_TO_SHORT: /* 0x8f */ 4741/* File: mips/OP_INT_TO_SHORT.S */ 4742/* File: mips/unop.S */ 4743 /* 4744 * Generic 32-bit unary operation. Provide an "instr" line that 4745 * specifies an instruction that performs "result = op a0". 4746 * This could be a MIPS instruction or a function call. 4747 * 4748 * for: neg-int, not-int, neg-float, int-to-float, float-to-int, 4749 * int-to-byte, int-to-char, int-to-short 4750 */ 4751 /* unop vA, vB */ 4752 GET_OPB(a3) # a3 <- B 4753 GET_OPA4(t0) # t0 <- A+ 4754 GET_VREG(a0, a3) # a0 <- vB 4755 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 4756 sll a0, 16 # optional op 4757 sra a0, 16 # a0 <- op, a0-a3 changed 4758 GET_INST_OPCODE(t1) # extract opcode from rINST 4759 SET_VREG_GOTO(a0, t0, t1) # vAA <- result0 4760 /* 9-10 instructions */ 4761 4762 4763/* ------------------------------ */ 4764 .balign 128 4765.L_OP_ADD_INT: /* 0x90 */ 4766/* File: mips/OP_ADD_INT.S */ 4767/* File: mips/binop.S */ 4768 /* 4769 * Generic 32-bit binary operation. Provide an "instr" line that 4770 * specifies an instruction that performs "result = a0 op a1". 4771 * This could be a MIPS instruction or a function call. (If the result 4772 * comes back in a register other than a0, you can override "result".) 4773 * 4774 * If "chkzero" is set to 1, we perform a divide-by-zero check on 4775 * vCC (a1). Useful for integer division and modulus. Note that we 4776 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 4777 * handles it correctly. 4778 * 4779 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 4780 * xor-int, shl-int, shr-int, ushr-int 4781 */ 4782 /* binop vAA, vBB, vCC */ 4783 FETCH(a0, 1) # a0 <- CCBB 4784 GET_OPA(rOBJ) # rOBJ <- AA 4785 srl a3, a0, 8 # a3 <- CC 4786 and a2, a0, 255 # a2 <- BB 4787 GET_VREG(a1, a3) # a1 <- vCC 4788 GET_VREG(a0, a2) # a0 <- vBB 4789 .if 0 4790 # is second operand zero? 4791 beqz a1, common_errDivideByZero 4792 .endif 4793 4794 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 4795 # optional op 4796 addu a0, a0, a1 # a0 <- op, a0-a3 changed 4797 GET_INST_OPCODE(t0) # extract opcode from rINST 4798 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 4799 /* 11-14 instructions */ 4800 4801 4802 4803/* ------------------------------ */ 4804 .balign 128 4805.L_OP_SUB_INT: /* 0x91 */ 4806/* File: mips/OP_SUB_INT.S */ 4807/* File: mips/binop.S */ 4808 /* 4809 * Generic 32-bit binary operation. Provide an "instr" line that 4810 * specifies an instruction that performs "result = a0 op a1". 4811 * This could be a MIPS instruction or a function call. (If the result 4812 * comes back in a register other than a0, you can override "result".) 4813 * 4814 * If "chkzero" is set to 1, we perform a divide-by-zero check on 4815 * vCC (a1). Useful for integer division and modulus. Note that we 4816 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 4817 * handles it correctly. 4818 * 4819 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 4820 * xor-int, shl-int, shr-int, ushr-int 4821 */ 4822 /* binop vAA, vBB, vCC */ 4823 FETCH(a0, 1) # a0 <- CCBB 4824 GET_OPA(rOBJ) # rOBJ <- AA 4825 srl a3, a0, 8 # a3 <- CC 4826 and a2, a0, 255 # a2 <- BB 4827 GET_VREG(a1, a3) # a1 <- vCC 4828 GET_VREG(a0, a2) # a0 <- vBB 4829 .if 0 4830 # is second operand zero? 4831 beqz a1, common_errDivideByZero 4832 .endif 4833 4834 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 4835 # optional op 4836 subu a0, a0, a1 # a0 <- op, a0-a3 changed 4837 GET_INST_OPCODE(t0) # extract opcode from rINST 4838 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 4839 /* 11-14 instructions */ 4840 4841 4842 4843/* ------------------------------ */ 4844 .balign 128 4845.L_OP_MUL_INT: /* 0x92 */ 4846/* File: mips/OP_MUL_INT.S */ 4847/* File: mips/binop.S */ 4848 /* 4849 * Generic 32-bit binary operation. Provide an "instr" line that 4850 * specifies an instruction that performs "result = a0 op a1". 4851 * This could be a MIPS instruction or a function call. (If the result 4852 * comes back in a register other than a0, you can override "result".) 4853 * 4854 * If "chkzero" is set to 1, we perform a divide-by-zero check on 4855 * vCC (a1). Useful for integer division and modulus. Note that we 4856 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 4857 * handles it correctly. 4858 * 4859 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 4860 * xor-int, shl-int, shr-int, ushr-int 4861 */ 4862 /* binop vAA, vBB, vCC */ 4863 FETCH(a0, 1) # a0 <- CCBB 4864 GET_OPA(rOBJ) # rOBJ <- AA 4865 srl a3, a0, 8 # a3 <- CC 4866 and a2, a0, 255 # a2 <- BB 4867 GET_VREG(a1, a3) # a1 <- vCC 4868 GET_VREG(a0, a2) # a0 <- vBB 4869 .if 0 4870 # is second operand zero? 4871 beqz a1, common_errDivideByZero 4872 .endif 4873 4874 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 4875 # optional op 4876 mul a0, a0, a1 # a0 <- op, a0-a3 changed 4877 GET_INST_OPCODE(t0) # extract opcode from rINST 4878 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 4879 /* 11-14 instructions */ 4880 4881 4882 4883/* ------------------------------ */ 4884 .balign 128 4885.L_OP_DIV_INT: /* 0x93 */ 4886/* File: mips/OP_DIV_INT.S */ 4887/* File: mips/binop.S */ 4888 /* 4889 * Generic 32-bit binary operation. Provide an "instr" line that 4890 * specifies an instruction that performs "result = a0 op a1". 4891 * This could be a MIPS instruction or a function call. (If the result 4892 * comes back in a register other than a0, you can override "result".) 4893 * 4894 * If "chkzero" is set to 1, we perform a divide-by-zero check on 4895 * vCC (a1). Useful for integer division and modulus. Note that we 4896 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 4897 * handles it correctly. 4898 * 4899 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 4900 * xor-int, shl-int, shr-int, ushr-int 4901 */ 4902 /* binop vAA, vBB, vCC */ 4903 FETCH(a0, 1) # a0 <- CCBB 4904 GET_OPA(rOBJ) # rOBJ <- AA 4905 srl a3, a0, 8 # a3 <- CC 4906 and a2, a0, 255 # a2 <- BB 4907 GET_VREG(a1, a3) # a1 <- vCC 4908 GET_VREG(a0, a2) # a0 <- vBB 4909 .if 1 4910 # is second operand zero? 4911 beqz a1, common_errDivideByZero 4912 .endif 4913 4914 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 4915 # optional op 4916 div zero, a0, a1; mflo a0 # a0 <- op, a0-a3 changed 4917 GET_INST_OPCODE(t0) # extract opcode from rINST 4918 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 4919 /* 11-14 instructions */ 4920 4921 4922 4923/* ------------------------------ */ 4924 .balign 128 4925.L_OP_REM_INT: /* 0x94 */ 4926/* File: mips/OP_REM_INT.S */ 4927/* File: mips/binop.S */ 4928 /* 4929 * Generic 32-bit binary operation. Provide an "instr" line that 4930 * specifies an instruction that performs "result = a0 op a1". 4931 * This could be a MIPS instruction or a function call. (If the result 4932 * comes back in a register other than a0, you can override "result".) 4933 * 4934 * If "chkzero" is set to 1, we perform a divide-by-zero check on 4935 * vCC (a1). Useful for integer division and modulus. Note that we 4936 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 4937 * handles it correctly. 4938 * 4939 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 4940 * xor-int, shl-int, shr-int, ushr-int 4941 */ 4942 /* binop vAA, vBB, vCC */ 4943 FETCH(a0, 1) # a0 <- CCBB 4944 GET_OPA(rOBJ) # rOBJ <- AA 4945 srl a3, a0, 8 # a3 <- CC 4946 and a2, a0, 255 # a2 <- BB 4947 GET_VREG(a1, a3) # a1 <- vCC 4948 GET_VREG(a0, a2) # a0 <- vBB 4949 .if 1 4950 # is second operand zero? 4951 beqz a1, common_errDivideByZero 4952 .endif 4953 4954 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 4955 # optional op 4956 div zero, a0, a1; mfhi a0 # a0 <- op, a0-a3 changed 4957 GET_INST_OPCODE(t0) # extract opcode from rINST 4958 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 4959 /* 11-14 instructions */ 4960 4961 4962 4963/* ------------------------------ */ 4964 .balign 128 4965.L_OP_AND_INT: /* 0x95 */ 4966/* File: mips/OP_AND_INT.S */ 4967/* File: mips/binop.S */ 4968 /* 4969 * Generic 32-bit binary operation. Provide an "instr" line that 4970 * specifies an instruction that performs "result = a0 op a1". 4971 * This could be a MIPS instruction or a function call. (If the result 4972 * comes back in a register other than a0, you can override "result".) 4973 * 4974 * If "chkzero" is set to 1, we perform a divide-by-zero check on 4975 * vCC (a1). Useful for integer division and modulus. Note that we 4976 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 4977 * handles it correctly. 4978 * 4979 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 4980 * xor-int, shl-int, shr-int, ushr-int 4981 */ 4982 /* binop vAA, vBB, vCC */ 4983 FETCH(a0, 1) # a0 <- CCBB 4984 GET_OPA(rOBJ) # rOBJ <- AA 4985 srl a3, a0, 8 # a3 <- CC 4986 and a2, a0, 255 # a2 <- BB 4987 GET_VREG(a1, a3) # a1 <- vCC 4988 GET_VREG(a0, a2) # a0 <- vBB 4989 .if 0 4990 # is second operand zero? 4991 beqz a1, common_errDivideByZero 4992 .endif 4993 4994 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 4995 # optional op 4996 and a0, a0, a1 # a0 <- op, a0-a3 changed 4997 GET_INST_OPCODE(t0) # extract opcode from rINST 4998 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 4999 /* 11-14 instructions */ 5000 5001 5002 5003/* ------------------------------ */ 5004 .balign 128 5005.L_OP_OR_INT: /* 0x96 */ 5006/* File: mips/OP_OR_INT.S */ 5007/* File: mips/binop.S */ 5008 /* 5009 * Generic 32-bit binary operation. Provide an "instr" line that 5010 * specifies an instruction that performs "result = a0 op a1". 5011 * This could be a MIPS instruction or a function call. (If the result 5012 * comes back in a register other than a0, you can override "result".) 5013 * 5014 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5015 * vCC (a1). Useful for integer division and modulus. Note that we 5016 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 5017 * handles it correctly. 5018 * 5019 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 5020 * xor-int, shl-int, shr-int, ushr-int 5021 */ 5022 /* binop vAA, vBB, vCC */ 5023 FETCH(a0, 1) # a0 <- CCBB 5024 GET_OPA(rOBJ) # rOBJ <- AA 5025 srl a3, a0, 8 # a3 <- CC 5026 and a2, a0, 255 # a2 <- BB 5027 GET_VREG(a1, a3) # a1 <- vCC 5028 GET_VREG(a0, a2) # a0 <- vBB 5029 .if 0 5030 # is second operand zero? 5031 beqz a1, common_errDivideByZero 5032 .endif 5033 5034 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5035 # optional op 5036 or a0, a0, a1 # a0 <- op, a0-a3 changed 5037 GET_INST_OPCODE(t0) # extract opcode from rINST 5038 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 5039 /* 11-14 instructions */ 5040 5041 5042 5043/* ------------------------------ */ 5044 .balign 128 5045.L_OP_XOR_INT: /* 0x97 */ 5046/* File: mips/OP_XOR_INT.S */ 5047/* File: mips/binop.S */ 5048 /* 5049 * Generic 32-bit binary operation. Provide an "instr" line that 5050 * specifies an instruction that performs "result = a0 op a1". 5051 * This could be a MIPS instruction or a function call. (If the result 5052 * comes back in a register other than a0, you can override "result".) 5053 * 5054 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5055 * vCC (a1). Useful for integer division and modulus. Note that we 5056 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 5057 * handles it correctly. 5058 * 5059 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 5060 * xor-int, shl-int, shr-int, ushr-int 5061 */ 5062 /* binop vAA, vBB, vCC */ 5063 FETCH(a0, 1) # a0 <- CCBB 5064 GET_OPA(rOBJ) # rOBJ <- AA 5065 srl a3, a0, 8 # a3 <- CC 5066 and a2, a0, 255 # a2 <- BB 5067 GET_VREG(a1, a3) # a1 <- vCC 5068 GET_VREG(a0, a2) # a0 <- vBB 5069 .if 0 5070 # is second operand zero? 5071 beqz a1, common_errDivideByZero 5072 .endif 5073 5074 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5075 # optional op 5076 xor a0, a0, a1 # a0 <- op, a0-a3 changed 5077 GET_INST_OPCODE(t0) # extract opcode from rINST 5078 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 5079 /* 11-14 instructions */ 5080 5081 5082 5083/* ------------------------------ */ 5084 .balign 128 5085.L_OP_SHL_INT: /* 0x98 */ 5086/* File: mips/OP_SHL_INT.S */ 5087/* File: mips/binop.S */ 5088 /* 5089 * Generic 32-bit binary operation. Provide an "instr" line that 5090 * specifies an instruction that performs "result = a0 op a1". 5091 * This could be a MIPS instruction or a function call. (If the result 5092 * comes back in a register other than a0, you can override "result".) 5093 * 5094 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5095 * vCC (a1). Useful for integer division and modulus. Note that we 5096 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 5097 * handles it correctly. 5098 * 5099 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 5100 * xor-int, shl-int, shr-int, ushr-int 5101 */ 5102 /* binop vAA, vBB, vCC */ 5103 FETCH(a0, 1) # a0 <- CCBB 5104 GET_OPA(rOBJ) # rOBJ <- AA 5105 srl a3, a0, 8 # a3 <- CC 5106 and a2, a0, 255 # a2 <- BB 5107 GET_VREG(a1, a3) # a1 <- vCC 5108 GET_VREG(a0, a2) # a0 <- vBB 5109 .if 0 5110 # is second operand zero? 5111 beqz a1, common_errDivideByZero 5112 .endif 5113 5114 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5115 and a1, a1, 31 # optional op 5116 sll a0, a0, a1 # a0 <- op, a0-a3 changed 5117 GET_INST_OPCODE(t0) # extract opcode from rINST 5118 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 5119 /* 11-14 instructions */ 5120 5121 5122 5123/* ------------------------------ */ 5124 .balign 128 5125.L_OP_SHR_INT: /* 0x99 */ 5126/* File: mips/OP_SHR_INT.S */ 5127/* File: mips/binop.S */ 5128 /* 5129 * Generic 32-bit binary operation. Provide an "instr" line that 5130 * specifies an instruction that performs "result = a0 op a1". 5131 * This could be a MIPS instruction or a function call. (If the result 5132 * comes back in a register other than a0, you can override "result".) 5133 * 5134 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5135 * vCC (a1). Useful for integer division and modulus. Note that we 5136 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 5137 * handles it correctly. 5138 * 5139 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 5140 * xor-int, shl-int, shr-int, ushr-int 5141 */ 5142 /* binop vAA, vBB, vCC */ 5143 FETCH(a0, 1) # a0 <- CCBB 5144 GET_OPA(rOBJ) # rOBJ <- AA 5145 srl a3, a0, 8 # a3 <- CC 5146 and a2, a0, 255 # a2 <- BB 5147 GET_VREG(a1, a3) # a1 <- vCC 5148 GET_VREG(a0, a2) # a0 <- vBB 5149 .if 0 5150 # is second operand zero? 5151 beqz a1, common_errDivideByZero 5152 .endif 5153 5154 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5155 and a1, a1, 31 # optional op 5156 sra a0, a0, a1 # a0 <- op, a0-a3 changed 5157 GET_INST_OPCODE(t0) # extract opcode from rINST 5158 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 5159 /* 11-14 instructions */ 5160 5161 5162 5163/* ------------------------------ */ 5164 .balign 128 5165.L_OP_USHR_INT: /* 0x9a */ 5166/* File: mips/OP_USHR_INT.S */ 5167/* File: mips/binop.S */ 5168 /* 5169 * Generic 32-bit binary operation. Provide an "instr" line that 5170 * specifies an instruction that performs "result = a0 op a1". 5171 * This could be a MIPS instruction or a function call. (If the result 5172 * comes back in a register other than a0, you can override "result".) 5173 * 5174 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5175 * vCC (a1). Useful for integer division and modulus. Note that we 5176 * *don't* check for (INT_MIN / -1) here, because the ARM math lib 5177 * handles it correctly. 5178 * 5179 * For: add-int, sub-int, mul-int, div-int, rem-int, and-int, or-int, 5180 * xor-int, shl-int, shr-int, ushr-int 5181 */ 5182 /* binop vAA, vBB, vCC */ 5183 FETCH(a0, 1) # a0 <- CCBB 5184 GET_OPA(rOBJ) # rOBJ <- AA 5185 srl a3, a0, 8 # a3 <- CC 5186 and a2, a0, 255 # a2 <- BB 5187 GET_VREG(a1, a3) # a1 <- vCC 5188 GET_VREG(a0, a2) # a0 <- vBB 5189 .if 0 5190 # is second operand zero? 5191 beqz a1, common_errDivideByZero 5192 .endif 5193 5194 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5195 and a1, a1, 31 # optional op 5196 srl a0, a0, a1 # a0 <- op, a0-a3 changed 5197 GET_INST_OPCODE(t0) # extract opcode from rINST 5198 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 5199 /* 11-14 instructions */ 5200 5201 5202 5203/* ------------------------------ */ 5204 .balign 128 5205.L_OP_ADD_LONG: /* 0x9b */ 5206/* File: mips/OP_ADD_LONG.S */ 5207/* 5208 * The compiler generates the following sequence for 5209 * [v1 v0] = [a1 a0] + [a3 a2]; 5210 * addu v0,a2,a0 5211 * addu a1,a3,a1 5212 * sltu v1,v0,a2 5213 * addu v1,v1,a1 5214 */ 5215/* File: mips/binopWide.S */ 5216 /* 5217 * Generic 64-bit binary operation. Provide an "instr" line that 5218 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5219 * This could be a MIPS instruction or a function call. (If the result 5220 * comes back in a register other than a0, you can override "result".) 5221 * 5222 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5223 * vCC (a1). Useful for integer division and modulus. 5224 * 5225 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5226 * xor-long 5227 * 5228 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5229 */ 5230 /* binop vAA, vBB, vCC */ 5231 FETCH(a0, 1) # a0 <- CCBB 5232 GET_OPA(rOBJ) # rOBJ <- AA 5233 and a2, a0, 255 # a2 <- BB 5234 srl a3, a0, 8 # a3 <- CC 5235 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5236 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5237 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5238 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 5239 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5240 .if 0 5241 or t0, a2, a3 # second arg (a2-a3) is zero? 5242 beqz t0, common_errDivideByZero 5243 .endif 5244 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5245 5246 addu v0, a2, a0 # optional op 5247 addu a1, a3, a1; sltu v1, v0, a2; addu v1, v1, a1 # result <- op, a0-a3 changed 5248 GET_INST_OPCODE(t0) # extract opcode from rINST 5249 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 5250 GOTO_OPCODE(t0) # jump to next instruction 5251 /* 14-17 instructions */ 5252 5253 5254 5255/* ------------------------------ */ 5256 .balign 128 5257.L_OP_SUB_LONG: /* 0x9c */ 5258/* File: mips/OP_SUB_LONG.S */ 5259/* 5260 * For little endian the code sequence looks as follows: 5261 * subu v0,a0,a2 5262 * subu v1,a1,a3 5263 * sltu a0,a0,v0 5264 * subu v1,v1,a0 5265 */ 5266/* File: mips/binopWide.S */ 5267 /* 5268 * Generic 64-bit binary operation. Provide an "instr" line that 5269 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5270 * This could be a MIPS instruction or a function call. (If the result 5271 * comes back in a register other than a0, you can override "result".) 5272 * 5273 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5274 * vCC (a1). Useful for integer division and modulus. 5275 * 5276 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5277 * xor-long 5278 * 5279 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5280 */ 5281 /* binop vAA, vBB, vCC */ 5282 FETCH(a0, 1) # a0 <- CCBB 5283 GET_OPA(rOBJ) # rOBJ <- AA 5284 and a2, a0, 255 # a2 <- BB 5285 srl a3, a0, 8 # a3 <- CC 5286 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5287 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5288 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5289 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 5290 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5291 .if 0 5292 or t0, a2, a3 # second arg (a2-a3) is zero? 5293 beqz t0, common_errDivideByZero 5294 .endif 5295 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5296 5297 subu v0, a0, a2 # optional op 5298 subu v1, a1, a3; sltu a0, a0, v0; subu v1, v1, a0 # result <- op, a0-a3 changed 5299 GET_INST_OPCODE(t0) # extract opcode from rINST 5300 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 5301 GOTO_OPCODE(t0) # jump to next instruction 5302 /* 14-17 instructions */ 5303 5304 5305 5306 5307/* ------------------------------ */ 5308 .balign 128 5309.L_OP_MUL_LONG: /* 0x9d */ 5310/* File: mips/OP_MUL_LONG.S */ 5311 /* 5312 * Signed 64-bit integer multiply. 5313 * a1 a0 5314 * x a3 a2 5315 * ------------- 5316 * a2a1 a2a0 5317 * a3a0 5318 * a3a1 (<= unused) 5319 * --------------- 5320 * v1 v0 5321 */ 5322 /* mul-long vAA, vBB, vCC */ 5323 FETCH(a0, 1) # a0 <- CCBB 5324 and t0, a0, 255 # a2 <- BB 5325 srl t1, a0, 8 # a3 <- CC 5326 EAS2(t0, rFP, t0) # t0 <- &fp[BB] 5327 LOAD64(a0, a1, t0) # a0/a1 <- vBB/vBB+1 5328 5329 EAS2(t1, rFP, t1) # t0 <- &fp[CC] 5330 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5331 5332 mul v1, a3, a0 # v1= a3a0 5333 multu a2, a0 5334 mfhi t1 5335 mflo v0 # v0= a2a0 5336 mul t0, a2, a1 # t0= a2a1 5337 addu v1, v1, t1 # v1+= hi(a2a0) 5338 addu v1, v1, t0 # v1= a3a0 + a2a1; 5339 5340 GET_OPA(a0) # a0 <- AA 5341 EAS2(a0, rFP, a0) # a0 <- &fp[A] 5342 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5343 b .LOP_MUL_LONG_finish 5344 5345/* ------------------------------ */ 5346 .balign 128 5347.L_OP_DIV_LONG: /* 0x9e */ 5348/* File: mips/OP_DIV_LONG.S */ 5349#ifdef HAVE_LITTLE_ENDIAN 5350/* File: mips/binopWide.S */ 5351 /* 5352 * Generic 64-bit binary operation. Provide an "instr" line that 5353 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5354 * This could be a MIPS instruction or a function call. (If the result 5355 * comes back in a register other than a0, you can override "result".) 5356 * 5357 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5358 * vCC (a1). Useful for integer division and modulus. 5359 * 5360 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5361 * xor-long 5362 * 5363 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5364 */ 5365 /* binop vAA, vBB, vCC */ 5366 FETCH(a0, 1) # a0 <- CCBB 5367 GET_OPA(rOBJ) # rOBJ <- AA 5368 and a2, a0, 255 # a2 <- BB 5369 srl a3, a0, 8 # a3 <- CC 5370 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5371 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5372 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5373 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 5374 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5375 .if 1 5376 or t0, a2, a3 # second arg (a2-a3) is zero? 5377 beqz t0, common_errDivideByZero 5378 .endif 5379 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5380 5381 # optional op 5382 JAL(__divdi3) # result <- op, a0-a3 changed 5383 GET_INST_OPCODE(t0) # extract opcode from rINST 5384 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 5385 GOTO_OPCODE(t0) # jump to next instruction 5386 /* 14-17 instructions */ 5387 5388 5389#else 5390/* File: mips/binopWide.S */ 5391 /* 5392 * Generic 64-bit binary operation. Provide an "instr" line that 5393 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5394 * This could be a MIPS instruction or a function call. (If the result 5395 * comes back in a register other than a0, you can override "result".) 5396 * 5397 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5398 * vCC (a1). Useful for integer division and modulus. 5399 * 5400 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5401 * xor-long 5402 * 5403 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5404 */ 5405 /* binop vAA, vBB, vCC */ 5406 FETCH(a0, 1) # a0 <- CCBB 5407 GET_OPA(rOBJ) # rOBJ <- AA 5408 and a2, a0, 255 # a2 <- BB 5409 srl a3, a0, 8 # a3 <- CC 5410 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5411 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5412 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5413 LOAD64(a1, a0, a2) # a0/a1 <- vBB/vBB+1 5414 LOAD64(a3, a2, t1) # a2/a3 <- vCC/vCC+1 5415 .if 1 5416 or t0, a3, a2 # second arg (a2-a3) is zero? 5417 beqz t0, common_errDivideByZero 5418 .endif 5419 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5420 5421 # optional op 5422 JAL(__divdi3) # result <- op, a0-a3 changed 5423 GET_INST_OPCODE(t0) # extract opcode from rINST 5424 STORE64(v1, v0, rOBJ) # vAA/vAA+1 <- v1/v0 5425 GOTO_OPCODE(t0) # jump to next instruction 5426 /* 14-17 instructions */ 5427 5428 5429#endif 5430 5431/* ------------------------------ */ 5432 .balign 128 5433.L_OP_REM_LONG: /* 0x9f */ 5434/* File: mips/OP_REM_LONG.S */ 5435/* ldivmod returns quotient in a0/a1 and remainder in a2/a3 */ 5436#ifdef HAVE_LITTLE_ENDIAN 5437/* File: mips/binopWide.S */ 5438 /* 5439 * Generic 64-bit binary operation. Provide an "instr" line that 5440 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5441 * This could be a MIPS instruction or a function call. (If the result 5442 * comes back in a register other than a0, you can override "result".) 5443 * 5444 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5445 * vCC (a1). Useful for integer division and modulus. 5446 * 5447 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5448 * xor-long 5449 * 5450 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5451 */ 5452 /* binop vAA, vBB, vCC */ 5453 FETCH(a0, 1) # a0 <- CCBB 5454 GET_OPA(rOBJ) # rOBJ <- AA 5455 and a2, a0, 255 # a2 <- BB 5456 srl a3, a0, 8 # a3 <- CC 5457 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5458 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5459 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5460 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 5461 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5462 .if 1 5463 or t0, a2, a3 # second arg (a2-a3) is zero? 5464 beqz t0, common_errDivideByZero 5465 .endif 5466 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5467 5468 # optional op 5469 JAL(__moddi3) # result <- op, a0-a3 changed 5470 GET_INST_OPCODE(t0) # extract opcode from rINST 5471 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 5472 GOTO_OPCODE(t0) # jump to next instruction 5473 /* 14-17 instructions */ 5474 5475 5476#else 5477/* File: mips/binopWide.S */ 5478 /* 5479 * Generic 64-bit binary operation. Provide an "instr" line that 5480 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5481 * This could be a MIPS instruction or a function call. (If the result 5482 * comes back in a register other than a0, you can override "result".) 5483 * 5484 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5485 * vCC (a1). Useful for integer division and modulus. 5486 * 5487 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5488 * xor-long 5489 * 5490 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5491 */ 5492 /* binop vAA, vBB, vCC */ 5493 FETCH(a0, 1) # a0 <- CCBB 5494 GET_OPA(rOBJ) # rOBJ <- AA 5495 and a2, a0, 255 # a2 <- BB 5496 srl a3, a0, 8 # a3 <- CC 5497 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5498 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5499 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5500 LOAD64(a1, a0, a2) # a0/a1 <- vBB/vBB+1 5501 LOAD64(a3, a2, t1) # a2/a3 <- vCC/vCC+1 5502 .if 1 5503 or t0, a3, a2 # second arg (a2-a3) is zero? 5504 beqz t0, common_errDivideByZero 5505 .endif 5506 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5507 5508 # optional op 5509 JAL(__moddi3) # result <- op, a0-a3 changed 5510 GET_INST_OPCODE(t0) # extract opcode from rINST 5511 STORE64(v1, v0, rOBJ) # vAA/vAA+1 <- v1/v0 5512 GOTO_OPCODE(t0) # jump to next instruction 5513 /* 14-17 instructions */ 5514 5515 5516#endif 5517 5518/* ------------------------------ */ 5519 .balign 128 5520.L_OP_AND_LONG: /* 0xa0 */ 5521/* File: mips/OP_AND_LONG.S */ 5522/* File: mips/binopWide.S */ 5523 /* 5524 * Generic 64-bit binary operation. Provide an "instr" line that 5525 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5526 * This could be a MIPS instruction or a function call. (If the result 5527 * comes back in a register other than a0, you can override "result".) 5528 * 5529 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5530 * vCC (a1). Useful for integer division and modulus. 5531 * 5532 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5533 * xor-long 5534 * 5535 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5536 */ 5537 /* binop vAA, vBB, vCC */ 5538 FETCH(a0, 1) # a0 <- CCBB 5539 GET_OPA(rOBJ) # rOBJ <- AA 5540 and a2, a0, 255 # a2 <- BB 5541 srl a3, a0, 8 # a3 <- CC 5542 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5543 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5544 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5545 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 5546 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5547 .if 0 5548 or t0, a2, a3 # second arg (a2-a3) is zero? 5549 beqz t0, common_errDivideByZero 5550 .endif 5551 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5552 5553 and a0, a0, a2 # optional op 5554 and a1, a1, a3 # result <- op, a0-a3 changed 5555 GET_INST_OPCODE(t0) # extract opcode from rINST 5556 STORE64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1 5557 GOTO_OPCODE(t0) # jump to next instruction 5558 /* 14-17 instructions */ 5559 5560 5561 5562/* ------------------------------ */ 5563 .balign 128 5564.L_OP_OR_LONG: /* 0xa1 */ 5565/* File: mips/OP_OR_LONG.S */ 5566/* File: mips/binopWide.S */ 5567 /* 5568 * Generic 64-bit binary operation. Provide an "instr" line that 5569 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5570 * This could be a MIPS instruction or a function call. (If the result 5571 * comes back in a register other than a0, you can override "result".) 5572 * 5573 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5574 * vCC (a1). Useful for integer division and modulus. 5575 * 5576 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5577 * xor-long 5578 * 5579 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5580 */ 5581 /* binop vAA, vBB, vCC */ 5582 FETCH(a0, 1) # a0 <- CCBB 5583 GET_OPA(rOBJ) # rOBJ <- AA 5584 and a2, a0, 255 # a2 <- BB 5585 srl a3, a0, 8 # a3 <- CC 5586 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5587 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5588 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5589 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 5590 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5591 .if 0 5592 or t0, a2, a3 # second arg (a2-a3) is zero? 5593 beqz t0, common_errDivideByZero 5594 .endif 5595 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5596 5597 or a0, a0, a2 # optional op 5598 or a1, a1, a3 # result <- op, a0-a3 changed 5599 GET_INST_OPCODE(t0) # extract opcode from rINST 5600 STORE64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1 5601 GOTO_OPCODE(t0) # jump to next instruction 5602 /* 14-17 instructions */ 5603 5604 5605 5606/* ------------------------------ */ 5607 .balign 128 5608.L_OP_XOR_LONG: /* 0xa2 */ 5609/* File: mips/OP_XOR_LONG.S */ 5610/* File: mips/binopWide.S */ 5611 /* 5612 * Generic 64-bit binary operation. Provide an "instr" line that 5613 * specifies an instruction that performs "result = a0-a1 op a2-a3". 5614 * This could be a MIPS instruction or a function call. (If the result 5615 * comes back in a register other than a0, you can override "result".) 5616 * 5617 * If "chkzero" is set to 1, we perform a divide-by-zero check on 5618 * vCC (a1). Useful for integer division and modulus. 5619 * 5620 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 5621 * xor-long 5622 * 5623 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 5624 */ 5625 /* binop vAA, vBB, vCC */ 5626 FETCH(a0, 1) # a0 <- CCBB 5627 GET_OPA(rOBJ) # rOBJ <- AA 5628 and a2, a0, 255 # a2 <- BB 5629 srl a3, a0, 8 # a3 <- CC 5630 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[AA] 5631 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 5632 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 5633 LOAD64(a0, a1, a2) # a0/a1 <- vBB/vBB+1 5634 LOAD64(a2, a3, t1) # a2/a3 <- vCC/vCC+1 5635 .if 0 5636 or t0, a2, a3 # second arg (a2-a3) is zero? 5637 beqz t0, common_errDivideByZero 5638 .endif 5639 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5640 5641 xor a0, a0, a2 # optional op 5642 xor a1, a1, a3 # result <- op, a0-a3 changed 5643 GET_INST_OPCODE(t0) # extract opcode from rINST 5644 STORE64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1 5645 GOTO_OPCODE(t0) # jump to next instruction 5646 /* 14-17 instructions */ 5647 5648 5649 5650/* ------------------------------ */ 5651 .balign 128 5652.L_OP_SHL_LONG: /* 0xa3 */ 5653/* File: mips/OP_SHL_LONG.S */ 5654 /* 5655 * Long integer shift. This is different from the generic 32/64-bit 5656 * binary operations because vAA/vBB are 64-bit but vCC (the shift 5657 * distance) is 32-bit. Also, Dalvik requires us to mask off the low 5658 * 6 bits of the shift distance. 5659 */ 5660 /* shl-long vAA, vBB, vCC */ 5661 FETCH(a0, 1) # a0 <- CCBB 5662 GET_OPA(t2) # t2 <- AA 5663 and a3, a0, 255 # a3 <- BB 5664 srl a0, a0, 8 # a0 <- CC 5665 EAS2(a3, rFP, a3) # a3 <- &fp[BB] 5666 GET_VREG(a2, a0) # a2 <- vCC 5667 LOAD64(a0, a1, a3) # a0/a1 <- vBB/vBB+1 5668 5669 EAS2(t2, rFP, t2) # t2 <- &fp[AA] 5670 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5671 5672 sll v0, a0, a2 # rlo<- alo << (shift&31) 5673 not v1, a2 # rhi<- 31-shift (shift is 5b) 5674 srl a0, 1 5675 srl a0, v1 # alo<- alo >> (32-(shift&31)) 5676 sll v1, a1, a2 # rhi<- ahi << (shift&31) 5677 or v1, a0 # rhi<- rhi | alo 5678 andi a2, 0x20 # shift< shift & 0x20 5679 movn v1, v0, a2 # rhi<- rlo (if shift&0x20) 5680 movn v0, zero, a2 # rlo<- 0 (if shift&0x20) 5681 5682 GET_INST_OPCODE(t0) # extract opcode from rINST 5683 STORE64(v0, v1, t2) # vAA/vAA+1 <- a0/a1 5684 GOTO_OPCODE(t0) # jump to next instruction 5685 5686 5687/* ------------------------------ */ 5688 .balign 128 5689.L_OP_SHR_LONG: /* 0xa4 */ 5690/* File: mips/OP_SHR_LONG.S */ 5691 /* 5692 * Long integer shift. This is different from the generic 32/64-bit 5693 * binary operations because vAA/vBB are 64-bit but vCC (the shift 5694 * distance) is 32-bit. Also, Dalvik requires us to mask off the low 5695 * 6 bits of the shift distance. 5696 */ 5697 /* shr-long vAA, vBB, vCC */ 5698 FETCH(a0, 1) # a0 <- CCBB 5699 GET_OPA(t3) # t3 <- AA 5700 and a3, a0, 255 # a3 <- BB 5701 srl a0, a0, 8 # a0 <- CC 5702 EAS2(a3, rFP, a3) # a3 <- &fp[BB] 5703 GET_VREG(a2, a0) # a2 <- vCC 5704 LOAD64(a0, a1, a3) # a0/a1 <- vBB/vBB+1 5705 EAS2(t3, rFP, t3) # t3 <- &fp[AA] 5706 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5707 5708 sra v1, a1, a2 # rhi<- ahi >> (shift&31) 5709 srl v0, a0, a2 # rlo<- alo >> (shift&31) 5710 sra a3, a1, 31 # a3<- sign(ah) 5711 not a0, a2 # alo<- 31-shift (shift is 5b) 5712 sll a1, 1 5713 sll a1, a0 # ahi<- ahi << (32-(shift&31)) 5714 or v0, a1 # rlo<- rlo | ahi 5715 andi a2, 0x20 # shift & 0x20 5716 movn v0, v1, a2 # rlo<- rhi (if shift&0x20) 5717 movn v1, a3, a2 # rhi<- sign(ahi) (if shift&0x20) 5718 5719 STORE64(v0, v1, t3) # vAA/VAA+1 <- v0/v0 5720 GET_INST_OPCODE(t0) # extract opcode from rINST 5721 GOTO_OPCODE(t0) # jump to next instruction 5722 5723 5724/* ------------------------------ */ 5725 .balign 128 5726.L_OP_USHR_LONG: /* 0xa5 */ 5727/* File: mips/OP_USHR_LONG.S */ 5728 /* 5729 * Long integer shift. This is different from the generic 32/64-bit 5730 * binary operations because vAA/vBB are 64-bit but vCC (the shift 5731 * distance) is 32-bit. Also, Dalvik requires us to mask off the low 5732 * 6 bits of the shift distance. 5733 */ 5734 /* ushr-long vAA, vBB, vCC */ 5735 FETCH(a0, 1) # a0 <- CCBB 5736 GET_OPA(t0) # t3 <- AA 5737 and a3, a0, 255 # a3 <- BB 5738 srl a0, a0, 8 # a0 <- CC 5739 EAS2(a3, rFP, a3) # a3 <- &fp[BB] 5740 GET_VREG(a2, a0) # a2 <- vCC 5741 LOAD64(a0, a1, a3) # a0/a1 <- vBB/vBB+1 5742 EAS2(rOBJ, rFP, t0) # rOBJ <- &fp[AA] 5743 5744 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5745 srl v1, a1, a2 # rhi<- ahi >> (shift&31) 5746 srl v0, a0, a2 # rlo<- alo >> (shift&31) 5747 not a0, a2 # alo<- 31-n (shift is 5b) 5748 sll a1, 1 5749 sll a1, a0 # ahi<- ahi << (32-(shift&31)) 5750 or v0, a1 # rlo<- rlo | ahi 5751 andi a2, 0x20 # shift & 0x20 5752 movn v0, v1, a2 # rlo<- rhi (if shift&0x20) 5753 movn v1, zero, a2 # rhi<- 0 (if shift&0x20) 5754 5755 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 5756 GET_INST_OPCODE(t0) # extract opcode from rINST 5757 GOTO_OPCODE(t0) # jump to next instruction 5758 5759 5760/* ------------------------------ */ 5761 .balign 128 5762.L_OP_ADD_FLOAT: /* 0xa6 */ 5763/* File: mips/OP_ADD_FLOAT.S */ 5764/* File: mips/binflop.S */ 5765 /* 5766 * Generic 32-bit binary float operation. 5767 * 5768 * For: add-fp, sub-fp, mul-fp, div-fp 5769 */ 5770 5771 /* binop vAA, vBB, vCC */ 5772 FETCH(a0, 1) # a0 <- CCBB 5773 GET_OPA(rOBJ) # s5 <- AA 5774 srl a3, a0, 8 # a3 <- CC 5775 and a2, a0, 255 # a2 <- BB 5776#ifdef SOFT_FLOAT 5777 GET_VREG(a1, a3) # a1 <- vCC 5778 GET_VREG(a0, a2) # a0 <- vBB 5779 .if 0 5780 # is second operand zero? 5781 beqz a1, common_errDivideByZero 5782 .endif 5783#else 5784 GET_VREG_F(fa1, a3) # a1 <- vCC 5785 GET_VREG_F(fa0, a2) # a0 <- vBB 5786 5787 .if 0 5788 # is second operand zero? 5789 li.s ft0, 0 5790 c.eq.s fcc0, ft0, fa1 # condition bit and comparision with 0 5791 bc1t fcc0, common_errDivideByZero 5792 .endif 5793#endif 5794 5795 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5796 # optional op 5797#ifdef SOFT_FLOAT 5798 JAL(__addsf3) # v0 = result 5799 SET_VREG(v0, rOBJ) # vAA <- v0 5800#else 5801 add.s fv0, fa0, fa1 # f0 = result 5802 SET_VREG_F(fv0, rOBJ) # vAA <- fv0 5803#endif 5804 GET_INST_OPCODE(t0) # extract opcode from rINST 5805 GOTO_OPCODE(t0) # jump to next instruction 5806 /* 11-14 instructions */ 5807 5808 5809 5810/* ------------------------------ */ 5811 .balign 128 5812.L_OP_SUB_FLOAT: /* 0xa7 */ 5813/* File: mips/OP_SUB_FLOAT.S */ 5814/* File: mips/binflop.S */ 5815 /* 5816 * Generic 32-bit binary float operation. 5817 * 5818 * For: add-fp, sub-fp, mul-fp, div-fp 5819 */ 5820 5821 /* binop vAA, vBB, vCC */ 5822 FETCH(a0, 1) # a0 <- CCBB 5823 GET_OPA(rOBJ) # s5 <- AA 5824 srl a3, a0, 8 # a3 <- CC 5825 and a2, a0, 255 # a2 <- BB 5826#ifdef SOFT_FLOAT 5827 GET_VREG(a1, a3) # a1 <- vCC 5828 GET_VREG(a0, a2) # a0 <- vBB 5829 .if 0 5830 # is second operand zero? 5831 beqz a1, common_errDivideByZero 5832 .endif 5833#else 5834 GET_VREG_F(fa1, a3) # a1 <- vCC 5835 GET_VREG_F(fa0, a2) # a0 <- vBB 5836 5837 .if 0 5838 # is second operand zero? 5839 li.s ft0, 0 5840 c.eq.s fcc0, ft0, fa1 # condition bit and comparision with 0 5841 bc1t fcc0, common_errDivideByZero 5842 .endif 5843#endif 5844 5845 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5846 # optional op 5847#ifdef SOFT_FLOAT 5848 JAL(__subsf3) # v0 = result 5849 SET_VREG(v0, rOBJ) # vAA <- v0 5850#else 5851 sub.s fv0, fa0, fa1 # f0 = result 5852 SET_VREG_F(fv0, rOBJ) # vAA <- fv0 5853#endif 5854 GET_INST_OPCODE(t0) # extract opcode from rINST 5855 GOTO_OPCODE(t0) # jump to next instruction 5856 /* 11-14 instructions */ 5857 5858 5859 5860/* ------------------------------ */ 5861 .balign 128 5862.L_OP_MUL_FLOAT: /* 0xa8 */ 5863/* File: mips/OP_MUL_FLOAT.S */ 5864/* File: mips/binflop.S */ 5865 /* 5866 * Generic 32-bit binary float operation. 5867 * 5868 * For: add-fp, sub-fp, mul-fp, div-fp 5869 */ 5870 5871 /* binop vAA, vBB, vCC */ 5872 FETCH(a0, 1) # a0 <- CCBB 5873 GET_OPA(rOBJ) # s5 <- AA 5874 srl a3, a0, 8 # a3 <- CC 5875 and a2, a0, 255 # a2 <- BB 5876#ifdef SOFT_FLOAT 5877 GET_VREG(a1, a3) # a1 <- vCC 5878 GET_VREG(a0, a2) # a0 <- vBB 5879 .if 0 5880 # is second operand zero? 5881 beqz a1, common_errDivideByZero 5882 .endif 5883#else 5884 GET_VREG_F(fa1, a3) # a1 <- vCC 5885 GET_VREG_F(fa0, a2) # a0 <- vBB 5886 5887 .if 0 5888 # is second operand zero? 5889 li.s ft0, 0 5890 c.eq.s fcc0, ft0, fa1 # condition bit and comparision with 0 5891 bc1t fcc0, common_errDivideByZero 5892 .endif 5893#endif 5894 5895 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5896 # optional op 5897#ifdef SOFT_FLOAT 5898 JAL(__mulsf3) # v0 = result 5899 SET_VREG(v0, rOBJ) # vAA <- v0 5900#else 5901 mul.s fv0, fa0, fa1 # f0 = result 5902 SET_VREG_F(fv0, rOBJ) # vAA <- fv0 5903#endif 5904 GET_INST_OPCODE(t0) # extract opcode from rINST 5905 GOTO_OPCODE(t0) # jump to next instruction 5906 /* 11-14 instructions */ 5907 5908 5909 5910/* ------------------------------ */ 5911 .balign 128 5912.L_OP_DIV_FLOAT: /* 0xa9 */ 5913/* File: mips/OP_DIV_FLOAT.S */ 5914/* File: mips/binflop.S */ 5915 /* 5916 * Generic 32-bit binary float operation. 5917 * 5918 * For: add-fp, sub-fp, mul-fp, div-fp 5919 */ 5920 5921 /* binop vAA, vBB, vCC */ 5922 FETCH(a0, 1) # a0 <- CCBB 5923 GET_OPA(rOBJ) # s5 <- AA 5924 srl a3, a0, 8 # a3 <- CC 5925 and a2, a0, 255 # a2 <- BB 5926#ifdef SOFT_FLOAT 5927 GET_VREG(a1, a3) # a1 <- vCC 5928 GET_VREG(a0, a2) # a0 <- vBB 5929 .if 0 5930 # is second operand zero? 5931 beqz a1, common_errDivideByZero 5932 .endif 5933#else 5934 GET_VREG_F(fa1, a3) # a1 <- vCC 5935 GET_VREG_F(fa0, a2) # a0 <- vBB 5936 5937 .if 0 5938 # is second operand zero? 5939 li.s ft0, 0 5940 c.eq.s fcc0, ft0, fa1 # condition bit and comparision with 0 5941 bc1t fcc0, common_errDivideByZero 5942 .endif 5943#endif 5944 5945 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5946 # optional op 5947#ifdef SOFT_FLOAT 5948 JAL(__divsf3) # v0 = result 5949 SET_VREG(v0, rOBJ) # vAA <- v0 5950#else 5951 div.s fv0, fa0, fa1 # f0 = result 5952 SET_VREG_F(fv0, rOBJ) # vAA <- fv0 5953#endif 5954 GET_INST_OPCODE(t0) # extract opcode from rINST 5955 GOTO_OPCODE(t0) # jump to next instruction 5956 /* 11-14 instructions */ 5957 5958 5959 5960/* ------------------------------ */ 5961 .balign 128 5962.L_OP_REM_FLOAT: /* 0xaa */ 5963/* File: mips/OP_REM_FLOAT.S */ 5964/* File: mips/binflop.S */ 5965 /* 5966 * Generic 32-bit binary float operation. 5967 * 5968 * For: add-fp, sub-fp, mul-fp, div-fp 5969 */ 5970 5971 /* binop vAA, vBB, vCC */ 5972 FETCH(a0, 1) # a0 <- CCBB 5973 GET_OPA(rOBJ) # s5 <- AA 5974 srl a3, a0, 8 # a3 <- CC 5975 and a2, a0, 255 # a2 <- BB 5976#ifdef SOFT_FLOAT 5977 GET_VREG(a1, a3) # a1 <- vCC 5978 GET_VREG(a0, a2) # a0 <- vBB 5979 .if 0 5980 # is second operand zero? 5981 beqz a1, common_errDivideByZero 5982 .endif 5983#else 5984 GET_VREG_F(fa1, a3) # a1 <- vCC 5985 GET_VREG_F(fa0, a2) # a0 <- vBB 5986 5987 .if 0 5988 # is second operand zero? 5989 li.s ft0, 0 5990 c.eq.s fcc0, ft0, fa1 # condition bit and comparision with 0 5991 bc1t fcc0, common_errDivideByZero 5992 .endif 5993#endif 5994 5995 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 5996 # optional op 5997#ifdef SOFT_FLOAT 5998 JAL(fmodf) # v0 = result 5999 SET_VREG(v0, rOBJ) # vAA <- v0 6000#else 6001 JAL(fmodf) # f0 = result 6002 SET_VREG_F(fv0, rOBJ) # vAA <- fv0 6003#endif 6004 GET_INST_OPCODE(t0) # extract opcode from rINST 6005 GOTO_OPCODE(t0) # jump to next instruction 6006 /* 11-14 instructions */ 6007 6008 6009 6010/* ------------------------------ */ 6011 .balign 128 6012.L_OP_ADD_DOUBLE: /* 0xab */ 6013/* File: mips/OP_ADD_DOUBLE.S */ 6014/* File: mips/binflopWide.S */ 6015 /* 6016 * Generic 64-bit binary operation. Provide an "instr" line that 6017 * specifies an instruction that performs "result = a0-a1 op a2-a3". 6018 * This could be an MIPS instruction or a function call. 6019 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6020 * vCC (a1). Useful for integer division and modulus. 6021 * 6022 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 6023 * xor-long, add-double, sub-double, mul-double, div-double, 6024 * rem-double 6025 * 6026 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 6027 */ 6028 /* binop vAA, vBB, vCC */ 6029 FETCH(a0, 1) # a0 <- CCBB 6030 GET_OPA(rOBJ) # s5 <- AA 6031 and a2, a0, 255 # a2 <- BB 6032 srl a3, a0, 8 # a3 <- CC 6033 EAS2(rOBJ, rFP, rOBJ) # s5 <- &fp[AA] 6034 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 6035 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 6036#ifdef SOFT_FLOAT 6037 LOAD64(rARG0, rARG1, a2) # a0/a1 <- vBB/vBB+1 6038 LOAD64(rARG2, rARG3, t1) # a2/a3 <- vCC/vCC+1 6039 .if 0 6040 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 6041 beqz t0, common_errDivideByZero 6042 .endif 6043#else 6044 LOAD64_F(fa0, fa0f, a2) 6045 LOAD64_F(fa1, fa1f, t1) 6046 .if 0 6047 li.d ft0, 0 6048 c.eq.d fcc0, fa1, ft0 6049 bc1t fcc0, common_errDivideByZero 6050 .endif 6051#endif 60521: 6053 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 6054 # optional op 6055#ifdef SOFT_FLOAT 6056 JAL(__adddf3) # result <- op, a0-a3 changed 6057 STORE64(rRESULT0, rRESULT1, rOBJ) 6058#else 6059 add.d fv0, fa0, fa1 6060 STORE64_F(fv0, fv0f, rOBJ) 6061#endif 6062 GET_INST_OPCODE(t0) # extract opcode from rINST 6063 GOTO_OPCODE(t0) # jump to next instruction 6064 /* 14-17 instructions */ 6065 6066 6067 6068/* ------------------------------ */ 6069 .balign 128 6070.L_OP_SUB_DOUBLE: /* 0xac */ 6071/* File: mips/OP_SUB_DOUBLE.S */ 6072/* File: mips/binflopWide.S */ 6073 /* 6074 * Generic 64-bit binary operation. Provide an "instr" line that 6075 * specifies an instruction that performs "result = a0-a1 op a2-a3". 6076 * This could be an MIPS instruction or a function call. 6077 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6078 * vCC (a1). Useful for integer division and modulus. 6079 * 6080 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 6081 * xor-long, add-double, sub-double, mul-double, div-double, 6082 * rem-double 6083 * 6084 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 6085 */ 6086 /* binop vAA, vBB, vCC */ 6087 FETCH(a0, 1) # a0 <- CCBB 6088 GET_OPA(rOBJ) # s5 <- AA 6089 and a2, a0, 255 # a2 <- BB 6090 srl a3, a0, 8 # a3 <- CC 6091 EAS2(rOBJ, rFP, rOBJ) # s5 <- &fp[AA] 6092 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 6093 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 6094#ifdef SOFT_FLOAT 6095 LOAD64(rARG0, rARG1, a2) # a0/a1 <- vBB/vBB+1 6096 LOAD64(rARG2, rARG3, t1) # a2/a3 <- vCC/vCC+1 6097 .if 0 6098 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 6099 beqz t0, common_errDivideByZero 6100 .endif 6101#else 6102 LOAD64_F(fa0, fa0f, a2) 6103 LOAD64_F(fa1, fa1f, t1) 6104 .if 0 6105 li.d ft0, 0 6106 c.eq.d fcc0, fa1, ft0 6107 bc1t fcc0, common_errDivideByZero 6108 .endif 6109#endif 61101: 6111 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 6112 # optional op 6113#ifdef SOFT_FLOAT 6114 JAL(__subdf3) # result <- op, a0-a3 changed 6115 STORE64(rRESULT0, rRESULT1, rOBJ) 6116#else 6117 sub.d fv0, fa0, fa1 6118 STORE64_F(fv0, fv0f, rOBJ) 6119#endif 6120 GET_INST_OPCODE(t0) # extract opcode from rINST 6121 GOTO_OPCODE(t0) # jump to next instruction 6122 /* 14-17 instructions */ 6123 6124 6125 6126/* ------------------------------ */ 6127 .balign 128 6128.L_OP_MUL_DOUBLE: /* 0xad */ 6129/* File: mips/OP_MUL_DOUBLE.S */ 6130/* File: mips/binflopWide.S */ 6131 /* 6132 * Generic 64-bit binary operation. Provide an "instr" line that 6133 * specifies an instruction that performs "result = a0-a1 op a2-a3". 6134 * This could be an MIPS instruction or a function call. 6135 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6136 * vCC (a1). Useful for integer division and modulus. 6137 * 6138 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 6139 * xor-long, add-double, sub-double, mul-double, div-double, 6140 * rem-double 6141 * 6142 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 6143 */ 6144 /* binop vAA, vBB, vCC */ 6145 FETCH(a0, 1) # a0 <- CCBB 6146 GET_OPA(rOBJ) # s5 <- AA 6147 and a2, a0, 255 # a2 <- BB 6148 srl a3, a0, 8 # a3 <- CC 6149 EAS2(rOBJ, rFP, rOBJ) # s5 <- &fp[AA] 6150 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 6151 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 6152#ifdef SOFT_FLOAT 6153 LOAD64(rARG0, rARG1, a2) # a0/a1 <- vBB/vBB+1 6154 LOAD64(rARG2, rARG3, t1) # a2/a3 <- vCC/vCC+1 6155 .if 0 6156 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 6157 beqz t0, common_errDivideByZero 6158 .endif 6159#else 6160 LOAD64_F(fa0, fa0f, a2) 6161 LOAD64_F(fa1, fa1f, t1) 6162 .if 0 6163 li.d ft0, 0 6164 c.eq.d fcc0, fa1, ft0 6165 bc1t fcc0, common_errDivideByZero 6166 .endif 6167#endif 61681: 6169 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 6170 # optional op 6171#ifdef SOFT_FLOAT 6172 JAL(__muldf3) # result <- op, a0-a3 changed 6173 STORE64(rRESULT0, rRESULT1, rOBJ) 6174#else 6175 mul.d fv0, fa0, fa1 6176 STORE64_F(fv0, fv0f, rOBJ) 6177#endif 6178 GET_INST_OPCODE(t0) # extract opcode from rINST 6179 GOTO_OPCODE(t0) # jump to next instruction 6180 /* 14-17 instructions */ 6181 6182 6183 6184/* ------------------------------ */ 6185 .balign 128 6186.L_OP_DIV_DOUBLE: /* 0xae */ 6187/* File: mips/OP_DIV_DOUBLE.S */ 6188/* File: mips/binflopWide.S */ 6189 /* 6190 * Generic 64-bit binary operation. Provide an "instr" line that 6191 * specifies an instruction that performs "result = a0-a1 op a2-a3". 6192 * This could be an MIPS instruction or a function call. 6193 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6194 * vCC (a1). Useful for integer division and modulus. 6195 * 6196 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 6197 * xor-long, add-double, sub-double, mul-double, div-double, 6198 * rem-double 6199 * 6200 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 6201 */ 6202 /* binop vAA, vBB, vCC */ 6203 FETCH(a0, 1) # a0 <- CCBB 6204 GET_OPA(rOBJ) # s5 <- AA 6205 and a2, a0, 255 # a2 <- BB 6206 srl a3, a0, 8 # a3 <- CC 6207 EAS2(rOBJ, rFP, rOBJ) # s5 <- &fp[AA] 6208 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 6209 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 6210#ifdef SOFT_FLOAT 6211 LOAD64(rARG0, rARG1, a2) # a0/a1 <- vBB/vBB+1 6212 LOAD64(rARG2, rARG3, t1) # a2/a3 <- vCC/vCC+1 6213 .if 0 6214 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 6215 beqz t0, common_errDivideByZero 6216 .endif 6217#else 6218 LOAD64_F(fa0, fa0f, a2) 6219 LOAD64_F(fa1, fa1f, t1) 6220 .if 0 6221 li.d ft0, 0 6222 c.eq.d fcc0, fa1, ft0 6223 bc1t fcc0, common_errDivideByZero 6224 .endif 6225#endif 62261: 6227 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 6228 # optional op 6229#ifdef SOFT_FLOAT 6230 JAL(__divdf3) # result <- op, a0-a3 changed 6231 STORE64(rRESULT0, rRESULT1, rOBJ) 6232#else 6233 div.d fv0, fa0, fa1 6234 STORE64_F(fv0, fv0f, rOBJ) 6235#endif 6236 GET_INST_OPCODE(t0) # extract opcode from rINST 6237 GOTO_OPCODE(t0) # jump to next instruction 6238 /* 14-17 instructions */ 6239 6240 6241 6242/* ------------------------------ */ 6243 .balign 128 6244.L_OP_REM_DOUBLE: /* 0xaf */ 6245/* File: mips/OP_REM_DOUBLE.S */ 6246/* File: mips/binflopWide.S */ 6247 /* 6248 * Generic 64-bit binary operation. Provide an "instr" line that 6249 * specifies an instruction that performs "result = a0-a1 op a2-a3". 6250 * This could be an MIPS instruction or a function call. 6251 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6252 * vCC (a1). Useful for integer division and modulus. 6253 * 6254 * for: add-long, sub-long, div-long, rem-long, and-long, or-long, 6255 * xor-long, add-double, sub-double, mul-double, div-double, 6256 * rem-double 6257 * 6258 * IMPORTANT: you may specify "chkzero" or "preinstr" but not both. 6259 */ 6260 /* binop vAA, vBB, vCC */ 6261 FETCH(a0, 1) # a0 <- CCBB 6262 GET_OPA(rOBJ) # s5 <- AA 6263 and a2, a0, 255 # a2 <- BB 6264 srl a3, a0, 8 # a3 <- CC 6265 EAS2(rOBJ, rFP, rOBJ) # s5 <- &fp[AA] 6266 EAS2(a2, rFP, a2) # a2 <- &fp[BB] 6267 EAS2(t1, rFP, a3) # a3 <- &fp[CC] 6268#ifdef SOFT_FLOAT 6269 LOAD64(rARG0, rARG1, a2) # a0/a1 <- vBB/vBB+1 6270 LOAD64(rARG2, rARG3, t1) # a2/a3 <- vCC/vCC+1 6271 .if 0 6272 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 6273 beqz t0, common_errDivideByZero 6274 .endif 6275#else 6276 LOAD64_F(fa0, fa0f, a2) 6277 LOAD64_F(fa1, fa1f, t1) 6278 .if 0 6279 li.d ft0, 0 6280 c.eq.d fcc0, fa1, ft0 6281 bc1t fcc0, common_errDivideByZero 6282 .endif 6283#endif 62841: 6285 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 6286 # optional op 6287#ifdef SOFT_FLOAT 6288 JAL(fmod) # result <- op, a0-a3 changed 6289 STORE64(rRESULT0, rRESULT1, rOBJ) 6290#else 6291 JAL(fmod) 6292 STORE64_F(fv0, fv0f, rOBJ) 6293#endif 6294 GET_INST_OPCODE(t0) # extract opcode from rINST 6295 GOTO_OPCODE(t0) # jump to next instruction 6296 /* 14-17 instructions */ 6297 6298 6299 6300/* ------------------------------ */ 6301 .balign 128 6302.L_OP_ADD_INT_2ADDR: /* 0xb0 */ 6303/* File: mips/OP_ADD_INT_2ADDR.S */ 6304/* File: mips/binop2addr.S */ 6305 /* 6306 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6307 * that specifies an instruction that performs "result = a0 op a1". 6308 * This could be an MIPS instruction or a function call. 6309 * 6310 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6311 * vCC (a1). Useful for integer division and modulus. 6312 * 6313 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6314 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6315 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6316 */ 6317 /* binop/2addr vA, vB */ 6318 GET_OPA4(rOBJ) # rOBJ <- A+ 6319 GET_OPB(a3) # a3 <- B 6320 GET_VREG(a0, rOBJ) # a0 <- vA 6321 GET_VREG(a1, a3) # a1 <- vB 6322 .if 0 6323 # is second operand zero? 6324 beqz a1, common_errDivideByZero 6325 .endif 6326 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6327 6328 # optional op 6329 addu a0, a0, a1 # a0 <- op, a0-a3 changed 6330 GET_INST_OPCODE(t0) # extract opcode from rINST 6331 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6332 /* 10-13 instructions */ 6333 6334 6335 6336/* ------------------------------ */ 6337 .balign 128 6338.L_OP_SUB_INT_2ADDR: /* 0xb1 */ 6339/* File: mips/OP_SUB_INT_2ADDR.S */ 6340/* File: mips/binop2addr.S */ 6341 /* 6342 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6343 * that specifies an instruction that performs "result = a0 op a1". 6344 * This could be an MIPS instruction or a function call. 6345 * 6346 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6347 * vCC (a1). Useful for integer division and modulus. 6348 * 6349 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6350 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6351 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6352 */ 6353 /* binop/2addr vA, vB */ 6354 GET_OPA4(rOBJ) # rOBJ <- A+ 6355 GET_OPB(a3) # a3 <- B 6356 GET_VREG(a0, rOBJ) # a0 <- vA 6357 GET_VREG(a1, a3) # a1 <- vB 6358 .if 0 6359 # is second operand zero? 6360 beqz a1, common_errDivideByZero 6361 .endif 6362 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6363 6364 # optional op 6365 subu a0, a0, a1 # a0 <- op, a0-a3 changed 6366 GET_INST_OPCODE(t0) # extract opcode from rINST 6367 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6368 /* 10-13 instructions */ 6369 6370 6371 6372/* ------------------------------ */ 6373 .balign 128 6374.L_OP_MUL_INT_2ADDR: /* 0xb2 */ 6375/* File: mips/OP_MUL_INT_2ADDR.S */ 6376/* File: mips/binop2addr.S */ 6377 /* 6378 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6379 * that specifies an instruction that performs "result = a0 op a1". 6380 * This could be an MIPS instruction or a function call. 6381 * 6382 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6383 * vCC (a1). Useful for integer division and modulus. 6384 * 6385 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6386 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6387 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6388 */ 6389 /* binop/2addr vA, vB */ 6390 GET_OPA4(rOBJ) # rOBJ <- A+ 6391 GET_OPB(a3) # a3 <- B 6392 GET_VREG(a0, rOBJ) # a0 <- vA 6393 GET_VREG(a1, a3) # a1 <- vB 6394 .if 0 6395 # is second operand zero? 6396 beqz a1, common_errDivideByZero 6397 .endif 6398 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6399 6400 # optional op 6401 mul a0, a0, a1 # a0 <- op, a0-a3 changed 6402 GET_INST_OPCODE(t0) # extract opcode from rINST 6403 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6404 /* 10-13 instructions */ 6405 6406 6407 6408/* ------------------------------ */ 6409 .balign 128 6410.L_OP_DIV_INT_2ADDR: /* 0xb3 */ 6411/* File: mips/OP_DIV_INT_2ADDR.S */ 6412/* File: mips/binop2addr.S */ 6413 /* 6414 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6415 * that specifies an instruction that performs "result = a0 op a1". 6416 * This could be an MIPS instruction or a function call. 6417 * 6418 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6419 * vCC (a1). Useful for integer division and modulus. 6420 * 6421 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6422 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6423 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6424 */ 6425 /* binop/2addr vA, vB */ 6426 GET_OPA4(rOBJ) # rOBJ <- A+ 6427 GET_OPB(a3) # a3 <- B 6428 GET_VREG(a0, rOBJ) # a0 <- vA 6429 GET_VREG(a1, a3) # a1 <- vB 6430 .if 1 6431 # is second operand zero? 6432 beqz a1, common_errDivideByZero 6433 .endif 6434 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6435 6436 # optional op 6437 div zero, a0, a1; mflo a0 # a0 <- op, a0-a3 changed 6438 GET_INST_OPCODE(t0) # extract opcode from rINST 6439 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6440 /* 10-13 instructions */ 6441 6442 6443 6444/* ------------------------------ */ 6445 .balign 128 6446.L_OP_REM_INT_2ADDR: /* 0xb4 */ 6447/* File: mips/OP_REM_INT_2ADDR.S */ 6448/* File: mips/binop2addr.S */ 6449 /* 6450 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6451 * that specifies an instruction that performs "result = a0 op a1". 6452 * This could be an MIPS instruction or a function call. 6453 * 6454 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6455 * vCC (a1). Useful for integer division and modulus. 6456 * 6457 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6458 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6459 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6460 */ 6461 /* binop/2addr vA, vB */ 6462 GET_OPA4(rOBJ) # rOBJ <- A+ 6463 GET_OPB(a3) # a3 <- B 6464 GET_VREG(a0, rOBJ) # a0 <- vA 6465 GET_VREG(a1, a3) # a1 <- vB 6466 .if 1 6467 # is second operand zero? 6468 beqz a1, common_errDivideByZero 6469 .endif 6470 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6471 6472 # optional op 6473 div zero, a0, a1; mfhi a0 # a0 <- op, a0-a3 changed 6474 GET_INST_OPCODE(t0) # extract opcode from rINST 6475 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6476 /* 10-13 instructions */ 6477 6478 6479 6480/* ------------------------------ */ 6481 .balign 128 6482.L_OP_AND_INT_2ADDR: /* 0xb5 */ 6483/* File: mips/OP_AND_INT_2ADDR.S */ 6484/* File: mips/binop2addr.S */ 6485 /* 6486 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6487 * that specifies an instruction that performs "result = a0 op a1". 6488 * This could be an MIPS instruction or a function call. 6489 * 6490 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6491 * vCC (a1). Useful for integer division and modulus. 6492 * 6493 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6494 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6495 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6496 */ 6497 /* binop/2addr vA, vB */ 6498 GET_OPA4(rOBJ) # rOBJ <- A+ 6499 GET_OPB(a3) # a3 <- B 6500 GET_VREG(a0, rOBJ) # a0 <- vA 6501 GET_VREG(a1, a3) # a1 <- vB 6502 .if 0 6503 # is second operand zero? 6504 beqz a1, common_errDivideByZero 6505 .endif 6506 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6507 6508 # optional op 6509 and a0, a0, a1 # a0 <- op, a0-a3 changed 6510 GET_INST_OPCODE(t0) # extract opcode from rINST 6511 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6512 /* 10-13 instructions */ 6513 6514 6515 6516/* ------------------------------ */ 6517 .balign 128 6518.L_OP_OR_INT_2ADDR: /* 0xb6 */ 6519/* File: mips/OP_OR_INT_2ADDR.S */ 6520/* File: mips/binop2addr.S */ 6521 /* 6522 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6523 * that specifies an instruction that performs "result = a0 op a1". 6524 * This could be an MIPS instruction or a function call. 6525 * 6526 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6527 * vCC (a1). Useful for integer division and modulus. 6528 * 6529 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6530 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6531 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6532 */ 6533 /* binop/2addr vA, vB */ 6534 GET_OPA4(rOBJ) # rOBJ <- A+ 6535 GET_OPB(a3) # a3 <- B 6536 GET_VREG(a0, rOBJ) # a0 <- vA 6537 GET_VREG(a1, a3) # a1 <- vB 6538 .if 0 6539 # is second operand zero? 6540 beqz a1, common_errDivideByZero 6541 .endif 6542 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6543 6544 # optional op 6545 or a0, a0, a1 # a0 <- op, a0-a3 changed 6546 GET_INST_OPCODE(t0) # extract opcode from rINST 6547 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6548 /* 10-13 instructions */ 6549 6550 6551 6552/* ------------------------------ */ 6553 .balign 128 6554.L_OP_XOR_INT_2ADDR: /* 0xb7 */ 6555/* File: mips/OP_XOR_INT_2ADDR.S */ 6556/* File: mips/binop2addr.S */ 6557 /* 6558 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6559 * that specifies an instruction that performs "result = a0 op a1". 6560 * This could be an MIPS instruction or a function call. 6561 * 6562 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6563 * vCC (a1). Useful for integer division and modulus. 6564 * 6565 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6566 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6567 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6568 */ 6569 /* binop/2addr vA, vB */ 6570 GET_OPA4(rOBJ) # rOBJ <- A+ 6571 GET_OPB(a3) # a3 <- B 6572 GET_VREG(a0, rOBJ) # a0 <- vA 6573 GET_VREG(a1, a3) # a1 <- vB 6574 .if 0 6575 # is second operand zero? 6576 beqz a1, common_errDivideByZero 6577 .endif 6578 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6579 6580 # optional op 6581 xor a0, a0, a1 # a0 <- op, a0-a3 changed 6582 GET_INST_OPCODE(t0) # extract opcode from rINST 6583 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6584 /* 10-13 instructions */ 6585 6586 6587 6588/* ------------------------------ */ 6589 .balign 128 6590.L_OP_SHL_INT_2ADDR: /* 0xb8 */ 6591/* File: mips/OP_SHL_INT_2ADDR.S */ 6592/* File: mips/binop2addr.S */ 6593 /* 6594 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6595 * that specifies an instruction that performs "result = a0 op a1". 6596 * This could be an MIPS instruction or a function call. 6597 * 6598 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6599 * vCC (a1). Useful for integer division and modulus. 6600 * 6601 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6602 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6603 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6604 */ 6605 /* binop/2addr vA, vB */ 6606 GET_OPA4(rOBJ) # rOBJ <- A+ 6607 GET_OPB(a3) # a3 <- B 6608 GET_VREG(a0, rOBJ) # a0 <- vA 6609 GET_VREG(a1, a3) # a1 <- vB 6610 .if 0 6611 # is second operand zero? 6612 beqz a1, common_errDivideByZero 6613 .endif 6614 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6615 6616 and a1, a1, 31 # optional op 6617 sll a0, a0, a1 # a0 <- op, a0-a3 changed 6618 GET_INST_OPCODE(t0) # extract opcode from rINST 6619 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6620 /* 10-13 instructions */ 6621 6622 6623 6624/* ------------------------------ */ 6625 .balign 128 6626.L_OP_SHR_INT_2ADDR: /* 0xb9 */ 6627/* File: mips/OP_SHR_INT_2ADDR.S */ 6628/* File: mips/binop2addr.S */ 6629 /* 6630 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6631 * that specifies an instruction that performs "result = a0 op a1". 6632 * This could be an MIPS instruction or a function call. 6633 * 6634 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6635 * vCC (a1). Useful for integer division and modulus. 6636 * 6637 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6638 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6639 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6640 */ 6641 /* binop/2addr vA, vB */ 6642 GET_OPA4(rOBJ) # rOBJ <- A+ 6643 GET_OPB(a3) # a3 <- B 6644 GET_VREG(a0, rOBJ) # a0 <- vA 6645 GET_VREG(a1, a3) # a1 <- vB 6646 .if 0 6647 # is second operand zero? 6648 beqz a1, common_errDivideByZero 6649 .endif 6650 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6651 6652 and a1, a1, 31 # optional op 6653 sra a0, a0, a1 # a0 <- op, a0-a3 changed 6654 GET_INST_OPCODE(t0) # extract opcode from rINST 6655 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6656 /* 10-13 instructions */ 6657 6658 6659 6660/* ------------------------------ */ 6661 .balign 128 6662.L_OP_USHR_INT_2ADDR: /* 0xba */ 6663/* File: mips/OP_USHR_INT_2ADDR.S */ 6664/* File: mips/binop2addr.S */ 6665 /* 6666 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line 6667 * that specifies an instruction that performs "result = a0 op a1". 6668 * This could be an MIPS instruction or a function call. 6669 * 6670 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6671 * vCC (a1). Useful for integer division and modulus. 6672 * 6673 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr, 6674 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr, 6675 * shl-int/2addr, shr-int/2addr, ushr-int/2addr 6676 */ 6677 /* binop/2addr vA, vB */ 6678 GET_OPA4(rOBJ) # rOBJ <- A+ 6679 GET_OPB(a3) # a3 <- B 6680 GET_VREG(a0, rOBJ) # a0 <- vA 6681 GET_VREG(a1, a3) # a1 <- vB 6682 .if 0 6683 # is second operand zero? 6684 beqz a1, common_errDivideByZero 6685 .endif 6686 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6687 6688 and a1, a1, 31 # optional op 6689 srl a0, a0, a1 # a0 <- op, a0-a3 changed 6690 GET_INST_OPCODE(t0) # extract opcode from rINST 6691 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 6692 /* 10-13 instructions */ 6693 6694 6695 6696/* ------------------------------ */ 6697 .balign 128 6698.L_OP_ADD_LONG_2ADDR: /* 0xbb */ 6699/* File: mips/OP_ADD_LONG_2ADDR.S */ 6700/* 6701 *See OP_ADD_LONG.S for details 6702 */ 6703/* File: mips/binopWide2addr.S */ 6704 /* 6705 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 6706 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 6707 * This could be a MIPS instruction or a function call. (If the result 6708 * comes back in a register other than a0, you can override "result".) 6709 * 6710 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6711 * vCC (a1). Useful for integer division and modulus. 6712 * 6713 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 6714 * and-long/2addr, or-long/2addr, xor-long/2addr 6715 * rem-double/2addr 6716 */ 6717 /* binop/2addr vA, vB */ 6718 GET_OPA4(rOBJ) # rOBJ <- A+ 6719 GET_OPB(a1) # a1 <- B 6720 EAS2(a1, rFP, a1) # a1 <- &fp[B] 6721 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 6722 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1 6723 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 6724 .if 0 6725 or t0, a2, a3 # second arg (a2-a3) is zero? 6726 beqz t0, common_errDivideByZero 6727 .endif 6728 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6729 6730 addu v0, a2, a0 # optional op 6731 addu a1, a3, a1; sltu v1, v0, a2; addu v1, v1, a1 # result <- op, a0-a3 changed 6732 GET_INST_OPCODE(t0) # extract opcode from rINST 6733 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 6734 GOTO_OPCODE(t0) # jump to next instruction 6735 /* 12-15 instructions */ 6736 6737 6738 6739/* ------------------------------ */ 6740 .balign 128 6741.L_OP_SUB_LONG_2ADDR: /* 0xbc */ 6742/* File: mips/OP_SUB_LONG_2ADDR.S */ 6743/* 6744 * See comments in OP_SUB_LONG.S 6745 */ 6746/* File: mips/binopWide2addr.S */ 6747 /* 6748 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 6749 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 6750 * This could be a MIPS instruction or a function call. (If the result 6751 * comes back in a register other than a0, you can override "result".) 6752 * 6753 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6754 * vCC (a1). Useful for integer division and modulus. 6755 * 6756 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 6757 * and-long/2addr, or-long/2addr, xor-long/2addr 6758 * rem-double/2addr 6759 */ 6760 /* binop/2addr vA, vB */ 6761 GET_OPA4(rOBJ) # rOBJ <- A+ 6762 GET_OPB(a1) # a1 <- B 6763 EAS2(a1, rFP, a1) # a1 <- &fp[B] 6764 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 6765 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1 6766 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 6767 .if 0 6768 or t0, a2, a3 # second arg (a2-a3) is zero? 6769 beqz t0, common_errDivideByZero 6770 .endif 6771 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6772 6773 subu v0, a0, a2 # optional op 6774 subu v1, a1, a3; sltu a0, a0, v0; subu v1, v1, a0 # result <- op, a0-a3 changed 6775 GET_INST_OPCODE(t0) # extract opcode from rINST 6776 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 6777 GOTO_OPCODE(t0) # jump to next instruction 6778 /* 12-15 instructions */ 6779 6780 6781 6782/* ------------------------------ */ 6783 .balign 128 6784.L_OP_MUL_LONG_2ADDR: /* 0xbd */ 6785/* File: mips/OP_MUL_LONG_2ADDR.S */ 6786 /* 6787 * See comments in OP_MUL_LONG.S 6788 */ 6789 /* mul-long/2addr vA, vB */ 6790 GET_OPA4(t0) # t0 <- A+ 6791 6792 EAS2(t0, rFP, t0) # t0 <- &fp[A] 6793 LOAD64(a0, a1, t0) # vAA.low / high 6794 6795 GET_OPB(t1) # t1 <- B 6796 EAS2(t1, rFP, t1) # t1 <- &fp[B] 6797 LOAD64(a2, a3, t1) # vBB.low / high 6798 6799 mul v1, a3, a0 # v1= a3a0 6800 multu a2, a0 6801 mfhi t1 6802 mflo v0 # v0= a2a0 6803 mul t2, a2, a1 # t2= a2a1 6804 addu v1, v1, t1 # v1= a3a0 + hi(a2a0) 6805 addu v1, v1, t2 # v1= v1 + a2a1; 6806 6807 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6808 GET_INST_OPCODE(t1) # extract opcode from rINST 6809 # vAA <- v0 (low) 6810 STORE64(v0, v1, t0) # vAA+1 <- v1 (high) 6811 GOTO_OPCODE(t1) # jump to next instruction 6812 6813 6814/* ------------------------------ */ 6815 .balign 128 6816.L_OP_DIV_LONG_2ADDR: /* 0xbe */ 6817/* File: mips/OP_DIV_LONG_2ADDR.S */ 6818#ifdef HAVE_LITTLE_ENDIAN 6819/* File: mips/binopWide2addr.S */ 6820 /* 6821 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 6822 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 6823 * This could be a MIPS instruction or a function call. (If the result 6824 * comes back in a register other than a0, you can override "result".) 6825 * 6826 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6827 * vCC (a1). Useful for integer division and modulus. 6828 * 6829 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 6830 * and-long/2addr, or-long/2addr, xor-long/2addr 6831 * rem-double/2addr 6832 */ 6833 /* binop/2addr vA, vB */ 6834 GET_OPA4(rOBJ) # rOBJ <- A+ 6835 GET_OPB(a1) # a1 <- B 6836 EAS2(a1, rFP, a1) # a1 <- &fp[B] 6837 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 6838 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1 6839 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 6840 .if 1 6841 or t0, a2, a3 # second arg (a2-a3) is zero? 6842 beqz t0, common_errDivideByZero 6843 .endif 6844 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6845 6846 # optional op 6847 JAL(__divdi3) # result <- op, a0-a3 changed 6848 GET_INST_OPCODE(t0) # extract opcode from rINST 6849 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 6850 GOTO_OPCODE(t0) # jump to next instruction 6851 /* 12-15 instructions */ 6852 6853 6854#else 6855/* File: mips/binopWide2addr.S */ 6856 /* 6857 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 6858 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 6859 * This could be a MIPS instruction or a function call. (If the result 6860 * comes back in a register other than a0, you can override "result".) 6861 * 6862 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6863 * vCC (a1). Useful for integer division and modulus. 6864 * 6865 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 6866 * and-long/2addr, or-long/2addr, xor-long/2addr 6867 * rem-double/2addr 6868 */ 6869 /* binop/2addr vA, vB */ 6870 GET_OPA4(rOBJ) # rOBJ <- A+ 6871 GET_OPB(a1) # a1 <- B 6872 EAS2(a1, rFP, a1) # a1 <- &fp[B] 6873 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 6874 LOAD64(a3, a2, a1) # a2/a3 <- vBB/vBB+1 6875 LOAD64(a1, a0, rOBJ) # a0/a1 <- vAA/vAA+1 6876 .if 1 6877 or t0, a3, a2 # second arg (a2-a3) is zero? 6878 beqz t0, common_errDivideByZero 6879 .endif 6880 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6881 6882 # optional op 6883 JAL(__divdi3) # result <- op, a0-a3 changed 6884 GET_INST_OPCODE(t0) # extract opcode from rINST 6885 STORE64(v1, v0, rOBJ) # vAA/vAA+1 <- v1/v0 6886 GOTO_OPCODE(t0) # jump to next instruction 6887 /* 12-15 instructions */ 6888 6889 6890#endif 6891 6892/* ------------------------------ */ 6893 .balign 128 6894.L_OP_REM_LONG_2ADDR: /* 0xbf */ 6895/* File: mips/OP_REM_LONG_2ADDR.S */ 6896#ifdef HAVE_LITTLE_ENDIAN 6897/* File: mips/binopWide2addr.S */ 6898 /* 6899 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 6900 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 6901 * This could be a MIPS instruction or a function call. (If the result 6902 * comes back in a register other than a0, you can override "result".) 6903 * 6904 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6905 * vCC (a1). Useful for integer division and modulus. 6906 * 6907 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 6908 * and-long/2addr, or-long/2addr, xor-long/2addr 6909 * rem-double/2addr 6910 */ 6911 /* binop/2addr vA, vB */ 6912 GET_OPA4(rOBJ) # rOBJ <- A+ 6913 GET_OPB(a1) # a1 <- B 6914 EAS2(a1, rFP, a1) # a1 <- &fp[B] 6915 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 6916 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1 6917 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 6918 .if 1 6919 or t0, a2, a3 # second arg (a2-a3) is zero? 6920 beqz t0, common_errDivideByZero 6921 .endif 6922 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6923 6924 # optional op 6925 JAL(__moddi3) # result <- op, a0-a3 changed 6926 GET_INST_OPCODE(t0) # extract opcode from rINST 6927 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- v0/v1 6928 GOTO_OPCODE(t0) # jump to next instruction 6929 /* 12-15 instructions */ 6930 6931 6932#else 6933/* File: mips/binopWide2addr.S */ 6934 /* 6935 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 6936 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 6937 * This could be a MIPS instruction or a function call. (If the result 6938 * comes back in a register other than a0, you can override "result".) 6939 * 6940 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6941 * vCC (a1). Useful for integer division and modulus. 6942 * 6943 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 6944 * and-long/2addr, or-long/2addr, xor-long/2addr 6945 * rem-double/2addr 6946 */ 6947 /* binop/2addr vA, vB */ 6948 GET_OPA4(rOBJ) # rOBJ <- A+ 6949 GET_OPB(a1) # a1 <- B 6950 EAS2(a1, rFP, a1) # a1 <- &fp[B] 6951 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 6952 LOAD64(a3, a2, a1) # a2/a3 <- vBB/vBB+1 6953 LOAD64(a1, a0, rOBJ) # a0/a1 <- vAA/vAA+1 6954 .if 1 6955 or t0, a3, a2 # second arg (a2-a3) is zero? 6956 beqz t0, common_errDivideByZero 6957 .endif 6958 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 6959 6960 # optional op 6961 JAL(__moddi3) # result <- op, a0-a3 changed 6962 GET_INST_OPCODE(t0) # extract opcode from rINST 6963 STORE64(v1, v0, rOBJ) # vAA/vAA+1 <- v1/v0 6964 GOTO_OPCODE(t0) # jump to next instruction 6965 /* 12-15 instructions */ 6966 6967 6968#endif 6969 6970/* ------------------------------ */ 6971 .balign 128 6972.L_OP_AND_LONG_2ADDR: /* 0xc0 */ 6973/* File: mips/OP_AND_LONG_2ADDR.S */ 6974/* File: mips/binopWide2addr.S */ 6975 /* 6976 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 6977 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 6978 * This could be a MIPS instruction or a function call. (If the result 6979 * comes back in a register other than a0, you can override "result".) 6980 * 6981 * If "chkzero" is set to 1, we perform a divide-by-zero check on 6982 * vCC (a1). Useful for integer division and modulus. 6983 * 6984 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 6985 * and-long/2addr, or-long/2addr, xor-long/2addr 6986 * rem-double/2addr 6987 */ 6988 /* binop/2addr vA, vB */ 6989 GET_OPA4(rOBJ) # rOBJ <- A+ 6990 GET_OPB(a1) # a1 <- B 6991 EAS2(a1, rFP, a1) # a1 <- &fp[B] 6992 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 6993 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1 6994 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 6995 .if 0 6996 or t0, a2, a3 # second arg (a2-a3) is zero? 6997 beqz t0, common_errDivideByZero 6998 .endif 6999 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7000 7001 and a0, a0, a2 # optional op 7002 and a1, a1, a3 # result <- op, a0-a3 changed 7003 GET_INST_OPCODE(t0) # extract opcode from rINST 7004 STORE64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1 7005 GOTO_OPCODE(t0) # jump to next instruction 7006 /* 12-15 instructions */ 7007 7008 7009 7010/* ------------------------------ */ 7011 .balign 128 7012.L_OP_OR_LONG_2ADDR: /* 0xc1 */ 7013/* File: mips/OP_OR_LONG_2ADDR.S */ 7014/* File: mips/binopWide2addr.S */ 7015 /* 7016 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 7017 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 7018 * This could be a MIPS instruction or a function call. (If the result 7019 * comes back in a register other than a0, you can override "result".) 7020 * 7021 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7022 * vCC (a1). Useful for integer division and modulus. 7023 * 7024 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 7025 * and-long/2addr, or-long/2addr, xor-long/2addr 7026 * rem-double/2addr 7027 */ 7028 /* binop/2addr vA, vB */ 7029 GET_OPA4(rOBJ) # rOBJ <- A+ 7030 GET_OPB(a1) # a1 <- B 7031 EAS2(a1, rFP, a1) # a1 <- &fp[B] 7032 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 7033 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1 7034 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 7035 .if 0 7036 or t0, a2, a3 # second arg (a2-a3) is zero? 7037 beqz t0, common_errDivideByZero 7038 .endif 7039 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7040 7041 or a0, a0, a2 # optional op 7042 or a1, a1, a3 # result <- op, a0-a3 changed 7043 GET_INST_OPCODE(t0) # extract opcode from rINST 7044 STORE64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1 7045 GOTO_OPCODE(t0) # jump to next instruction 7046 /* 12-15 instructions */ 7047 7048 7049 7050/* ------------------------------ */ 7051 .balign 128 7052.L_OP_XOR_LONG_2ADDR: /* 0xc2 */ 7053/* File: mips/OP_XOR_LONG_2ADDR.S */ 7054/* File: mips/binopWide2addr.S */ 7055 /* 7056 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 7057 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 7058 * This could be a MIPS instruction or a function call. (If the result 7059 * comes back in a register other than a0, you can override "result".) 7060 * 7061 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7062 * vCC (a1). Useful for integer division and modulus. 7063 * 7064 * For: add-long/2addr, sub-long/2addr, div-long/2addr, rem-long/2addr, 7065 * and-long/2addr, or-long/2addr, xor-long/2addr 7066 * rem-double/2addr 7067 */ 7068 /* binop/2addr vA, vB */ 7069 GET_OPA4(rOBJ) # rOBJ <- A+ 7070 GET_OPB(a1) # a1 <- B 7071 EAS2(a1, rFP, a1) # a1 <- &fp[B] 7072 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 7073 LOAD64(a2, a3, a1) # a2/a3 <- vBB/vBB+1 7074 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 7075 .if 0 7076 or t0, a2, a3 # second arg (a2-a3) is zero? 7077 beqz t0, common_errDivideByZero 7078 .endif 7079 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7080 7081 xor a0, a0, a2 # optional op 7082 xor a1, a1, a3 # result <- op, a0-a3 changed 7083 GET_INST_OPCODE(t0) # extract opcode from rINST 7084 STORE64(a0, a1, rOBJ) # vAA/vAA+1 <- a0/a1 7085 GOTO_OPCODE(t0) # jump to next instruction 7086 /* 12-15 instructions */ 7087 7088 7089 7090/* ------------------------------ */ 7091 .balign 128 7092.L_OP_SHL_LONG_2ADDR: /* 0xc3 */ 7093/* File: mips/OP_SHL_LONG_2ADDR.S */ 7094 /* 7095 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is 7096 * 32-bit shift distance. 7097 */ 7098 /* shl-long/2addr vA, vB */ 7099 GET_OPA4(t2) # t2 <- A+ 7100 GET_OPB(a3) # a3 <- B 7101 GET_VREG(a2, a3) # a2 <- vB 7102 EAS2(rOBJ, rFP, t2) # rOBJ <- &fp[A] 7103 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 7104 7105 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7106 7107 sll v0, a0, a2 # rlo<- alo << (shift&31) 7108 not v1, a2 # rhi<- 31-shift (shift is 5b) 7109 srl a0, 1 7110 srl a0, v1 # alo<- alo >> (32-(shift&31)) 7111 sll v1, a1, a2 # rhi<- ahi << (shift&31) 7112 or v1, a0 # rhi<- rhi | alo 7113 andi a2, 0x20 # shift< shift & 0x20 7114 movn v1, v0, a2 # rhi<- rlo (if shift&0x20) 7115 movn v0, zero, a2 # rlo<- 0 (if shift&0x20) 7116 7117 GET_INST_OPCODE(t0) # extract opcode from rINST 7118 STORE64(v0, v1, rOBJ) # vAA/vAA+1 <- a0/a1 7119 GOTO_OPCODE(t0) # jump to next instruction 7120 7121 7122/* ------------------------------ */ 7123 .balign 128 7124.L_OP_SHR_LONG_2ADDR: /* 0xc4 */ 7125/* File: mips/OP_SHR_LONG_2ADDR.S */ 7126 /* 7127 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is 7128 * 32-bit shift distance. 7129 */ 7130 /* shr-long/2addr vA, vB */ 7131 GET_OPA4(t2) # t2 <- A+ 7132 GET_OPB(a3) # a3 <- B 7133 GET_VREG(a2, a3) # a2 <- vB 7134 EAS2(t2, rFP, t2) # t2 <- &fp[A] 7135 LOAD64(a0, a1, t2) # a0/a1 <- vAA/vAA+1 7136 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7137 7138 sra v1, a1, a2 # rhi<- ahi >> (shift&31) 7139 srl v0, a0, a2 # rlo<- alo >> (shift&31) 7140 sra a3, a1, 31 # a3<- sign(ah) 7141 not a0, a2 # alo<- 31-shift (shift is 5b) 7142 sll a1, 1 7143 sll a1, a0 # ahi<- ahi << (32-(shift&31)) 7144 or v0, a1 # rlo<- rlo | ahi 7145 andi a2, 0x20 # shift & 0x20 7146 movn v0, v1, a2 # rlo<- rhi (if shift&0x20) 7147 movn v1, a3, a2 # rhi<- sign(ahi) (if shift&0x20) 7148 7149 GET_INST_OPCODE(t0) # extract opcode from rINST 7150 STORE64(v0, v1, t2) # vAA/vAA+1 <- a0/a1 7151 GOTO_OPCODE(t0) # jump to next instruction 7152 7153 7154/* ------------------------------ */ 7155 .balign 128 7156.L_OP_USHR_LONG_2ADDR: /* 0xc5 */ 7157/* File: mips/OP_USHR_LONG_2ADDR.S */ 7158 /* 7159 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is 7160 * 32-bit shift distance. 7161 */ 7162 /* ushr-long/2addr vA, vB */ 7163 GET_OPA4(t3) # t3 <- A+ 7164 GET_OPB(a3) # a3 <- B 7165 GET_VREG(a2, a3) # a2 <- vB 7166 EAS2(t3, rFP, t3) # t3 <- &fp[A] 7167 LOAD64(a0, a1, t3) # a0/a1 <- vAA/vAA+1 7168 7169 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7170 srl v1, a1, a2 # rhi<- ahi >> (shift&31) 7171 srl v0, a0, a2 # rlo<- alo >> (shift&31) 7172 not a0, a2 # alo<- 31-n (shift is 5b) 7173 sll a1, 1 7174 sll a1, a0 # ahi<- ahi << (32-(shift&31)) 7175 or v0, a1 # rlo<- rlo | ahi 7176 andi a2, 0x20 # shift & 0x20 7177 movn v0, v1, a2 # rlo<- rhi (if shift&0x20) 7178 movn v1, zero, a2 # rhi<- 0 (if shift&0x20) 7179 7180 GET_INST_OPCODE(t0) # extract opcode from rINST 7181 STORE64(v0, v1, t3) # vAA/vAA+1 <- a0/a1 7182 GOTO_OPCODE(t0) # jump to next instruction 7183 7184 7185/* ------------------------------ */ 7186 .balign 128 7187.L_OP_ADD_FLOAT_2ADDR: /* 0xc6 */ 7188/* File: mips/OP_ADD_FLOAT_2ADDR.S */ 7189/* File: mips/binflop2addr.S */ 7190 /* 7191 * Generic 32-bit "/2addr" binary operation. Provide an "instr" and 7192 * "instr_f" line 7193 * that specifies an instruction that performs "result = a0 op a1". 7194 * This could be an MIPS instruction or a function call. 7195 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7196 * vCC (a1). Useful for integer division and modulus. 7197 * 7198 * For: add-float/2addr, sub-float/2addr, mul-float/2addr, 7199 * div-float/2addr, rem-float/2addr 7200 */ 7201 /* binop/2addr vA, vB */ 7202 GET_OPA4(rOBJ) # t1 <- A+ 7203 GET_OPB(a3) # a3 <- B 7204#ifdef SOFT_FLOAT 7205 GET_VREG(a0, rOBJ) # a0 <- vA 7206 GET_VREG(a1, a3) # a1 <- vB 7207 .if 0 7208 # is second operand zero? 7209 beqz a1, common_errDivideByZero 7210 .endif 7211#else 7212 GET_VREG_F(fa0, rOBJ) 7213 GET_VREG_F(fa1, a3) 7214 .if 0 7215 # is second operand zero? 7216 li.s ft0, 0 7217 c.eq.s fcc0, ft0, fa1 7218 bc1t fcc0, common_errDivideByZero 7219 .endif 7220#endif 7221 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7222 # optional op 7223#ifdef SOFT_FLOAT 7224 JAL(__addsf3) # result <- op, a0-a3 changed 7225 SET_VREG(v0, rOBJ) # vAA <- result 7226#else 7227 add.s fv0, fa0, fa1 7228 SET_VREG_F(fv0, rOBJ) # vAA <- result 7229#endif 7230 GET_INST_OPCODE(t0) # extract opcode from rINST 7231 GOTO_OPCODE(t0) # jump to next instruction 7232 /* 10-13 instructions */ 7233 7234 7235 7236/* ------------------------------ */ 7237 .balign 128 7238.L_OP_SUB_FLOAT_2ADDR: /* 0xc7 */ 7239/* File: mips/OP_SUB_FLOAT_2ADDR.S */ 7240/* File: mips/binflop2addr.S */ 7241 /* 7242 * Generic 32-bit "/2addr" binary operation. Provide an "instr" and 7243 * "instr_f" line 7244 * that specifies an instruction that performs "result = a0 op a1". 7245 * This could be an MIPS instruction or a function call. 7246 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7247 * vCC (a1). Useful for integer division and modulus. 7248 * 7249 * For: add-float/2addr, sub-float/2addr, mul-float/2addr, 7250 * div-float/2addr, rem-float/2addr 7251 */ 7252 /* binop/2addr vA, vB */ 7253 GET_OPA4(rOBJ) # t1 <- A+ 7254 GET_OPB(a3) # a3 <- B 7255#ifdef SOFT_FLOAT 7256 GET_VREG(a0, rOBJ) # a0 <- vA 7257 GET_VREG(a1, a3) # a1 <- vB 7258 .if 0 7259 # is second operand zero? 7260 beqz a1, common_errDivideByZero 7261 .endif 7262#else 7263 GET_VREG_F(fa0, rOBJ) 7264 GET_VREG_F(fa1, a3) 7265 .if 0 7266 # is second operand zero? 7267 li.s ft0, 0 7268 c.eq.s fcc0, ft0, fa1 7269 bc1t fcc0, common_errDivideByZero 7270 .endif 7271#endif 7272 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7273 # optional op 7274#ifdef SOFT_FLOAT 7275 JAL(__subsf3) # result <- op, a0-a3 changed 7276 SET_VREG(v0, rOBJ) # vAA <- result 7277#else 7278 sub.s fv0, fa0, fa1 7279 SET_VREG_F(fv0, rOBJ) # vAA <- result 7280#endif 7281 GET_INST_OPCODE(t0) # extract opcode from rINST 7282 GOTO_OPCODE(t0) # jump to next instruction 7283 /* 10-13 instructions */ 7284 7285 7286 7287/* ------------------------------ */ 7288 .balign 128 7289.L_OP_MUL_FLOAT_2ADDR: /* 0xc8 */ 7290/* File: mips/OP_MUL_FLOAT_2ADDR.S */ 7291/* File: mips/binflop2addr.S */ 7292 /* 7293 * Generic 32-bit "/2addr" binary operation. Provide an "instr" and 7294 * "instr_f" line 7295 * that specifies an instruction that performs "result = a0 op a1". 7296 * This could be an MIPS instruction or a function call. 7297 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7298 * vCC (a1). Useful for integer division and modulus. 7299 * 7300 * For: add-float/2addr, sub-float/2addr, mul-float/2addr, 7301 * div-float/2addr, rem-float/2addr 7302 */ 7303 /* binop/2addr vA, vB */ 7304 GET_OPA4(rOBJ) # t1 <- A+ 7305 GET_OPB(a3) # a3 <- B 7306#ifdef SOFT_FLOAT 7307 GET_VREG(a0, rOBJ) # a0 <- vA 7308 GET_VREG(a1, a3) # a1 <- vB 7309 .if 0 7310 # is second operand zero? 7311 beqz a1, common_errDivideByZero 7312 .endif 7313#else 7314 GET_VREG_F(fa0, rOBJ) 7315 GET_VREG_F(fa1, a3) 7316 .if 0 7317 # is second operand zero? 7318 li.s ft0, 0 7319 c.eq.s fcc0, ft0, fa1 7320 bc1t fcc0, common_errDivideByZero 7321 .endif 7322#endif 7323 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7324 # optional op 7325#ifdef SOFT_FLOAT 7326 JAL(__mulsf3) # result <- op, a0-a3 changed 7327 SET_VREG(v0, rOBJ) # vAA <- result 7328#else 7329 mul.s fv0, fa0, fa1 7330 SET_VREG_F(fv0, rOBJ) # vAA <- result 7331#endif 7332 GET_INST_OPCODE(t0) # extract opcode from rINST 7333 GOTO_OPCODE(t0) # jump to next instruction 7334 /* 10-13 instructions */ 7335 7336 7337 7338/* ------------------------------ */ 7339 .balign 128 7340.L_OP_DIV_FLOAT_2ADDR: /* 0xc9 */ 7341/* File: mips/OP_DIV_FLOAT_2ADDR.S */ 7342/* File: mips/binflop2addr.S */ 7343 /* 7344 * Generic 32-bit "/2addr" binary operation. Provide an "instr" and 7345 * "instr_f" line 7346 * that specifies an instruction that performs "result = a0 op a1". 7347 * This could be an MIPS instruction or a function call. 7348 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7349 * vCC (a1). Useful for integer division and modulus. 7350 * 7351 * For: add-float/2addr, sub-float/2addr, mul-float/2addr, 7352 * div-float/2addr, rem-float/2addr 7353 */ 7354 /* binop/2addr vA, vB */ 7355 GET_OPA4(rOBJ) # t1 <- A+ 7356 GET_OPB(a3) # a3 <- B 7357#ifdef SOFT_FLOAT 7358 GET_VREG(a0, rOBJ) # a0 <- vA 7359 GET_VREG(a1, a3) # a1 <- vB 7360 .if 0 7361 # is second operand zero? 7362 beqz a1, common_errDivideByZero 7363 .endif 7364#else 7365 GET_VREG_F(fa0, rOBJ) 7366 GET_VREG_F(fa1, a3) 7367 .if 0 7368 # is second operand zero? 7369 li.s ft0, 0 7370 c.eq.s fcc0, ft0, fa1 7371 bc1t fcc0, common_errDivideByZero 7372 .endif 7373#endif 7374 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7375 # optional op 7376#ifdef SOFT_FLOAT 7377 JAL(__divsf3) # result <- op, a0-a3 changed 7378 SET_VREG(v0, rOBJ) # vAA <- result 7379#else 7380 div.s fv0, fa0, fa1 7381 SET_VREG_F(fv0, rOBJ) # vAA <- result 7382#endif 7383 GET_INST_OPCODE(t0) # extract opcode from rINST 7384 GOTO_OPCODE(t0) # jump to next instruction 7385 /* 10-13 instructions */ 7386 7387 7388 7389/* ------------------------------ */ 7390 .balign 128 7391.L_OP_REM_FLOAT_2ADDR: /* 0xca */ 7392/* File: mips/OP_REM_FLOAT_2ADDR.S */ 7393/* File: mips/binflop2addr.S */ 7394 /* 7395 * Generic 32-bit "/2addr" binary operation. Provide an "instr" and 7396 * "instr_f" line 7397 * that specifies an instruction that performs "result = a0 op a1". 7398 * This could be an MIPS instruction or a function call. 7399 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7400 * vCC (a1). Useful for integer division and modulus. 7401 * 7402 * For: add-float/2addr, sub-float/2addr, mul-float/2addr, 7403 * div-float/2addr, rem-float/2addr 7404 */ 7405 /* binop/2addr vA, vB */ 7406 GET_OPA4(rOBJ) # t1 <- A+ 7407 GET_OPB(a3) # a3 <- B 7408#ifdef SOFT_FLOAT 7409 GET_VREG(a0, rOBJ) # a0 <- vA 7410 GET_VREG(a1, a3) # a1 <- vB 7411 .if 0 7412 # is second operand zero? 7413 beqz a1, common_errDivideByZero 7414 .endif 7415#else 7416 GET_VREG_F(fa0, rOBJ) 7417 GET_VREG_F(fa1, a3) 7418 .if 0 7419 # is second operand zero? 7420 li.s ft0, 0 7421 c.eq.s fcc0, ft0, fa1 7422 bc1t fcc0, common_errDivideByZero 7423 .endif 7424#endif 7425 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7426 # optional op 7427#ifdef SOFT_FLOAT 7428 JAL(fmodf) # result <- op, a0-a3 changed 7429 SET_VREG(v0, rOBJ) # vAA <- result 7430#else 7431 JAL(fmodf) 7432 SET_VREG_F(fv0, rOBJ) # vAA <- result 7433#endif 7434 GET_INST_OPCODE(t0) # extract opcode from rINST 7435 GOTO_OPCODE(t0) # jump to next instruction 7436 /* 10-13 instructions */ 7437 7438 7439 7440/* ------------------------------ */ 7441 .balign 128 7442.L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */ 7443/* File: mips/OP_ADD_DOUBLE_2ADDR.S */ 7444/* File: mips/binflopWide2addr.S */ 7445 /* 7446 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 7447 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 7448 * This could be an MIPS instruction or a function call. 7449 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7450 * vCC (a1). Useful for integer division and modulus. 7451 * 7452 * For: add-double/2addr, sub-double/2addr, mul-double/2addr, 7453 * div-double/2addr, rem-double/2addr 7454 */ 7455 /* binop/2addr vA, vB */ 7456 GET_OPA4(rOBJ) # rOBJ <- A+ 7457 GET_OPB(a1) # a1 <- B 7458 EAS2(a1, rFP, a1) # a1 <- &fp[B] 7459 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 7460#ifdef SOFT_FLOAT 7461 LOAD64(rARG2, rARG3, a1) # a2/a3 <- vBB/vBB+1 7462 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vAA/vAA+1 7463 .if 0 7464 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 7465 beqz t0, common_errDivideByZero 7466 .endif 7467#else 7468 LOAD64_F(fa0, fa0f, rOBJ) 7469 LOAD64_F(fa1, fa1f, a1) 7470 .if 0 7471 li.d ft0, 0 7472 c.eq.d fcc0, fa1, ft0 7473 bc1t fcc0, common_errDivideByZero 7474 .endif 7475#endif 74761: 7477 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7478 # optional op 7479#ifdef SOFT_FLOAT 7480 JAL(__adddf3) # result <- op, a0-a3 changed 7481 STORE64(rRESULT0, rRESULT1, rOBJ) 7482#else 7483 add.d fv0, fa0, fa1 7484 STORE64_F(fv0, fv0f, rOBJ) 7485#endif 7486 GET_INST_OPCODE(t0) # extract opcode from rINST 7487 GOTO_OPCODE(t0) # jump to next instruction 7488 /* 12-15 instructions */ 7489 7490 7491 7492/* ------------------------------ */ 7493 .balign 128 7494.L_OP_SUB_DOUBLE_2ADDR: /* 0xcc */ 7495/* File: mips/OP_SUB_DOUBLE_2ADDR.S */ 7496/* File: mips/binflopWide2addr.S */ 7497 /* 7498 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 7499 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 7500 * This could be an MIPS instruction or a function call. 7501 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7502 * vCC (a1). Useful for integer division and modulus. 7503 * 7504 * For: add-double/2addr, sub-double/2addr, mul-double/2addr, 7505 * div-double/2addr, rem-double/2addr 7506 */ 7507 /* binop/2addr vA, vB */ 7508 GET_OPA4(rOBJ) # rOBJ <- A+ 7509 GET_OPB(a1) # a1 <- B 7510 EAS2(a1, rFP, a1) # a1 <- &fp[B] 7511 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 7512#ifdef SOFT_FLOAT 7513 LOAD64(rARG2, rARG3, a1) # a2/a3 <- vBB/vBB+1 7514 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vAA/vAA+1 7515 .if 0 7516 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 7517 beqz t0, common_errDivideByZero 7518 .endif 7519#else 7520 LOAD64_F(fa0, fa0f, rOBJ) 7521 LOAD64_F(fa1, fa1f, a1) 7522 .if 0 7523 li.d ft0, 0 7524 c.eq.d fcc0, fa1, ft0 7525 bc1t fcc0, common_errDivideByZero 7526 .endif 7527#endif 75281: 7529 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7530 # optional op 7531#ifdef SOFT_FLOAT 7532 JAL(__subdf3) # result <- op, a0-a3 changed 7533 STORE64(rRESULT0, rRESULT1, rOBJ) 7534#else 7535 sub.d fv0, fa0, fa1 7536 STORE64_F(fv0, fv0f, rOBJ) 7537#endif 7538 GET_INST_OPCODE(t0) # extract opcode from rINST 7539 GOTO_OPCODE(t0) # jump to next instruction 7540 /* 12-15 instructions */ 7541 7542 7543 7544/* ------------------------------ */ 7545 .balign 128 7546.L_OP_MUL_DOUBLE_2ADDR: /* 0xcd */ 7547/* File: mips/OP_MUL_DOUBLE_2ADDR.S */ 7548/* File: mips/binflopWide2addr.S */ 7549 /* 7550 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 7551 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 7552 * This could be an MIPS instruction or a function call. 7553 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7554 * vCC (a1). Useful for integer division and modulus. 7555 * 7556 * For: add-double/2addr, sub-double/2addr, mul-double/2addr, 7557 * div-double/2addr, rem-double/2addr 7558 */ 7559 /* binop/2addr vA, vB */ 7560 GET_OPA4(rOBJ) # rOBJ <- A+ 7561 GET_OPB(a1) # a1 <- B 7562 EAS2(a1, rFP, a1) # a1 <- &fp[B] 7563 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 7564#ifdef SOFT_FLOAT 7565 LOAD64(rARG2, rARG3, a1) # a2/a3 <- vBB/vBB+1 7566 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vAA/vAA+1 7567 .if 0 7568 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 7569 beqz t0, common_errDivideByZero 7570 .endif 7571#else 7572 LOAD64_F(fa0, fa0f, rOBJ) 7573 LOAD64_F(fa1, fa1f, a1) 7574 .if 0 7575 li.d ft0, 0 7576 c.eq.d fcc0, fa1, ft0 7577 bc1t fcc0, common_errDivideByZero 7578 .endif 7579#endif 75801: 7581 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7582 # optional op 7583#ifdef SOFT_FLOAT 7584 JAL(__muldf3) # result <- op, a0-a3 changed 7585 STORE64(rRESULT0, rRESULT1, rOBJ) 7586#else 7587 mul.d fv0, fa0, fa1 7588 STORE64_F(fv0, fv0f, rOBJ) 7589#endif 7590 GET_INST_OPCODE(t0) # extract opcode from rINST 7591 GOTO_OPCODE(t0) # jump to next instruction 7592 /* 12-15 instructions */ 7593 7594 7595 7596/* ------------------------------ */ 7597 .balign 128 7598.L_OP_DIV_DOUBLE_2ADDR: /* 0xce */ 7599/* File: mips/OP_DIV_DOUBLE_2ADDR.S */ 7600/* File: mips/binflopWide2addr.S */ 7601 /* 7602 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 7603 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 7604 * This could be an MIPS instruction or a function call. 7605 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7606 * vCC (a1). Useful for integer division and modulus. 7607 * 7608 * For: add-double/2addr, sub-double/2addr, mul-double/2addr, 7609 * div-double/2addr, rem-double/2addr 7610 */ 7611 /* binop/2addr vA, vB */ 7612 GET_OPA4(rOBJ) # rOBJ <- A+ 7613 GET_OPB(a1) # a1 <- B 7614 EAS2(a1, rFP, a1) # a1 <- &fp[B] 7615 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 7616#ifdef SOFT_FLOAT 7617 LOAD64(rARG2, rARG3, a1) # a2/a3 <- vBB/vBB+1 7618 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vAA/vAA+1 7619 .if 0 7620 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 7621 beqz t0, common_errDivideByZero 7622 .endif 7623#else 7624 LOAD64_F(fa0, fa0f, rOBJ) 7625 LOAD64_F(fa1, fa1f, a1) 7626 .if 0 7627 li.d ft0, 0 7628 c.eq.d fcc0, fa1, ft0 7629 bc1t fcc0, common_errDivideByZero 7630 .endif 7631#endif 76321: 7633 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7634 # optional op 7635#ifdef SOFT_FLOAT 7636 JAL(__divdf3) # result <- op, a0-a3 changed 7637 STORE64(rRESULT0, rRESULT1, rOBJ) 7638#else 7639 div.d fv0, fa0, fa1 7640 STORE64_F(fv0, fv0f, rOBJ) 7641#endif 7642 GET_INST_OPCODE(t0) # extract opcode from rINST 7643 GOTO_OPCODE(t0) # jump to next instruction 7644 /* 12-15 instructions */ 7645 7646 7647 7648/* ------------------------------ */ 7649 .balign 128 7650.L_OP_REM_DOUBLE_2ADDR: /* 0xcf */ 7651/* File: mips/OP_REM_DOUBLE_2ADDR.S */ 7652/* File: mips/binflopWide2addr.S */ 7653 /* 7654 * Generic 64-bit "/2addr" binary operation. Provide an "instr" line 7655 * that specifies an instruction that performs "result = a0-a1 op a2-a3". 7656 * This could be an MIPS instruction or a function call. 7657 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7658 * vCC (a1). Useful for integer division and modulus. 7659 * 7660 * For: add-double/2addr, sub-double/2addr, mul-double/2addr, 7661 * div-double/2addr, rem-double/2addr 7662 */ 7663 /* binop/2addr vA, vB */ 7664 GET_OPA4(rOBJ) # rOBJ <- A+ 7665 GET_OPB(a1) # a1 <- B 7666 EAS2(a1, rFP, a1) # a1 <- &fp[B] 7667 EAS2(rOBJ, rFP, rOBJ) # rOBJ <- &fp[A] 7668#ifdef SOFT_FLOAT 7669 LOAD64(rARG2, rARG3, a1) # a2/a3 <- vBB/vBB+1 7670 LOAD64(rARG0, rARG1, rOBJ) # a0/a1 <- vAA/vAA+1 7671 .if 0 7672 or t0, rARG2, rARG3 # second arg (a2-a3) is zero? 7673 beqz t0, common_errDivideByZero 7674 .endif 7675#else 7676 LOAD64_F(fa0, fa0f, rOBJ) 7677 LOAD64_F(fa1, fa1f, a1) 7678 .if 0 7679 li.d ft0, 0 7680 c.eq.d fcc0, fa1, ft0 7681 bc1t fcc0, common_errDivideByZero 7682 .endif 7683#endif 76841: 7685 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 7686 # optional op 7687#ifdef SOFT_FLOAT 7688 JAL(fmod) # result <- op, a0-a3 changed 7689 STORE64(rRESULT0, rRESULT1, rOBJ) 7690#else 7691 JAL(fmod) 7692 STORE64_F(fv0, fv0f, rOBJ) 7693#endif 7694 GET_INST_OPCODE(t0) # extract opcode from rINST 7695 GOTO_OPCODE(t0) # jump to next instruction 7696 /* 12-15 instructions */ 7697 7698 7699 7700/* ------------------------------ */ 7701 .balign 128 7702.L_OP_ADD_INT_LIT16: /* 0xd0 */ 7703/* File: mips/OP_ADD_INT_LIT16.S */ 7704/* File: mips/binopLit16.S */ 7705 /* 7706 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7707 * that specifies an instruction that performs "result = a0 op a1". 7708 * This could be an MIPS instruction or a function call. (If the result 7709 * comes back in a register other than a0, you can override "result".) 7710 * 7711 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7712 * vCC (a1). Useful for integer division and modulus. 7713 * 7714 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7715 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7716 */ 7717 # binop/lit16 vA, vB, /* +CCCC */ 7718 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7719 GET_OPB(a2) # a2 <- B 7720 GET_OPA(rOBJ) # rOBJ <- A+ 7721 GET_VREG(a0, a2) # a0 <- vB 7722 and rOBJ, rOBJ, 15 7723 .if 0 7724 # cmp a1, 0; is second operand zero? 7725 beqz a1, common_errDivideByZero 7726 .endif 7727 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7728 7729 addu a0, a0, a1 # a0 <- op, a0-a3 changed 7730 GET_INST_OPCODE(t0) # extract opcode from rINST 7731 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7732 /* 10-13 instructions */ 7733 7734 7735 7736/* ------------------------------ */ 7737 .balign 128 7738.L_OP_RSUB_INT: /* 0xd1 */ 7739/* File: mips/OP_RSUB_INT.S */ 7740/* this op is "rsub-int", but can be thought of as "rsub-int/lit16" */ 7741/* File: mips/binopLit16.S */ 7742 /* 7743 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7744 * that specifies an instruction that performs "result = a0 op a1". 7745 * This could be an MIPS instruction or a function call. (If the result 7746 * comes back in a register other than a0, you can override "result".) 7747 * 7748 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7749 * vCC (a1). Useful for integer division and modulus. 7750 * 7751 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7752 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7753 */ 7754 # binop/lit16 vA, vB, /* +CCCC */ 7755 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7756 GET_OPB(a2) # a2 <- B 7757 GET_OPA(rOBJ) # rOBJ <- A+ 7758 GET_VREG(a0, a2) # a0 <- vB 7759 and rOBJ, rOBJ, 15 7760 .if 0 7761 # cmp a1, 0; is second operand zero? 7762 beqz a1, common_errDivideByZero 7763 .endif 7764 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7765 7766 subu a0, a1, a0 # a0 <- op, a0-a3 changed 7767 GET_INST_OPCODE(t0) # extract opcode from rINST 7768 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7769 /* 10-13 instructions */ 7770 7771 7772 7773/* ------------------------------ */ 7774 .balign 128 7775.L_OP_MUL_INT_LIT16: /* 0xd2 */ 7776/* File: mips/OP_MUL_INT_LIT16.S */ 7777/* File: mips/binopLit16.S */ 7778 /* 7779 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7780 * that specifies an instruction that performs "result = a0 op a1". 7781 * This could be an MIPS instruction or a function call. (If the result 7782 * comes back in a register other than a0, you can override "result".) 7783 * 7784 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7785 * vCC (a1). Useful for integer division and modulus. 7786 * 7787 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7788 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7789 */ 7790 # binop/lit16 vA, vB, /* +CCCC */ 7791 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7792 GET_OPB(a2) # a2 <- B 7793 GET_OPA(rOBJ) # rOBJ <- A+ 7794 GET_VREG(a0, a2) # a0 <- vB 7795 and rOBJ, rOBJ, 15 7796 .if 0 7797 # cmp a1, 0; is second operand zero? 7798 beqz a1, common_errDivideByZero 7799 .endif 7800 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7801 7802 mul a0, a0, a1 # a0 <- op, a0-a3 changed 7803 GET_INST_OPCODE(t0) # extract opcode from rINST 7804 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7805 /* 10-13 instructions */ 7806 7807 7808 7809/* ------------------------------ */ 7810 .balign 128 7811.L_OP_DIV_INT_LIT16: /* 0xd3 */ 7812/* File: mips/OP_DIV_INT_LIT16.S */ 7813/* File: mips/binopLit16.S */ 7814 /* 7815 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7816 * that specifies an instruction that performs "result = a0 op a1". 7817 * This could be an MIPS instruction or a function call. (If the result 7818 * comes back in a register other than a0, you can override "result".) 7819 * 7820 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7821 * vCC (a1). Useful for integer division and modulus. 7822 * 7823 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7824 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7825 */ 7826 # binop/lit16 vA, vB, /* +CCCC */ 7827 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7828 GET_OPB(a2) # a2 <- B 7829 GET_OPA(rOBJ) # rOBJ <- A+ 7830 GET_VREG(a0, a2) # a0 <- vB 7831 and rOBJ, rOBJ, 15 7832 .if 1 7833 # cmp a1, 0; is second operand zero? 7834 beqz a1, common_errDivideByZero 7835 .endif 7836 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7837 7838 div zero, a0, a1; mflo a0 # a0 <- op, a0-a3 changed 7839 GET_INST_OPCODE(t0) # extract opcode from rINST 7840 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7841 /* 10-13 instructions */ 7842 7843 7844 7845/* ------------------------------ */ 7846 .balign 128 7847.L_OP_REM_INT_LIT16: /* 0xd4 */ 7848/* File: mips/OP_REM_INT_LIT16.S */ 7849/* File: mips/binopLit16.S */ 7850 /* 7851 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7852 * that specifies an instruction that performs "result = a0 op a1". 7853 * This could be an MIPS instruction or a function call. (If the result 7854 * comes back in a register other than a0, you can override "result".) 7855 * 7856 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7857 * vCC (a1). Useful for integer division and modulus. 7858 * 7859 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7860 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7861 */ 7862 # binop/lit16 vA, vB, /* +CCCC */ 7863 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7864 GET_OPB(a2) # a2 <- B 7865 GET_OPA(rOBJ) # rOBJ <- A+ 7866 GET_VREG(a0, a2) # a0 <- vB 7867 and rOBJ, rOBJ, 15 7868 .if 1 7869 # cmp a1, 0; is second operand zero? 7870 beqz a1, common_errDivideByZero 7871 .endif 7872 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7873 7874 div zero, a0, a1; mfhi a0 # a0 <- op, a0-a3 changed 7875 GET_INST_OPCODE(t0) # extract opcode from rINST 7876 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7877 /* 10-13 instructions */ 7878 7879 7880 7881/* ------------------------------ */ 7882 .balign 128 7883.L_OP_AND_INT_LIT16: /* 0xd5 */ 7884/* File: mips/OP_AND_INT_LIT16.S */ 7885/* File: mips/binopLit16.S */ 7886 /* 7887 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7888 * that specifies an instruction that performs "result = a0 op a1". 7889 * This could be an MIPS instruction or a function call. (If the result 7890 * comes back in a register other than a0, you can override "result".) 7891 * 7892 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7893 * vCC (a1). Useful for integer division and modulus. 7894 * 7895 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7896 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7897 */ 7898 # binop/lit16 vA, vB, /* +CCCC */ 7899 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7900 GET_OPB(a2) # a2 <- B 7901 GET_OPA(rOBJ) # rOBJ <- A+ 7902 GET_VREG(a0, a2) # a0 <- vB 7903 and rOBJ, rOBJ, 15 7904 .if 0 7905 # cmp a1, 0; is second operand zero? 7906 beqz a1, common_errDivideByZero 7907 .endif 7908 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7909 7910 and a0, a0, a1 # a0 <- op, a0-a3 changed 7911 GET_INST_OPCODE(t0) # extract opcode from rINST 7912 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7913 /* 10-13 instructions */ 7914 7915 7916 7917/* ------------------------------ */ 7918 .balign 128 7919.L_OP_OR_INT_LIT16: /* 0xd6 */ 7920/* File: mips/OP_OR_INT_LIT16.S */ 7921/* File: mips/binopLit16.S */ 7922 /* 7923 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7924 * that specifies an instruction that performs "result = a0 op a1". 7925 * This could be an MIPS instruction or a function call. (If the result 7926 * comes back in a register other than a0, you can override "result".) 7927 * 7928 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7929 * vCC (a1). Useful for integer division and modulus. 7930 * 7931 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7932 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7933 */ 7934 # binop/lit16 vA, vB, /* +CCCC */ 7935 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7936 GET_OPB(a2) # a2 <- B 7937 GET_OPA(rOBJ) # rOBJ <- A+ 7938 GET_VREG(a0, a2) # a0 <- vB 7939 and rOBJ, rOBJ, 15 7940 .if 0 7941 # cmp a1, 0; is second operand zero? 7942 beqz a1, common_errDivideByZero 7943 .endif 7944 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7945 7946 or a0, a0, a1 # a0 <- op, a0-a3 changed 7947 GET_INST_OPCODE(t0) # extract opcode from rINST 7948 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7949 /* 10-13 instructions */ 7950 7951 7952 7953/* ------------------------------ */ 7954 .balign 128 7955.L_OP_XOR_INT_LIT16: /* 0xd7 */ 7956/* File: mips/OP_XOR_INT_LIT16.S */ 7957/* File: mips/binopLit16.S */ 7958 /* 7959 * Generic 32-bit "lit16" binary operation. Provide an "instr" line 7960 * that specifies an instruction that performs "result = a0 op a1". 7961 * This could be an MIPS instruction or a function call. (If the result 7962 * comes back in a register other than a0, you can override "result".) 7963 * 7964 * If "chkzero" is set to 1, we perform a divide-by-zero check on 7965 * vCC (a1). Useful for integer division and modulus. 7966 * 7967 * For: add-int/lit16, rsub-int, mul-int/lit16, div-int/lit16, 7968 * rem-int/lit16, and-int/lit16, or-int/lit16, xor-int/lit16 7969 */ 7970 # binop/lit16 vA, vB, /* +CCCC */ 7971 FETCH_S(a1, 1) # a1 <- ssssCCCC (sign-extended) 7972 GET_OPB(a2) # a2 <- B 7973 GET_OPA(rOBJ) # rOBJ <- A+ 7974 GET_VREG(a0, a2) # a0 <- vB 7975 and rOBJ, rOBJ, 15 7976 .if 0 7977 # cmp a1, 0; is second operand zero? 7978 beqz a1, common_errDivideByZero 7979 .endif 7980 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 7981 7982 xor a0, a0, a1 # a0 <- op, a0-a3 changed 7983 GET_INST_OPCODE(t0) # extract opcode from rINST 7984 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 7985 /* 10-13 instructions */ 7986 7987 7988 7989/* ------------------------------ */ 7990 .balign 128 7991.L_OP_ADD_INT_LIT8: /* 0xd8 */ 7992/* File: mips/OP_ADD_INT_LIT8.S */ 7993/* File: mips/binopLit8.S */ 7994 /* 7995 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 7996 * that specifies an instruction that performs "result = a0 op a1". 7997 * This could be an MIPS instruction or a function call. (If the result 7998 * comes back in a register other than a0, you can override "result".) 7999 * 8000 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8001 * vCC (a1). Useful for integer division and modulus. 8002 * 8003 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8004 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8005 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8006 */ 8007 # binop/lit8 vAA, vBB, /* +CC */ 8008 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8009 GET_OPA(rOBJ) # rOBJ <- AA 8010 and a2, a3, 255 # a2 <- BB 8011 GET_VREG(a0, a2) # a0 <- vBB 8012 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8013 .if 0 8014 # is second operand zero? 8015 beqz a1, common_errDivideByZero 8016 .endif 8017 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8018 8019 # optional op 8020 addu a0, a0, a1 # a0 <- op, a0-a3 changed 8021 GET_INST_OPCODE(t0) # extract opcode from rINST 8022 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8023 /* 10-12 instructions */ 8024 8025 8026 8027/* ------------------------------ */ 8028 .balign 128 8029.L_OP_RSUB_INT_LIT8: /* 0xd9 */ 8030/* File: mips/OP_RSUB_INT_LIT8.S */ 8031/* File: mips/binopLit8.S */ 8032 /* 8033 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8034 * that specifies an instruction that performs "result = a0 op a1". 8035 * This could be an MIPS instruction or a function call. (If the result 8036 * comes back in a register other than a0, you can override "result".) 8037 * 8038 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8039 * vCC (a1). Useful for integer division and modulus. 8040 * 8041 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8042 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8043 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8044 */ 8045 # binop/lit8 vAA, vBB, /* +CC */ 8046 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8047 GET_OPA(rOBJ) # rOBJ <- AA 8048 and a2, a3, 255 # a2 <- BB 8049 GET_VREG(a0, a2) # a0 <- vBB 8050 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8051 .if 0 8052 # is second operand zero? 8053 beqz a1, common_errDivideByZero 8054 .endif 8055 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8056 8057 # optional op 8058 subu a0, a1, a0 # a0 <- op, a0-a3 changed 8059 GET_INST_OPCODE(t0) # extract opcode from rINST 8060 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8061 /* 10-12 instructions */ 8062 8063 8064 8065/* ------------------------------ */ 8066 .balign 128 8067.L_OP_MUL_INT_LIT8: /* 0xda */ 8068/* File: mips/OP_MUL_INT_LIT8.S */ 8069/* File: mips/binopLit8.S */ 8070 /* 8071 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8072 * that specifies an instruction that performs "result = a0 op a1". 8073 * This could be an MIPS instruction or a function call. (If the result 8074 * comes back in a register other than a0, you can override "result".) 8075 * 8076 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8077 * vCC (a1). Useful for integer division and modulus. 8078 * 8079 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8080 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8081 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8082 */ 8083 # binop/lit8 vAA, vBB, /* +CC */ 8084 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8085 GET_OPA(rOBJ) # rOBJ <- AA 8086 and a2, a3, 255 # a2 <- BB 8087 GET_VREG(a0, a2) # a0 <- vBB 8088 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8089 .if 0 8090 # is second operand zero? 8091 beqz a1, common_errDivideByZero 8092 .endif 8093 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8094 8095 # optional op 8096 mul a0, a0, a1 # a0 <- op, a0-a3 changed 8097 GET_INST_OPCODE(t0) # extract opcode from rINST 8098 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8099 /* 10-12 instructions */ 8100 8101 8102 8103/* ------------------------------ */ 8104 .balign 128 8105.L_OP_DIV_INT_LIT8: /* 0xdb */ 8106/* File: mips/OP_DIV_INT_LIT8.S */ 8107/* File: mips/binopLit8.S */ 8108 /* 8109 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8110 * that specifies an instruction that performs "result = a0 op a1". 8111 * This could be an MIPS instruction or a function call. (If the result 8112 * comes back in a register other than a0, you can override "result".) 8113 * 8114 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8115 * vCC (a1). Useful for integer division and modulus. 8116 * 8117 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8118 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8119 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8120 */ 8121 # binop/lit8 vAA, vBB, /* +CC */ 8122 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8123 GET_OPA(rOBJ) # rOBJ <- AA 8124 and a2, a3, 255 # a2 <- BB 8125 GET_VREG(a0, a2) # a0 <- vBB 8126 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8127 .if 1 8128 # is second operand zero? 8129 beqz a1, common_errDivideByZero 8130 .endif 8131 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8132 8133 # optional op 8134 div zero, a0, a1; mflo a0 # a0 <- op, a0-a3 changed 8135 GET_INST_OPCODE(t0) # extract opcode from rINST 8136 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8137 /* 10-12 instructions */ 8138 8139 8140 8141/* ------------------------------ */ 8142 .balign 128 8143.L_OP_REM_INT_LIT8: /* 0xdc */ 8144/* File: mips/OP_REM_INT_LIT8.S */ 8145/* File: mips/binopLit8.S */ 8146 /* 8147 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8148 * that specifies an instruction that performs "result = a0 op a1". 8149 * This could be an MIPS instruction or a function call. (If the result 8150 * comes back in a register other than a0, you can override "result".) 8151 * 8152 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8153 * vCC (a1). Useful for integer division and modulus. 8154 * 8155 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8156 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8157 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8158 */ 8159 # binop/lit8 vAA, vBB, /* +CC */ 8160 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8161 GET_OPA(rOBJ) # rOBJ <- AA 8162 and a2, a3, 255 # a2 <- BB 8163 GET_VREG(a0, a2) # a0 <- vBB 8164 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8165 .if 1 8166 # is second operand zero? 8167 beqz a1, common_errDivideByZero 8168 .endif 8169 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8170 8171 # optional op 8172 div zero, a0, a1; mfhi a0 # a0 <- op, a0-a3 changed 8173 GET_INST_OPCODE(t0) # extract opcode from rINST 8174 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8175 /* 10-12 instructions */ 8176 8177 8178 8179/* ------------------------------ */ 8180 .balign 128 8181.L_OP_AND_INT_LIT8: /* 0xdd */ 8182/* File: mips/OP_AND_INT_LIT8.S */ 8183/* File: mips/binopLit8.S */ 8184 /* 8185 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8186 * that specifies an instruction that performs "result = a0 op a1". 8187 * This could be an MIPS instruction or a function call. (If the result 8188 * comes back in a register other than a0, you can override "result".) 8189 * 8190 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8191 * vCC (a1). Useful for integer division and modulus. 8192 * 8193 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8194 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8195 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8196 */ 8197 # binop/lit8 vAA, vBB, /* +CC */ 8198 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8199 GET_OPA(rOBJ) # rOBJ <- AA 8200 and a2, a3, 255 # a2 <- BB 8201 GET_VREG(a0, a2) # a0 <- vBB 8202 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8203 .if 0 8204 # is second operand zero? 8205 beqz a1, common_errDivideByZero 8206 .endif 8207 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8208 8209 # optional op 8210 and a0, a0, a1 # a0 <- op, a0-a3 changed 8211 GET_INST_OPCODE(t0) # extract opcode from rINST 8212 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8213 /* 10-12 instructions */ 8214 8215 8216 8217/* ------------------------------ */ 8218 .balign 128 8219.L_OP_OR_INT_LIT8: /* 0xde */ 8220/* File: mips/OP_OR_INT_LIT8.S */ 8221/* File: mips/binopLit8.S */ 8222 /* 8223 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8224 * that specifies an instruction that performs "result = a0 op a1". 8225 * This could be an MIPS instruction or a function call. (If the result 8226 * comes back in a register other than a0, you can override "result".) 8227 * 8228 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8229 * vCC (a1). Useful for integer division and modulus. 8230 * 8231 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8232 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8233 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8234 */ 8235 # binop/lit8 vAA, vBB, /* +CC */ 8236 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8237 GET_OPA(rOBJ) # rOBJ <- AA 8238 and a2, a3, 255 # a2 <- BB 8239 GET_VREG(a0, a2) # a0 <- vBB 8240 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8241 .if 0 8242 # is second operand zero? 8243 beqz a1, common_errDivideByZero 8244 .endif 8245 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8246 8247 # optional op 8248 or a0, a0, a1 # a0 <- op, a0-a3 changed 8249 GET_INST_OPCODE(t0) # extract opcode from rINST 8250 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8251 /* 10-12 instructions */ 8252 8253 8254 8255/* ------------------------------ */ 8256 .balign 128 8257.L_OP_XOR_INT_LIT8: /* 0xdf */ 8258/* File: mips/OP_XOR_INT_LIT8.S */ 8259/* File: mips/binopLit8.S */ 8260 /* 8261 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8262 * that specifies an instruction that performs "result = a0 op a1". 8263 * This could be an MIPS instruction or a function call. (If the result 8264 * comes back in a register other than a0, you can override "result".) 8265 * 8266 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8267 * vCC (a1). Useful for integer division and modulus. 8268 * 8269 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8270 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8271 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8272 */ 8273 # binop/lit8 vAA, vBB, /* +CC */ 8274 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8275 GET_OPA(rOBJ) # rOBJ <- AA 8276 and a2, a3, 255 # a2 <- BB 8277 GET_VREG(a0, a2) # a0 <- vBB 8278 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8279 .if 0 8280 # is second operand zero? 8281 beqz a1, common_errDivideByZero 8282 .endif 8283 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8284 8285 # optional op 8286 xor a0, a0, a1 # a0 <- op, a0-a3 changed 8287 GET_INST_OPCODE(t0) # extract opcode from rINST 8288 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8289 /* 10-12 instructions */ 8290 8291 8292 8293/* ------------------------------ */ 8294 .balign 128 8295.L_OP_SHL_INT_LIT8: /* 0xe0 */ 8296/* File: mips/OP_SHL_INT_LIT8.S */ 8297/* File: mips/binopLit8.S */ 8298 /* 8299 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8300 * that specifies an instruction that performs "result = a0 op a1". 8301 * This could be an MIPS instruction or a function call. (If the result 8302 * comes back in a register other than a0, you can override "result".) 8303 * 8304 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8305 * vCC (a1). Useful for integer division and modulus. 8306 * 8307 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8308 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8309 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8310 */ 8311 # binop/lit8 vAA, vBB, /* +CC */ 8312 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8313 GET_OPA(rOBJ) # rOBJ <- AA 8314 and a2, a3, 255 # a2 <- BB 8315 GET_VREG(a0, a2) # a0 <- vBB 8316 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8317 .if 0 8318 # is second operand zero? 8319 beqz a1, common_errDivideByZero 8320 .endif 8321 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8322 8323 and a1, a1, 31 # optional op 8324 sll a0, a0, a1 # a0 <- op, a0-a3 changed 8325 GET_INST_OPCODE(t0) # extract opcode from rINST 8326 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8327 /* 10-12 instructions */ 8328 8329 8330 8331/* ------------------------------ */ 8332 .balign 128 8333.L_OP_SHR_INT_LIT8: /* 0xe1 */ 8334/* File: mips/OP_SHR_INT_LIT8.S */ 8335/* File: mips/binopLit8.S */ 8336 /* 8337 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8338 * that specifies an instruction that performs "result = a0 op a1". 8339 * This could be an MIPS instruction or a function call. (If the result 8340 * comes back in a register other than a0, you can override "result".) 8341 * 8342 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8343 * vCC (a1). Useful for integer division and modulus. 8344 * 8345 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8346 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8347 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8348 */ 8349 # binop/lit8 vAA, vBB, /* +CC */ 8350 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8351 GET_OPA(rOBJ) # rOBJ <- AA 8352 and a2, a3, 255 # a2 <- BB 8353 GET_VREG(a0, a2) # a0 <- vBB 8354 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8355 .if 0 8356 # is second operand zero? 8357 beqz a1, common_errDivideByZero 8358 .endif 8359 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8360 8361 and a1, a1, 31 # optional op 8362 sra a0, a0, a1 # a0 <- op, a0-a3 changed 8363 GET_INST_OPCODE(t0) # extract opcode from rINST 8364 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8365 /* 10-12 instructions */ 8366 8367 8368 8369/* ------------------------------ */ 8370 .balign 128 8371.L_OP_USHR_INT_LIT8: /* 0xe2 */ 8372/* File: mips/OP_USHR_INT_LIT8.S */ 8373/* File: mips/binopLit8.S */ 8374 /* 8375 * Generic 32-bit "lit8" binary operation. Provide an "instr" line 8376 * that specifies an instruction that performs "result = a0 op a1". 8377 * This could be an MIPS instruction or a function call. (If the result 8378 * comes back in a register other than a0, you can override "result".) 8379 * 8380 * If "chkzero" is set to 1, we perform a divide-by-zero check on 8381 * vCC (a1). Useful for integer division and modulus. 8382 * 8383 * For: add-int/lit8, rsub-int/lit8, mul-int/lit8, div-int/lit8, 8384 * rem-int/lit8, and-int/lit8, or-int/lit8, xor-int/lit8, 8385 * shl-int/lit8, shr-int/lit8, ushr-int/lit8 8386 */ 8387 # binop/lit8 vAA, vBB, /* +CC */ 8388 FETCH_S(a3, 1) # a3 <- ssssCCBB (sign-extended for CC) 8389 GET_OPA(rOBJ) # rOBJ <- AA 8390 and a2, a3, 255 # a2 <- BB 8391 GET_VREG(a0, a2) # a0 <- vBB 8392 sra a1, a3, 8 # a1 <- ssssssCC (sign extended) 8393 .if 0 8394 # is second operand zero? 8395 beqz a1, common_errDivideByZero 8396 .endif 8397 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8398 8399 and a1, a1, 31 # optional op 8400 srl a0, a0, a1 # a0 <- op, a0-a3 changed 8401 GET_INST_OPCODE(t0) # extract opcode from rINST 8402 SET_VREG_GOTO(a0, rOBJ, t0) # vAA <- a0 8403 /* 10-12 instructions */ 8404 8405 8406 8407/* ------------------------------ */ 8408 .balign 128 8409.L_OP_IGET_VOLATILE: /* 0xe3 */ 8410/* File: mips/OP_IGET_VOLATILE.S */ 8411/* File: mips/OP_IGET.S */ 8412 /* 8413 * General 32-bit instance field get. 8414 * 8415 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 8416 */ 8417 # op vA, vB, field /* CCCC */ 8418 GET_OPB(a0) # a0 <- B 8419 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 8420 FETCH(a1, 1) # a1 <- field ref CCCC 8421 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 8422 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 8423 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 8424 # is resolved entry null? 8425 bnez a0, .LOP_IGET_VOLATILE_finish # no, already resolved 8426 LOAD_rSELF_method(a2) # a2 <- current method 8427 EXPORT_PC() # resolve() could throw 8428 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8429 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 8430 # test results 8431 move a0, v0 8432 bnez v0, .LOP_IGET_VOLATILE_finish 8433 b common_exceptionThrown 8434 8435 8436/* ------------------------------ */ 8437 .balign 128 8438.L_OP_IPUT_VOLATILE: /* 0xe4 */ 8439/* File: mips/OP_IPUT_VOLATILE.S */ 8440/* File: mips/OP_IPUT.S */ 8441 /* 8442 * General 32-bit instance field put. 8443 * 8444 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short 8445 */ 8446 # op vA, vB, field /* CCCC */ 8447 GET_OPB(a0) # a0 <- B 8448 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 8449 FETCH(a1, 1) # a1 <- field ref CCCC 8450 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 8451 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 8452 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 8453 # is resolved entry null? 8454 bnez a0, .LOP_IPUT_VOLATILE_finish # no, already resolved 8455 LOAD_rSELF_method(a2) # a2 <- current method 8456 EXPORT_PC() # resolve() could throw 8457 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8458 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 8459 # success? 8460 move a0, v0 8461 bnez v0, .LOP_IPUT_VOLATILE_finish # yes, finish up 8462 b common_exceptionThrown 8463 8464 8465/* ------------------------------ */ 8466 .balign 128 8467.L_OP_SGET_VOLATILE: /* 0xe5 */ 8468/* File: mips/OP_SGET_VOLATILE.S */ 8469/* File: mips/OP_SGET.S */ 8470 /* 8471 * General 32-bit SGET handler. 8472 * 8473 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 8474 */ 8475 # op vAA, field /* BBBB */ 8476 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 8477 FETCH(a1, 1) # a1 <- field ref BBBB 8478 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 8479 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 8480 # is resolved entry !null? 8481 bnez a0, .LOP_SGET_VOLATILE_finish 8482 8483 /* 8484 * Continuation if the field has not yet been resolved. 8485 * a1: BBBB field ref 8486 * rBIX: dvmDex->pResFields 8487 */ 8488 LOAD_rSELF_method(a2) # a2 <- current method 8489#if defined(WITH_JIT) 8490 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 8491#endif 8492 EXPORT_PC() # resolve() could throw, so export now 8493 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8494 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 8495 move a0, v0 8496 # success? 8497 beqz v0, common_exceptionThrown # no, handle exception 8498#if defined(WITH_JIT) 8499 /* 8500 * If the JIT is actively building a trace we need to make sure 8501 * that the field is fully resolved before including this instruction. 8502 */ 8503 JAL(common_verifyField) 8504#endif 8505 b .LOP_SGET_VOLATILE_finish # resume 8506 8507 8508/* ------------------------------ */ 8509 .balign 128 8510.L_OP_SPUT_VOLATILE: /* 0xe6 */ 8511/* File: mips/OP_SPUT_VOLATILE.S */ 8512/* File: mips/OP_SPUT.S */ 8513 /* 8514 * General 32-bit SPUT handler. 8515 * 8516 * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short 8517 */ 8518 # op vAA, field /* BBBB */ 8519 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 8520 FETCH(a1, 1) # a1 <- field ref BBBB 8521 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 8522 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 8523 bnez a0, .LOP_SPUT_VOLATILE_finish # is resolved entry null? 8524 /* 8525 * Continuation if the field has not yet been resolved. 8526 * a1: BBBB field ref 8527 * rBIX: dvmDex->pResFields 8528 */ 8529 LOAD_rSELF_method(a2) # a2 <- current method 8530#if defined(WITH_JIT) 8531 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 8532#endif 8533 EXPORT_PC() # resolve() may throw, so export now 8534 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8535 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 8536 move a0, v0 8537 beqz v0, common_exceptionThrown # success? no, handle exception 8538#if defined(WITH_JIT) 8539 /* 8540 * If the JIT is actively building a trace we need to make sure 8541 * that the field is fully resolved before including this instruction. 8542 */ 8543 JAL(common_verifyField) 8544#endif 8545 b .LOP_SPUT_VOLATILE_finish # resume 8546 8547 8548/* ------------------------------ */ 8549 .balign 128 8550.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */ 8551/* File: mips/OP_IGET_OBJECT_VOLATILE.S */ 8552/* File: mips/OP_IGET.S */ 8553 /* 8554 * General 32-bit instance field get. 8555 * 8556 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short 8557 */ 8558 # op vA, vB, field /* CCCC */ 8559 GET_OPB(a0) # a0 <- B 8560 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 8561 FETCH(a1, 1) # a1 <- field ref CCCC 8562 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 8563 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 8564 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 8565 # is resolved entry null? 8566 bnez a0, .LOP_IGET_OBJECT_VOLATILE_finish # no, already resolved 8567 LOAD_rSELF_method(a2) # a2 <- current method 8568 EXPORT_PC() # resolve() could throw 8569 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8570 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 8571 # test results 8572 move a0, v0 8573 bnez v0, .LOP_IGET_OBJECT_VOLATILE_finish 8574 b common_exceptionThrown 8575 8576 8577/* ------------------------------ */ 8578 .balign 128 8579.L_OP_IGET_WIDE_VOLATILE: /* 0xe8 */ 8580/* File: mips/OP_IGET_WIDE_VOLATILE.S */ 8581/* File: mips/OP_IGET_WIDE.S */ 8582 /* 8583 * Wide 32-bit instance field get. 8584 */ 8585 # iget-wide vA, vB, field /* CCCC */ 8586 GET_OPB(a0) # a0 <- B 8587 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 8588 FETCH(a1, 1) # a1 <- field ref CCCC 8589 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pResFields 8590 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 8591 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 8592 # is resolved entry null? 8593 bnez a0, .LOP_IGET_WIDE_VOLATILE_finish # no, already resolved 8594 LOAD_rSELF_method(a2) # a2 <- current method 8595 EXPORT_PC() # resolve() could throw 8596 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8597 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 8598 # test return code 8599 move a0, v0 8600 bnez v0, .LOP_IGET_WIDE_VOLATILE_finish 8601 b common_exceptionThrown 8602 8603 8604/* ------------------------------ */ 8605 .balign 128 8606.L_OP_IPUT_WIDE_VOLATILE: /* 0xe9 */ 8607/* File: mips/OP_IPUT_WIDE_VOLATILE.S */ 8608/* File: mips/OP_IPUT_WIDE.S */ 8609 # iput-wide vA, vB, field /* CCCC */ 8610 GET_OPB(a0) # a0 <- B 8611 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 8612 FETCH(a1, 1) # a1 <- field ref CCCC 8613 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pResFields 8614 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 8615 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 8616 # is resolved entry null? 8617 bnez a0, .LOP_IPUT_WIDE_VOLATILE_finish # no, already resolved 8618 LOAD_rSELF_method(a2) # a2 <- current method 8619 EXPORT_PC() # resolve() could throw 8620 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8621 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 8622 # success? 8623 move a0, v0 8624 bnez v0, .LOP_IPUT_WIDE_VOLATILE_finish # yes, finish up 8625 b common_exceptionThrown 8626 8627 8628/* ------------------------------ */ 8629 .balign 128 8630.L_OP_SGET_WIDE_VOLATILE: /* 0xea */ 8631/* File: mips/OP_SGET_WIDE_VOLATILE.S */ 8632/* File: mips/OP_SGET_WIDE.S */ 8633 /* 8634 * 64-bit SGET handler. 8635 */ 8636 # sget-wide vAA, field /* BBBB */ 8637 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 8638 FETCH(a1, 1) # a1 <- field ref BBBB 8639 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 8640 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 8641 # is resolved entry null? 8642 bnez a0, .LOP_SGET_WIDE_VOLATILE_finish 8643 8644 /* 8645 * Continuation if the field has not yet been resolved. 8646 * a1: BBBB field ref 8647 * rBIX: dvmDex->pResFields 8648 * 8649 * Returns StaticField pointer in v0. 8650 */ 8651 LOAD_rSELF_method(a2) # a2 <- current method 8652#if defined(WITH_JIT) 8653 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 8654#endif 8655 EXPORT_PC() # resolve() could throw, so export now 8656 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 8657 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 8658 move a0, v0 8659 # success? 8660 beqz v0, common_exceptionThrown # no, handle exception 8661#if defined(WITH_JIT) 8662 /* 8663 * If the JIT is actively building a trace we need to make sure 8664 * that the field is fully resolved before including this instruction. 8665 */ 8666 JAL(common_verifyField) 8667#endif 8668 8669 b .LOP_SGET_WIDE_VOLATILE_finish # resume 8670 8671 8672/* ------------------------------ */ 8673 .balign 128 8674.L_OP_SPUT_WIDE_VOLATILE: /* 0xeb */ 8675/* File: mips/OP_SPUT_WIDE_VOLATILE.S */ 8676/* File: mips/OP_SPUT_WIDE.S */ 8677 /* 8678 * 64-bit SPUT handler. 8679 */ 8680 # sput-wide vAA, field /* BBBB */ 8681 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 8682 FETCH(a1, 1) # a1 <- field ref BBBB 8683 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 8684 GET_OPA(t0) # t0 <- AA 8685 LOAD_eas2(a2, rBIX, a1) # a2 <- resolved StaticField ptr 8686 EAS2(rOBJ, rFP, t0) # rOBJ<- &fp[AA] 8687 # is resolved entry null? 8688 beqz a2, .LOP_SPUT_WIDE_VOLATILE_resolve # yes, do resolve 8689.LOP_SPUT_WIDE_VOLATILE_finish: # field ptr in a2, AA in rOBJ 8690 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8691 LOAD64(a0, a1, rOBJ) # a0/a1 <- vAA/vAA+1 8692 GET_INST_OPCODE(rBIX) # extract opcode from rINST 8693 .if 1 8694 addu a2, offStaticField_value # a2<- pointer to data 8695 JAL(dvmQuasiAtomicSwap64Sync) # stores a0/a1 into addr a2 8696 .else 8697 STORE64_off(a0, a1, a2, offStaticField_value) # field <- vAA/vAA+1 8698 .endif 8699 GOTO_OPCODE(rBIX) # jump to next instruction 8700 8701 8702/* ------------------------------ */ 8703 .balign 128 8704.L_OP_BREAKPOINT: /* 0xec */ 8705 /* (stub) */ 8706 SAVE_PC_TO_SELF() # only need to export PC and FP 8707 SAVE_FP_TO_SELF() 8708 move a0, rSELF # self is first arg to function 8709 JAL(dvmMterp_OP_BREAKPOINT) # call 8710 LOAD_PC_FROM_SELF() # retrieve updated values 8711 LOAD_FP_FROM_SELF() 8712 FETCH_INST() # load next instruction from rPC 8713 GET_INST_OPCODE(t0) # ...trim down to just the opcode 8714 GOTO_OPCODE(t0) # ...and jump to the handler 8715/* ------------------------------ */ 8716 .balign 128 8717.L_OP_THROW_VERIFICATION_ERROR: /* 0xed */ 8718/* File: mips/OP_THROW_VERIFICATION_ERROR.S */ 8719 /* 8720 * Handle a throw-verification-error instruction. This throws an 8721 * exception for an error discovered during verification. The 8722 * exception is indicated by AA, with some detail provided by BBBB. 8723 */ 8724 /* op AA, ref@BBBB */ 8725 8726 LOAD_rSELF_method(a0) # a0 <- self->method 8727 FETCH(a2, 1) # a2 <- BBBB 8728 EXPORT_PC() # export the PC 8729 GET_OPA(a1) # a1 <- AA 8730 JAL(dvmThrowVerificationError) # always throws 8731 b common_exceptionThrown # handle exception 8732 8733 8734/* ------------------------------ */ 8735 .balign 128 8736.L_OP_EXECUTE_INLINE: /* 0xee */ 8737/* File: mips/OP_EXECUTE_INLINE.S */ 8738 /* 8739 * Execute a "native inline" instruction. 8740 * 8741 * We need to call an InlineOp4Func: 8742 * bool (func)(u4 arg0, u4 arg1, u4 arg2, u4 arg3, JValue* pResult) 8743 * 8744 * The first four args are in a0-a3, pointer to return value storage 8745 * is on the stack. The function's return value is a flag that tells 8746 * us if an exception was thrown. 8747 * 8748 * TUNING: could maintain two tables, pointer in Thread and 8749 * swap if profiler/debuggger active. 8750 */ 8751 /* [opt] execute-inline vAA, {vC, vD, vE, vF}, inline@BBBB */ 8752 lhu a2, offThread_subMode(rSELF) 8753 FETCH(rBIX, 1) # rBIX <- BBBB 8754 EXPORT_PC() # can throw 8755 and a2, kSubModeDebugProfile # Any going on? 8756 bnez a2, .LOP_EXECUTE_INLINE_debugmode # yes - take slow path 8757.LOP_EXECUTE_INLINE_resume: 8758 addu a1, rSELF, offThread_retval # a1 <- &self->retval 8759 GET_OPB(a0) # a0 <- B 8760 # Stack should have 16/20 available 8761 sw a1, STACK_OFFSET_ARG04(sp) # push &self->retval 8762 BAL(.LOP_EXECUTE_INLINE_continue) # make call; will return after 8763 lw gp, STACK_OFFSET_GP(sp) # restore gp 8764 # test boolean result of inline 8765 beqz v0, common_exceptionThrown # returned false, handle exception 8766 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 8767 GET_INST_OPCODE(t0) # extract opcode from rINST 8768 GOTO_OPCODE(t0) # jump to next instruction 8769 8770/* ------------------------------ */ 8771 .balign 128 8772.L_OP_EXECUTE_INLINE_RANGE: /* 0xef */ 8773/* File: mips/OP_EXECUTE_INLINE_RANGE.S */ 8774 /* 8775 * Execute a "native inline" instruction, using "/range" semantics. 8776 * Same idea as execute-inline, but we get the args differently. 8777 * 8778 * We need to call an InlineOp4Func: 8779 * bool (func)(u4 arg0, u4 arg1, u4 arg2, u4 arg3, JValue* pResult) 8780 * 8781 * The first four args are in a0-a3, pointer to return value storage 8782 * is on the stack. The function's return value is a flag that tells 8783 * us if an exception was thrown. 8784 */ 8785 /* [opt] execute-inline/range {vCCCC..v(CCCC+AA-1)}, inline@BBBB */ 8786 lhu a2, offThread_subMode(rSELF) 8787 FETCH(rBIX, 1) # rBIX<- BBBB 8788 EXPORT_PC() # can throw 8789 and a2, kSubModeDebugProfile # Any going on? 8790 bnez a2, .LOP_EXECUTE_INLINE_RANGE_debugmode # yes - take slow path 8791.LOP_EXECUTE_INLINE_RANGE_resume: 8792 addu a1, rSELF, offThread_retval # a1<- &self->retval 8793 GET_OPA(a0) 8794 sw a1, STACK_OFFSET_ARG04(sp) # push &self->retval 8795 BAL(.LOP_EXECUTE_INLINE_RANGE_continue) # make call; will return after 8796 lw gp, STACK_OFFSET_GP(sp) # restore gp 8797 beqz v0, common_exceptionThrown # returned false, handle exception 8798 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 8799 GET_INST_OPCODE(t0) # extract opcode from rINST 8800 GOTO_OPCODE(t0) # jump to next instruction 8801 8802 8803/* ------------------------------ */ 8804 .balign 128 8805.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */ 8806/* File: mips/OP_INVOKE_OBJECT_INIT_RANGE.S */ 8807 /* 8808 * Invoke Object.<init> on an object. In practice we know that 8809 * Object's nullary constructor doesn't do anything, so we just 8810 * skip it unless a debugger is active. 8811 */ 8812 FETCH(a1, 2) # a1<- CCCC 8813 GET_VREG(a0, a1) # a0<- "this" ptr 8814 # check for NULL 8815 beqz a0, common_errNullObject # export PC and throw NPE 8816 LOAD_base_offObject_clazz(a1, a0) # a1<- obj->clazz 8817 LOAD_base_offClassObject_accessFlags(a2, a1) # a2<- clazz->accessFlags 8818 and a2, CLASS_ISFINALIZABLE # is this class finalizable? 8819 beqz a2, .LOP_INVOKE_OBJECT_INIT_RANGE_finish # no, go 8820 8821.LOP_INVOKE_OBJECT_INIT_RANGE_setFinal: 8822 EXPORT_PC() # can throw 8823 JAL(dvmSetFinalizable) # call dvmSetFinalizable(obj) 8824 LOAD_offThread_exception(a0, rSELF) # a0<- self->exception 8825 # exception pending? 8826 bnez a0, common_exceptionThrown # yes, handle it 8827 8828.LOP_INVOKE_OBJECT_INIT_RANGE_finish: 8829 lhu a1, offThread_subMode(rSELF) 8830 and a1, kSubModeDebuggerActive # debugger active? 8831 bnez a1, .LOP_INVOKE_OBJECT_INIT_RANGE_debugger # Yes - skip optimization 8832 FETCH_ADVANCE_INST(2+1) # advance to next instr, load rINST 8833 GET_INST_OPCODE(t0) # t0<- opcode from rINST 8834 GOTO_OPCODE(t0) # execute it 8835 8836 8837/* ------------------------------ */ 8838 .balign 128 8839.L_OP_RETURN_VOID_BARRIER: /* 0xf1 */ 8840/* File: mips/OP_RETURN_VOID_BARRIER.S */ 8841 SMP_DMB 8842 b common_returnFromMethod 8843 8844/* ------------------------------ */ 8845 .balign 128 8846.L_OP_IGET_QUICK: /* 0xf2 */ 8847/* File: mips/OP_IGET_QUICK.S */ 8848 /* For: iget-quick, iget-object-quick */ 8849 # op vA, vB, offset /* CCCC */ 8850 GET_OPB(a2) # a2 <- B 8851 GET_VREG(a3, a2) # a3 <- object we're operating on 8852 FETCH(a1, 1) # a1 <- field byte offset 8853 GET_OPA4(a2) # a2 <- A(+) 8854 # check object for null 8855 beqz a3, common_errNullObject # object was null 8856 addu t0, a3, a1 # 8857 lw a0, 0(t0) # a0 <- obj.field (always 32 bits) 8858 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8859 GET_INST_OPCODE(t0) # extract opcode from rINST 8860 SET_VREG(a0, a2) # fp[A] <- a0 8861 GOTO_OPCODE(t0) # jump to next instruction 8862 8863 8864/* ------------------------------ */ 8865 .balign 128 8866.L_OP_IGET_WIDE_QUICK: /* 0xf3 */ 8867/* File: mips/OP_IGET_WIDE_QUICK.S */ 8868 # iget-wide-quick vA, vB, offset /* CCCC */ 8869 GET_OPB(a2) # a2 <- B 8870 GET_VREG(a3, a2) # a3 <- object we're operating on 8871 FETCH(a1, 1) # a1 <- field byte offset 8872 GET_OPA4(a2) # a2 <- A(+) 8873 # check object for null 8874 beqz a3, common_errNullObject # object was null 8875 addu t0, a3, a1 # t0 <- a3 + a1 8876 LOAD64(a0, a1, t0) # a0 <- obj.field (64 bits, aligned) 8877 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8878 EAS2(a3, rFP, a2) 8879 GET_INST_OPCODE(t0) # extract opcode from rINST 8880 STORE64(a0, a1, a3) # fp[A] <- a0/a1 8881 GOTO_OPCODE(t0) # jump to next instruction 8882 8883 8884/* ------------------------------ */ 8885 .balign 128 8886.L_OP_IGET_OBJECT_QUICK: /* 0xf4 */ 8887/* File: mips/OP_IGET_OBJECT_QUICK.S */ 8888/* File: mips/OP_IGET_QUICK.S */ 8889 /* For: iget-quick, iget-object-quick */ 8890 # op vA, vB, offset /* CCCC */ 8891 GET_OPB(a2) # a2 <- B 8892 GET_VREG(a3, a2) # a3 <- object we're operating on 8893 FETCH(a1, 1) # a1 <- field byte offset 8894 GET_OPA4(a2) # a2 <- A(+) 8895 # check object for null 8896 beqz a3, common_errNullObject # object was null 8897 addu t0, a3, a1 # 8898 lw a0, 0(t0) # a0 <- obj.field (always 32 bits) 8899 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8900 GET_INST_OPCODE(t0) # extract opcode from rINST 8901 SET_VREG(a0, a2) # fp[A] <- a0 8902 GOTO_OPCODE(t0) # jump to next instruction 8903 8904 8905 8906/* ------------------------------ */ 8907 .balign 128 8908.L_OP_IPUT_QUICK: /* 0xf5 */ 8909/* File: mips/OP_IPUT_QUICK.S */ 8910 /* For: iput-quick, iput-object-quick */ 8911 # op vA, vB, offset /* CCCC */ 8912 GET_OPB(a2) # a2 <- B 8913 GET_VREG(a3, a2) # a3 <- fp[B], the object pointer 8914 FETCH(a1, 1) # a1 <- field byte offset 8915 GET_OPA4(a2) # a2 <- A(+) 8916 beqz a3, common_errNullObject # object was null 8917 GET_VREG(a0, a2) # a0 <- fp[A] 8918 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8919 addu t0, a3, a1 8920 sw a0, 0(t0) # obj.field (always 32 bits) <- a0 8921 GET_INST_OPCODE(t0) # extract opcode from rINST 8922 GOTO_OPCODE(t0) # jump to next instruction 8923 8924 8925/* ------------------------------ */ 8926 .balign 128 8927.L_OP_IPUT_WIDE_QUICK: /* 0xf6 */ 8928/* File: mips/OP_IPUT_WIDE_QUICK.S */ 8929 # iput-wide-quick vA, vB, offset /* CCCC */ 8930 GET_OPA4(a0) # a0 <- A(+) 8931 GET_OPB(a1) # a1 <- B 8932 GET_VREG(a2, a1) # a2 <- fp[B], the object pointer 8933 EAS2(a3, rFP, a0) # a3 <- &fp[A] 8934 LOAD64(a0, a1, a3) # a0/a1 <- fp[A] 8935 # check object for null 8936 beqz a2, common_errNullObject # object was null 8937 FETCH(a3, 1) # a3 <- field byte offset 8938 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8939 addu a2, a2, a3 # obj.field (64 bits, aligned) <- a0/a1 8940 STORE64(a0, a1, a2) # obj.field (64 bits, aligned) <- a0/a1 8941 GET_INST_OPCODE(t0) # extract opcode from rINST 8942 GOTO_OPCODE(t0) # jump to next instruction 8943 8944 8945/* ------------------------------ */ 8946 .balign 128 8947.L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */ 8948/* File: mips/OP_IPUT_OBJECT_QUICK.S */ 8949 /* For: iput-object-quick */ 8950 # op vA, vB, offset /* CCCC */ 8951 GET_OPB(a2) # a2 <- B 8952 GET_VREG(a3, a2) # a3 <- fp[B], the object pointer 8953 FETCH(a1, 1) # a1 <- field byte offset 8954 GET_OPA4(a2) # a2 <- A(+) 8955 beqz a3, common_errNullObject # object was null 8956 GET_VREG(a0, a2) # a0 <- fp[A] 8957 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 8958 addu t0, a3, a1 8959 sw a0, 0(t0) # obj.field (always 32 bits) <- a0 8960 beqz a0, 1f 8961 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 8962 srl t1, a3, GC_CARD_SHIFT 8963 addu t2, a2, t1 8964 sb a2, 0(t2) 89651: 8966 GET_INST_OPCODE(t0) # extract opcode from rINST 8967 GOTO_OPCODE(t0) # jump to next instruction 8968 8969/* ------------------------------ */ 8970 .balign 128 8971.L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */ 8972/* File: mips/OP_INVOKE_VIRTUAL_QUICK.S */ 8973 /* 8974 * Handle an optimized virtual method call. 8975 * 8976 * for: [opt] invoke-virtual-quick, invoke-virtual-quick/range 8977 */ 8978 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 8979 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 8980 FETCH(a3, 2) # a3 <- FEDC or CCCC 8981 FETCH(a1, 1) # a1 <- BBBB 8982 .if (!0) 8983 and a3, a3, 15 # a3 <- C (or stays CCCC) 8984 .endif 8985 GET_VREG(rOBJ, a3) # rOBJ <- vC ("this" ptr) 8986 # is "this" null? 8987 beqz rOBJ, common_errNullObject # null "this", throw exception 8988 LOAD_base_offObject_clazz(a2, rOBJ) # a2 <- thisPtr->clazz 8989 LOAD_base_offClassObject_vtable(a2, a2) # a2 <- thisPtr->clazz->vtable 8990 EXPORT_PC() # invoke must export 8991 LOAD_eas2(a0, a2, a1) # a0 <- vtable[BBBB] 8992 b common_invokeMethodNoRange # (a0=method, r9="this") 8993 8994/* ------------------------------ */ 8995 .balign 128 8996.L_OP_INVOKE_VIRTUAL_QUICK_RANGE: /* 0xf9 */ 8997/* File: mips/OP_INVOKE_VIRTUAL_QUICK_RANGE.S */ 8998/* File: mips/OP_INVOKE_VIRTUAL_QUICK.S */ 8999 /* 9000 * Handle an optimized virtual method call. 9001 * 9002 * for: [opt] invoke-virtual-quick, invoke-virtual-quick/range 9003 */ 9004 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 9005 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 9006 FETCH(a3, 2) # a3 <- FEDC or CCCC 9007 FETCH(a1, 1) # a1 <- BBBB 9008 .if (!1) 9009 and a3, a3, 15 # a3 <- C (or stays CCCC) 9010 .endif 9011 GET_VREG(rOBJ, a3) # rOBJ <- vC ("this" ptr) 9012 # is "this" null? 9013 beqz rOBJ, common_errNullObject # null "this", throw exception 9014 LOAD_base_offObject_clazz(a2, rOBJ) # a2 <- thisPtr->clazz 9015 LOAD_base_offClassObject_vtable(a2, a2) # a2 <- thisPtr->clazz->vtable 9016 EXPORT_PC() # invoke must export 9017 LOAD_eas2(a0, a2, a1) # a0 <- vtable[BBBB] 9018 b common_invokeMethodRange # (a0=method, r9="this") 9019 9020 9021/* ------------------------------ */ 9022 .balign 128 9023.L_OP_INVOKE_SUPER_QUICK: /* 0xfa */ 9024/* File: mips/OP_INVOKE_SUPER_QUICK.S */ 9025 /* 9026 * Handle an optimized "super" method call. 9027 * 9028 * for: [opt] invoke-super-quick, invoke-super-quick/range 9029 */ 9030 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 9031 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 9032 FETCH(t0, 2) # t0 <- GFED or CCCC 9033 LOAD_rSELF_method(a2) # a2 <- current method 9034 .if (!0) 9035 and t0, t0, 15 # t0 <- D (or stays CCCC) 9036 .endif 9037 FETCH(a1, 1) # a1 <- BBBB 9038 LOAD_base_offMethod_clazz(a2, a2) # a2 <- method->clazz 9039 EXPORT_PC() # must export for invoke 9040 LOAD_base_offClassObject_super(a2, a2) # a2 <- method->clazz->super 9041 GET_VREG(rOBJ, t0) # rOBJ <- "this" 9042 LOAD_base_offClassObject_vtable(a2, a2) # a2 <- ...clazz->super->vtable 9043 # is "this" null ? 9044 LOAD_eas2(a0, a2, a1) # a0 <- super->vtable[BBBB] 9045 beqz rOBJ, common_errNullObject # "this" is null, throw exception 9046 b common_invokeMethodNoRange # (a0=method, rOBJ="this") 9047 9048 9049/* ------------------------------ */ 9050 .balign 128 9051.L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */ 9052/* File: mips/OP_INVOKE_SUPER_QUICK_RANGE.S */ 9053/* File: mips/OP_INVOKE_SUPER_QUICK.S */ 9054 /* 9055 * Handle an optimized "super" method call. 9056 * 9057 * for: [opt] invoke-super-quick, invoke-super-quick/range 9058 */ 9059 # op vB, {vD, vE, vF, vG, vA}, class /* CCCC */ 9060 # op vAA, {vCCCC..v(CCCC+AA-1)}, meth /* BBBB */ 9061 FETCH(t0, 2) # t0 <- GFED or CCCC 9062 LOAD_rSELF_method(a2) # a2 <- current method 9063 .if (!1) 9064 and t0, t0, 15 # t0 <- D (or stays CCCC) 9065 .endif 9066 FETCH(a1, 1) # a1 <- BBBB 9067 LOAD_base_offMethod_clazz(a2, a2) # a2 <- method->clazz 9068 EXPORT_PC() # must export for invoke 9069 LOAD_base_offClassObject_super(a2, a2) # a2 <- method->clazz->super 9070 GET_VREG(rOBJ, t0) # rOBJ <- "this" 9071 LOAD_base_offClassObject_vtable(a2, a2) # a2 <- ...clazz->super->vtable 9072 # is "this" null ? 9073 LOAD_eas2(a0, a2, a1) # a0 <- super->vtable[BBBB] 9074 beqz rOBJ, common_errNullObject # "this" is null, throw exception 9075 b common_invokeMethodRange # (a0=method, rOBJ="this") 9076 9077 9078 9079/* ------------------------------ */ 9080 .balign 128 9081.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */ 9082/* File: mips/OP_IPUT_OBJECT_VOLATILE.S */ 9083/* File: mips/OP_IPUT_OBJECT.S */ 9084 /* 9085 * 32-bit instance field put. 9086 * 9087 * for: iput-object, iput-object-volatile 9088 */ 9089 # op vA, vB, field /* CCCC */ 9090 GET_OPB(a0) # a0 <- B 9091 LOAD_rSELF_methodClassDex(a3) # a3 <- DvmDex 9092 FETCH(a1, 1) # a1 <- field ref CCCC 9093 LOAD_base_offDvmDex_pResFields(a2, a3) # a2 <- pDvmDex->pResFields 9094 GET_VREG(rOBJ, a0) # rOBJ <- fp[B], the object pointer 9095 LOAD_eas2(a0, a2, a1) # a0 <- resolved InstField ptr 9096 # is resolved entry null? 9097 bnez a0, .LOP_IPUT_OBJECT_VOLATILE_finish # no, already resolved 9098 LOAD_rSELF_method(a2) # a2 <- current method 9099 EXPORT_PC() # resolve() could throw 9100 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 9101 JAL(dvmResolveInstField) # v0 <- resolved InstField ptr 9102 # success? 9103 move a0, v0 9104 bnez v0, .LOP_IPUT_OBJECT_VOLATILE_finish # yes, finish up 9105 b common_exceptionThrown 9106 9107 9108/* ------------------------------ */ 9109 .balign 128 9110.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */ 9111/* File: mips/OP_SGET_OBJECT_VOLATILE.S */ 9112/* File: mips/OP_SGET.S */ 9113 /* 9114 * General 32-bit SGET handler. 9115 * 9116 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short 9117 */ 9118 # op vAA, field /* BBBB */ 9119 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 9120 FETCH(a1, 1) # a1 <- field ref BBBB 9121 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 9122 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 9123 # is resolved entry !null? 9124 bnez a0, .LOP_SGET_OBJECT_VOLATILE_finish 9125 9126 /* 9127 * Continuation if the field has not yet been resolved. 9128 * a1: BBBB field ref 9129 * rBIX: dvmDex->pResFields 9130 */ 9131 LOAD_rSELF_method(a2) # a2 <- current method 9132#if defined(WITH_JIT) 9133 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 9134#endif 9135 EXPORT_PC() # resolve() could throw, so export now 9136 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 9137 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 9138 move a0, v0 9139 # success? 9140 beqz v0, common_exceptionThrown # no, handle exception 9141#if defined(WITH_JIT) 9142 /* 9143 * If the JIT is actively building a trace we need to make sure 9144 * that the field is fully resolved before including this instruction. 9145 */ 9146 JAL(common_verifyField) 9147#endif 9148 b .LOP_SGET_OBJECT_VOLATILE_finish # resume 9149 9150 9151/* ------------------------------ */ 9152 .balign 128 9153.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */ 9154/* File: mips/OP_SPUT_OBJECT_VOLATILE.S */ 9155/* File: mips/OP_SPUT_OBJECT.S */ 9156 /* 9157 * General 32-bit SPUT handler. 9158 * 9159 * for: sput-object, sput-object-volatile 9160 */ 9161 /* op vAA, field@BBBB */ 9162 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 9163 FETCH(a1, 1) # a1 <- field ref BBBB 9164 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 9165 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 9166 bnez a0, .LOP_SPUT_OBJECT_VOLATILE_finish # is resolved entry null? 9167 9168 /* Continuation if the field has not yet been resolved. 9169 * a1: BBBB field ref 9170 * rBIX: dvmDex->pResFields 9171 */ 9172 LOAD_rSELF_method(a2) # a2 <- current method 9173#if defined(WITH_JIT) 9174 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 9175#endif 9176 EXPORT_PC() # resolve() may throw, so export now 9177 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 9178 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 9179 move a0, v0 9180 beqz v0, common_exceptionThrown # success? no, handle exception 9181#if defined(WITH_JIT) 9182 /* 9183 * If the JIT is actively building a trace we need to make sure 9184 * that the field is fully resolved before including this instruction. 9185 */ 9186 JAL(common_verifyField) 9187#endif 9188 b .LOP_SPUT_OBJECT_VOLATILE_finish # resume 9189 9190 9191 9192/* ------------------------------ */ 9193 .balign 128 9194.L_OP_UNUSED_FF: /* 0xff */ 9195/* File: mips/OP_UNUSED_FF.S */ 9196/* File: mips/unused.S */ 9197 BAL(common_abort) 9198 9199 9200 9201 .balign 128 9202 .size dvmAsmInstructionStart, .-dvmAsmInstructionStart 9203 .global dvmAsmInstructionEnd 9204dvmAsmInstructionEnd: 9205 9206/* 9207 * =========================================================================== 9208 * Sister implementations 9209 * =========================================================================== 9210 */ 9211 .global dvmAsmSisterStart 9212 .type dvmAsmSisterStart, %function 9213 .text 9214 .balign 4 9215dvmAsmSisterStart: 9216 9217/* continuation for OP_CHECK_CAST */ 9218 9219.LOP_CHECK_CAST_castfailure: 9220 # A cast has failed. We need to throw a ClassCastException with the 9221 # class of the object that failed to be cast. 9222 EXPORT_PC() # about to throw 9223 LOAD_base_offObject_clazz(a0, rOBJ) # a0 <- obj->clazz 9224 move a1,rBIX # r1<- desired class 9225 JAL(dvmThrowClassCastException) 9226 b common_exceptionThrown 9227 9228 /* 9229 * Resolution required. This is the least-likely path. 9230 * 9231 * a2 holds BBBB 9232 * rOBJ holds object 9233 */ 9234.LOP_CHECK_CAST_resolve: 9235 EXPORT_PC() # resolve() could throw 9236 LOAD_rSELF_method(a3) # a3 <- self->method 9237 move a1, a2 # a1 <- BBBB 9238 li a2, 0 # a2 <- false 9239 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 9240 JAL(dvmResolveClass) # v0 <- resolved ClassObject ptr 9241 # got null? 9242 beqz v0, common_exceptionThrown # yes, handle exception 9243 move a1, v0 # a1 <- class resolved from BBB 9244 LOAD_base_offObject_clazz(a0, rOBJ) # a0 <- obj->clazz 9245 b .LOP_CHECK_CAST_resolved # pick up where we left off 9246 9247/* continuation for OP_INSTANCE_OF */ 9248 9249 /* 9250 * Trivial test failed, need to perform full check. This is common. 9251 * a0 holds obj->clazz 9252 * a1 holds class resolved from BBBB 9253 * rOBJ holds A 9254 */ 9255.LOP_INSTANCE_OF_fullcheck: 9256 JAL(dvmInstanceofNonTrivial) # v0 <- boolean result 9257 move a0, v0 # fall through to OP_INSTANCE_OF_store 9258 b .LOP_INSTANCE_OF_store 9259 9260 /* 9261 * Resolution required. This is the least-likely path. 9262 * 9263 * a3 holds BBBB 9264 * rOBJ holds A 9265 */ 9266.LOP_INSTANCE_OF_resolve: 9267 EXPORT_PC() # resolve() could throw 9268 LOAD_rSELF_method(a0) # a0 <- self->method 9269 move a1, a3 # a1 <- BBBB 9270 li a2, 1 # a2 <- true 9271 LOAD_base_offMethod_clazz(a0, a0) # a0 <- method->clazz 9272 JAL(dvmResolveClass) # v0 <- resolved ClassObject ptr 9273 # got null? 9274 move a1, v0 # a1 <- class resolved from BBB 9275 beqz v0, common_exceptionThrown # yes, handle exception 9276 GET_OPB(a3) # a3 <- B 9277 GET_VREG(a0, a3) # a0 <- vB (object) 9278 LOAD_base_offObject_clazz(a0, a0) # a0 <- obj->clazz 9279 b .LOP_INSTANCE_OF_resolved # pick up where we left off 9280 9281 9282/* continuation for OP_NEW_INSTANCE */ 9283 9284.LOP_NEW_INSTANCE_continue: 9285 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9286 GET_INST_OPCODE(t0) # extract opcode from rINST 9287 SET_VREG(v0, a3) # vAA <- v0 9288 GOTO_OPCODE(t0) # jump to next instruction 9289 9290#if defined(WITH_JIT) 9291 /* 9292 * Check to see if we need to stop the trace building early. 9293 * v0: new object 9294 * a3: vAA 9295 */ 9296.LOP_NEW_INSTANCE_jitCheck: 9297 lw a1, 0(rBIX) # reload resolved class 9298 # okay? 9299 bnez a1, .LOP_NEW_INSTANCE_continue # yes, finish 9300 move rOBJ, v0 # preserve new object 9301 move rBIX, a3 # preserve vAA 9302 move a0, rSELF 9303 move a1, rPC 9304 JAL(dvmJitEndTraceSelect) # (self, pc) 9305 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9306 GET_INST_OPCODE(t0) # extract opcode from rINST 9307 SET_VREG(rOBJ, rBIX) # vAA <- new object 9308 GOTO_OPCODE(t0) # jump to next instruction 9309#endif 9310 9311 /* 9312 * Class initialization required. 9313 * 9314 * a0 holds class object 9315 */ 9316.LOP_NEW_INSTANCE_needinit: 9317 JAL(dvmInitClass) # initialize class 9318 move a0, rOBJ # restore a0 9319 # check boolean result 9320 bnez v0, .LOP_NEW_INSTANCE_initialized # success, continue 9321 b common_exceptionThrown # failed, deal with init exception 9322 9323 9324 /* 9325 * Resolution required. This is the least-likely path. 9326 * 9327 * a1 holds BBBB 9328 */ 9329.LOP_NEW_INSTANCE_resolve: 9330 LOAD_rSELF_method(a3) # a3 <- self->method 9331 li a2, 0 # a2 <- false 9332 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 9333 JAL(dvmResolveClass) # v0 <- resolved ClassObject ptr 9334 move a0, v0 9335 # got null? 9336 bnez v0, .LOP_NEW_INSTANCE_resolved # no, continue 9337 b common_exceptionThrown # yes, handle exception 9338 9339/* continuation for OP_NEW_ARRAY */ 9340 9341 /* 9342 * Resolve class. (This is an uncommon case.) 9343 * 9344 * a1 holds array length 9345 * a2 holds class ref CCCC 9346 */ 9347.LOP_NEW_ARRAY_resolve: 9348 LOAD_rSELF_method(a3) # a3 <- self->method 9349 move rOBJ, a1 # rOBJ <- length (save) 9350 move a1, a2 # a1 <- CCCC 9351 li a2, 0 # a2 <- false 9352 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 9353 JAL(dvmResolveClass) # v0 <- call(clazz, ref) 9354 move a1, rOBJ # a1 <- length (restore) 9355 # got null? 9356 beqz v0, common_exceptionThrown # yes, handle exception 9357 move a0, v0 9358 b .LOP_NEW_ARRAY_finish # continue with OP_NEW_ARRAY_finish 9359 9360 9361 9362/* continuation for OP_FILLED_NEW_ARRAY */ 9363 9364 /* 9365 * On entry: 9366 * a0 holds array class 9367 * rOBJ holds AA or BA 9368 */ 9369.LOP_FILLED_NEW_ARRAY_continue: 9370 LOAD_base_offClassObject_descriptor(a3, a0) # a3 <- arrayClass->descriptor 9371 li a2, ALLOC_DONT_TRACK # a2 <- alloc flags 9372 lbu rINST, 1(a3) # rINST <- descriptor[1] 9373 .if 0 9374 move a1, rOBJ # a1 <- AA (length) 9375 .else 9376 srl a1, rOBJ, 4 # rOBJ <- B (length) 9377 .endif 9378 seq t0, rINST, 'I' # array of ints? 9379 seq t1, rINST, 'L' # array of objects? 9380 or t0, t1 9381 seq t1, rINST, '[' # array of arrays? 9382 or t0, t1 9383 move rBIX, a1 # save length in rBIX 9384 beqz t0, .LOP_FILLED_NEW_ARRAY_notimpl # no, not handled yet 9385 JAL(dvmAllocArrayByClass) # v0 <- call(arClass, length, flags) 9386 # null return? 9387 beqz v0, common_exceptionThrown # alloc failed, handle exception 9388 9389 FETCH(a1, 2) # a1 <- FEDC or CCCC 9390 sw v0, offThread_retval(rSELF) # retval.l <- new array 9391 sw rINST, (offThread_retval+4)(rSELF) # retval.h <- type 9392 addu a0, v0, offArrayObject_contents # a0 <- newArray->contents 9393 subu rBIX, rBIX, 1 # length--, check for neg 9394 FETCH_ADVANCE_INST(3) # advance to next instr, load rINST 9395 bltz rBIX, 2f # was zero, bail 9396 9397 # copy values from registers into the array 9398 # a0=array, a1=CCCC/FEDC, t0=length (from AA or B), rOBJ=AA/BA 9399 move t0, rBIX 9400 .if 0 9401 EAS2(a2, rFP, a1) # a2 <- &fp[CCCC] 94021: 9403 lw a3, 0(a2) # a3 <- *a2++ 9404 addu a2, 4 9405 subu t0, t0, 1 # count-- 9406 sw a3, (a0) # *contents++ = vX 9407 addu a0, 4 9408 bgez t0, 1b 9409 9410 # continue at 2 9411 .else 9412 slt t1, t0, 4 # length was initially 5? 9413 and a2, rOBJ, 15 # a2 <- A 9414 bnez t1, 1f # <= 4 args, branch 9415 GET_VREG(a3, a2) # a3 <- vA 9416 subu t0, t0, 1 # count-- 9417 sw a3, 16(a0) # contents[4] = vA 94181: 9419 and a2, a1, 15 # a2 <- F/E/D/C 9420 GET_VREG(a3, a2) # a3 <- vF/vE/vD/vC 9421 srl a1, a1, 4 # a1 <- next reg in low 4 9422 subu t0, t0, 1 # count-- 9423 sw a3, 0(a0) # *contents++ = vX 9424 addu a0, a0, 4 9425 bgez t0, 1b 9426 # continue at 2 9427 .endif 9428 94292: 9430 lw a0, offThread_retval(rSELF) # a0 <- object 9431 lw a1, (offThread_retval+4)(rSELF) # a1 <- type 9432 seq t1, a1, 'I' # Is int array? 9433 bnez t1, 3f 9434 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 9435 srl t3, a0, GC_CARD_SHIFT 9436 addu t2, a2, t3 9437 sb a2, (t2) 94383: 9439 GET_INST_OPCODE(t0) # ip <- opcode from rINST 9440 GOTO_OPCODE(t0) # execute it 9441 9442 9443 /* 9444 * Throw an exception indicating that we have not implemented this 9445 * mode of filled-new-array. 9446 */ 9447.LOP_FILLED_NEW_ARRAY_notimpl: 9448 la a0, .LstrFilledNewArrayNotImpl 9449 JAL(dvmThrowInternalError) 9450 b common_exceptionThrown 9451 9452 /* 9453 * Ideally we'd only define this once, but depending on layout we can 9454 * exceed the range of the load above. 9455 */ 9456 9457/* continuation for OP_FILLED_NEW_ARRAY_RANGE */ 9458 9459 /* 9460 * On entry: 9461 * a0 holds array class 9462 * rOBJ holds AA or BA 9463 */ 9464.LOP_FILLED_NEW_ARRAY_RANGE_continue: 9465 LOAD_base_offClassObject_descriptor(a3, a0) # a3 <- arrayClass->descriptor 9466 li a2, ALLOC_DONT_TRACK # a2 <- alloc flags 9467 lbu rINST, 1(a3) # rINST <- descriptor[1] 9468 .if 1 9469 move a1, rOBJ # a1 <- AA (length) 9470 .else 9471 srl a1, rOBJ, 4 # rOBJ <- B (length) 9472 .endif 9473 seq t0, rINST, 'I' # array of ints? 9474 seq t1, rINST, 'L' # array of objects? 9475 or t0, t1 9476 seq t1, rINST, '[' # array of arrays? 9477 or t0, t1 9478 move rBIX, a1 # save length in rBIX 9479 beqz t0, .LOP_FILLED_NEW_ARRAY_RANGE_notimpl # no, not handled yet 9480 JAL(dvmAllocArrayByClass) # v0 <- call(arClass, length, flags) 9481 # null return? 9482 beqz v0, common_exceptionThrown # alloc failed, handle exception 9483 9484 FETCH(a1, 2) # a1 <- FEDC or CCCC 9485 sw v0, offThread_retval(rSELF) # retval.l <- new array 9486 sw rINST, (offThread_retval+4)(rSELF) # retval.h <- type 9487 addu a0, v0, offArrayObject_contents # a0 <- newArray->contents 9488 subu rBIX, rBIX, 1 # length--, check for neg 9489 FETCH_ADVANCE_INST(3) # advance to next instr, load rINST 9490 bltz rBIX, 2f # was zero, bail 9491 9492 # copy values from registers into the array 9493 # a0=array, a1=CCCC/FEDC, t0=length (from AA or B), rOBJ=AA/BA 9494 move t0, rBIX 9495 .if 1 9496 EAS2(a2, rFP, a1) # a2 <- &fp[CCCC] 94971: 9498 lw a3, 0(a2) # a3 <- *a2++ 9499 addu a2, 4 9500 subu t0, t0, 1 # count-- 9501 sw a3, (a0) # *contents++ = vX 9502 addu a0, 4 9503 bgez t0, 1b 9504 9505 # continue at 2 9506 .else 9507 slt t1, t0, 4 # length was initially 5? 9508 and a2, rOBJ, 15 # a2 <- A 9509 bnez t1, 1f # <= 4 args, branch 9510 GET_VREG(a3, a2) # a3 <- vA 9511 subu t0, t0, 1 # count-- 9512 sw a3, 16(a0) # contents[4] = vA 95131: 9514 and a2, a1, 15 # a2 <- F/E/D/C 9515 GET_VREG(a3, a2) # a3 <- vF/vE/vD/vC 9516 srl a1, a1, 4 # a1 <- next reg in low 4 9517 subu t0, t0, 1 # count-- 9518 sw a3, 0(a0) # *contents++ = vX 9519 addu a0, a0, 4 9520 bgez t0, 1b 9521 # continue at 2 9522 .endif 9523 95242: 9525 lw a0, offThread_retval(rSELF) # a0 <- object 9526 lw a1, (offThread_retval+4)(rSELF) # a1 <- type 9527 seq t1, a1, 'I' # Is int array? 9528 bnez t1, 3f 9529 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 9530 srl t3, a0, GC_CARD_SHIFT 9531 addu t2, a2, t3 9532 sb a2, (t2) 95333: 9534 GET_INST_OPCODE(t0) # ip <- opcode from rINST 9535 GOTO_OPCODE(t0) # execute it 9536 9537 9538 /* 9539 * Throw an exception indicating that we have not implemented this 9540 * mode of filled-new-array. 9541 */ 9542.LOP_FILLED_NEW_ARRAY_RANGE_notimpl: 9543 la a0, .LstrFilledNewArrayNotImpl 9544 JAL(dvmThrowInternalError) 9545 b common_exceptionThrown 9546 9547 /* 9548 * Ideally we'd only define this once, but depending on layout we can 9549 * exceed the range of the load above. 9550 */ 9551 9552/* continuation for OP_CMPL_FLOAT */ 9553 9554OP_CMPL_FLOAT_nan: 9555 li rTEMP, -1 9556 b OP_CMPL_FLOAT_finish 9557 9558#ifdef SOFT_FLOAT 9559OP_CMPL_FLOAT_continue: 9560 JAL(__gtsf2) # v0 <- (vBB > vCC) 9561 li rTEMP, 1 # rTEMP = 1 if v0 != 0 9562 bgtz v0, OP_CMPL_FLOAT_finish 9563 b OP_CMPL_FLOAT_nan 9564#endif 9565 9566OP_CMPL_FLOAT_finish: 9567 GET_OPA(t0) 9568 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9569 SET_VREG(rTEMP, t0) # vAA <- rTEMP 9570 GET_INST_OPCODE(t0) # extract opcode from rINST 9571 GOTO_OPCODE(t0) 9572 9573/* continuation for OP_CMPG_FLOAT */ 9574 9575OP_CMPG_FLOAT_nan: 9576 li rTEMP, 1 9577 b OP_CMPG_FLOAT_finish 9578 9579#ifdef SOFT_FLOAT 9580OP_CMPG_FLOAT_continue: 9581 JAL(__gtsf2) # v0 <- (vBB > vCC) 9582 li rTEMP, 1 # rTEMP = 1 if v0 != 0 9583 bgtz v0, OP_CMPG_FLOAT_finish 9584 b OP_CMPG_FLOAT_nan 9585#endif 9586 9587OP_CMPG_FLOAT_finish: 9588 GET_OPA(t0) 9589 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9590 SET_VREG(rTEMP, t0) # vAA <- rTEMP 9591 GET_INST_OPCODE(t0) # extract opcode from rINST 9592 GOTO_OPCODE(t0) 9593 9594/* continuation for OP_CMPL_DOUBLE */ 9595 9596OP_CMPL_DOUBLE_nan: 9597 li rTEMP, -1 9598 b OP_CMPL_DOUBLE_finish 9599 9600#ifdef SOFT_FLOAT 9601OP_CMPL_DOUBLE_continue: 9602 LOAD64(rARG2, rARG3, rBIX) # a2/a3 <- vCC/vCC+1 9603 JAL(__gtdf2) # fallthru 9604 li rTEMP, 1 # rTEMP = 1 if v0 != 0 9605 blez v0, OP_CMPL_DOUBLE_nan # fall thru for finish 9606#endif 9607 9608OP_CMPL_DOUBLE_finish: 9609 GET_OPA(rOBJ) 9610 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9611 GET_INST_OPCODE(t0) # extract opcode from rINST 9612 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP 9613 9614/* continuation for OP_CMPG_DOUBLE */ 9615 9616OP_CMPG_DOUBLE_nan: 9617 li rTEMP, 1 9618 b OP_CMPG_DOUBLE_finish 9619 9620#ifdef SOFT_FLOAT 9621OP_CMPG_DOUBLE_continue: 9622 LOAD64(rARG2, rARG3, rBIX) # a2/a3 <- vCC/vCC+1 9623 JAL(__gtdf2) # fallthru 9624 li rTEMP, 1 # rTEMP = 1 if v0 != 0 9625 blez v0, OP_CMPG_DOUBLE_nan # fall thru for finish 9626#endif 9627 9628OP_CMPG_DOUBLE_finish: 9629 GET_OPA(rOBJ) 9630 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9631 GET_INST_OPCODE(t0) # extract opcode from rINST 9632 SET_VREG_GOTO(rTEMP, rOBJ, t0) # vAA <- rTEMP 9633 9634/* continuation for OP_APUT_OBJECT */ 9635.LOP_APUT_OBJECT_checks: 9636 LOAD_base_offObject_clazz(a0, rBIX) # a0 <- obj->clazz 9637 LOAD_base_offObject_clazz(a1, rINST) # a1 <- arrayObj->clazz 9638 JAL(dvmCanPutArrayElement) # test object type vs. array type 9639 beqz v0, .LOP_APUT_OBJECT_throw # okay ? 9640 lw a2, offThread_cardTable(rSELF) 9641 srl t1, rINST, GC_CARD_SHIFT 9642 addu t2, a2, t1 9643 sb a2, (t2) 9644 b .LOP_APUT_OBJECT_finish # yes, skip type checks 9645.LOP_APUT_OBJECT_throw: 9646 LOAD_base_offObject_clazz(a0, rBIX) # a0 <- obj->clazz 9647 LOAD_base_offObject_clazz(a1, rINST) # a1 <- arrayObj->clazz 9648 EXPORT_PC() 9649 JAL(dvmThrowArrayStoreExceptionIncompatibleElement) 9650 b common_exceptionThrown 9651 9652/* continuation for OP_IGET */ 9653 9654 /* 9655 * Currently: 9656 * v0 holds resolved field 9657 * rOBJ holds object (caller saved) 9658 */ 9659.LOP_IGET_finish: 9660 #BAL(common_squeak0) 9661 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9662 # check object for null 9663 beqz rOBJ, common_errNullObject # object was null 9664 addu a3, a3, rOBJ # form address 9665 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 9666 # noop # acquiring load 9667 GET_OPA4(a2) # a2 <- A+ 9668 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9669 GET_INST_OPCODE(t0) # extract opcode from rINST 9670 SET_VREG(a0, a2) # fp[A] <- a0 9671 GOTO_OPCODE(t0) # jump to next instruction 9672 9673 9674/* continuation for OP_IGET_WIDE */ 9675 9676 /* 9677 * Currently: 9678 * a0 holds resolved field 9679 * rOBJ holds object 9680 */ 9681.LOP_IGET_WIDE_finish: 9682 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9683 beqz rOBJ, common_errNullObject # object was null 9684 GET_OPA4(a2) # a2 <- A+ 9685 addu rOBJ, rOBJ, a3 # form address 9686 .if 0 9687 vLOAD64(a0, a1, rOBJ) # a0/a1 <- obj.field (64-bit align ok) 9688 .else 9689 LOAD64(a0, a1, rOBJ) # a0/a1 <- obj.field (64-bit align ok) 9690 .endif 9691 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9692 EAS2(a3, rFP, a2) # a3 <- &fp[A] 9693 GET_INST_OPCODE(t0) # extract opcode from rINST 9694 STORE64(a0, a1, a3) # fp[A] <- a0/a1 9695 GOTO_OPCODE(t0) # jump to next instruction 9696 9697 9698/* continuation for OP_IGET_OBJECT */ 9699 9700 /* 9701 * Currently: 9702 * v0 holds resolved field 9703 * rOBJ holds object (caller saved) 9704 */ 9705.LOP_IGET_OBJECT_finish: 9706 #BAL(common_squeak0) 9707 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9708 # check object for null 9709 beqz rOBJ, common_errNullObject # object was null 9710 addu a3, a3, rOBJ # form address 9711 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 9712 # noop # acquiring load 9713 GET_OPA4(a2) # a2 <- A+ 9714 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9715 GET_INST_OPCODE(t0) # extract opcode from rINST 9716 SET_VREG(a0, a2) # fp[A] <- a0 9717 GOTO_OPCODE(t0) # jump to next instruction 9718 9719 9720/* continuation for OP_IGET_BOOLEAN */ 9721 9722 /* 9723 * Currently: 9724 * v0 holds resolved field 9725 * rOBJ holds object (caller saved) 9726 */ 9727.LOP_IGET_BOOLEAN_finish: 9728 #BAL(common_squeak0) 9729 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9730 # check object for null 9731 beqz rOBJ, common_errNullObject # object was null 9732 addu a3, a3, rOBJ # form address 9733 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 9734 # noop # acquiring load 9735 GET_OPA4(a2) # a2 <- A+ 9736 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9737 GET_INST_OPCODE(t0) # extract opcode from rINST 9738 SET_VREG(a0, a2) # fp[A] <- a0 9739 GOTO_OPCODE(t0) # jump to next instruction 9740 9741 9742/* continuation for OP_IGET_BYTE */ 9743 9744 /* 9745 * Currently: 9746 * v0 holds resolved field 9747 * rOBJ holds object (caller saved) 9748 */ 9749.LOP_IGET_BYTE_finish: 9750 #BAL(common_squeak0) 9751 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9752 # check object for null 9753 beqz rOBJ, common_errNullObject # object was null 9754 addu a3, a3, rOBJ # form address 9755 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 9756 # noop # acquiring load 9757 GET_OPA4(a2) # a2 <- A+ 9758 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9759 GET_INST_OPCODE(t0) # extract opcode from rINST 9760 SET_VREG(a0, a2) # fp[A] <- a0 9761 GOTO_OPCODE(t0) # jump to next instruction 9762 9763 9764/* continuation for OP_IGET_CHAR */ 9765 9766 /* 9767 * Currently: 9768 * v0 holds resolved field 9769 * rOBJ holds object (caller saved) 9770 */ 9771.LOP_IGET_CHAR_finish: 9772 #BAL(common_squeak0) 9773 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9774 # check object for null 9775 beqz rOBJ, common_errNullObject # object was null 9776 addu a3, a3, rOBJ # form address 9777 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 9778 # noop # acquiring load 9779 GET_OPA4(a2) # a2 <- A+ 9780 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9781 GET_INST_OPCODE(t0) # extract opcode from rINST 9782 SET_VREG(a0, a2) # fp[A] <- a0 9783 GOTO_OPCODE(t0) # jump to next instruction 9784 9785 9786/* continuation for OP_IGET_SHORT */ 9787 9788 /* 9789 * Currently: 9790 * v0 holds resolved field 9791 * rOBJ holds object (caller saved) 9792 */ 9793.LOP_IGET_SHORT_finish: 9794 #BAL(common_squeak0) 9795 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9796 # check object for null 9797 beqz rOBJ, common_errNullObject # object was null 9798 addu a3, a3, rOBJ # form address 9799 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 9800 # noop # acquiring load 9801 GET_OPA4(a2) # a2 <- A+ 9802 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9803 GET_INST_OPCODE(t0) # extract opcode from rINST 9804 SET_VREG(a0, a2) # fp[A] <- a0 9805 GOTO_OPCODE(t0) # jump to next instruction 9806 9807 9808/* continuation for OP_IPUT */ 9809 9810 /* 9811 * Currently: 9812 * a0 holds resolved field 9813 * rOBJ holds object 9814 */ 9815.LOP_IPUT_finish: 9816 #BAL(common_squeak0) 9817 GET_OPA4(a1) # a1 <- A+ 9818 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9819 GET_VREG(a0, a1) # a0 <- fp[A] 9820 # check object for null 9821 beqz rOBJ, common_errNullObject # object was null 9822 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9823 GET_INST_OPCODE(t0) # extract opcode from rINST 9824 addu rOBJ, rOBJ, a3 # form address 9825 # noop # releasing store 9826 sw a0, (rOBJ) # obj.field (8/16/32 bits) <- a0 9827 # noop 9828 GOTO_OPCODE(t0) # jump to next instruction 9829 9830 9831/* continuation for OP_IPUT_WIDE */ 9832 9833 /* 9834 * Currently: 9835 * a0 holds resolved field 9836 * rOBJ holds object 9837 */ 9838.LOP_IPUT_WIDE_finish: 9839 GET_OPA4(a2) # a2 <- A+ 9840 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9841 EAS2(a2, rFP, a2) # a2 <- &fp[A] 9842 # check object for null 9843 beqz rOBJ, common_errNullObject # object was null 9844 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9845 LOAD64(a0, a1, a2) # a0/a1 <- fp[A] 9846 GET_INST_OPCODE(rBIX) # extract opcode from rINST 9847 addu a2, rOBJ, a3 # form address 9848 .if 0 9849 JAL(dvmQuasiAtomicSwap64Sync) # stores r0/r1 into addr r2 9850# STORE64(a0, a1, a2) # obj.field (64 bits, aligned) <- a0 a1 9851 .else 9852 STORE64(a0, a1, a2) # obj.field (64 bits, aligned) <- a0 a1 9853 .endif 9854 GOTO_OPCODE(rBIX) # jump to next instruction 9855 9856 9857/* continuation for OP_IPUT_OBJECT */ 9858 9859 /* 9860 * Currently: 9861 * a0 holds resolved field 9862 * rOBJ holds object 9863 */ 9864.LOP_IPUT_OBJECT_finish: 9865 #BAL(common_squeak0) 9866 GET_OPA4(a1) # a1 <- A+ 9867 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9868 GET_VREG(a0, a1) # a0 <- fp[A] 9869 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 9870 # check object for null 9871 beqz rOBJ, common_errNullObject # object was null 9872 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9873 GET_INST_OPCODE(t0) # extract opcode from rINST 9874 addu t2, rOBJ, a3 # form address 9875 # noop # releasing store 9876 sw a0, (t2) # obj.field (32 bits) <- a0 9877 # noop 9878 beqz a0, 1f # stored a null reference? 9879 srl t1, rOBJ, GC_CARD_SHIFT 9880 addu t2, a2, t1 9881 sb a2, (t2) # mark card if not 98821: 9883 GOTO_OPCODE(t0) # jump to next instruction 9884 9885 9886/* continuation for OP_IPUT_BOOLEAN */ 9887 9888 /* 9889 * Currently: 9890 * a0 holds resolved field 9891 * rOBJ holds object 9892 */ 9893.LOP_IPUT_BOOLEAN_finish: 9894 #BAL(common_squeak0) 9895 GET_OPA4(a1) # a1 <- A+ 9896 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9897 GET_VREG(a0, a1) # a0 <- fp[A] 9898 # check object for null 9899 beqz rOBJ, common_errNullObject # object was null 9900 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9901 GET_INST_OPCODE(t0) # extract opcode from rINST 9902 addu rOBJ, rOBJ, a3 # form address 9903 # noop # releasing store 9904 sw a0, (rOBJ) # obj.field (8/16/32 bits) <- a0 9905 # noop 9906 GOTO_OPCODE(t0) # jump to next instruction 9907 9908 9909/* continuation for OP_IPUT_BYTE */ 9910 9911 /* 9912 * Currently: 9913 * a0 holds resolved field 9914 * rOBJ holds object 9915 */ 9916.LOP_IPUT_BYTE_finish: 9917 #BAL(common_squeak0) 9918 GET_OPA4(a1) # a1 <- A+ 9919 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9920 GET_VREG(a0, a1) # a0 <- fp[A] 9921 # check object for null 9922 beqz rOBJ, common_errNullObject # object was null 9923 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9924 GET_INST_OPCODE(t0) # extract opcode from rINST 9925 addu rOBJ, rOBJ, a3 # form address 9926 # noop # releasing store 9927 sw a0, (rOBJ) # obj.field (8/16/32 bits) <- a0 9928 # noop 9929 GOTO_OPCODE(t0) # jump to next instruction 9930 9931 9932/* continuation for OP_IPUT_CHAR */ 9933 9934 /* 9935 * Currently: 9936 * a0 holds resolved field 9937 * rOBJ holds object 9938 */ 9939.LOP_IPUT_CHAR_finish: 9940 #BAL(common_squeak0) 9941 GET_OPA4(a1) # a1 <- A+ 9942 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9943 GET_VREG(a0, a1) # a0 <- fp[A] 9944 # check object for null 9945 beqz rOBJ, common_errNullObject # object was null 9946 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9947 GET_INST_OPCODE(t0) # extract opcode from rINST 9948 addu rOBJ, rOBJ, a3 # form address 9949 # noop # releasing store 9950 sw a0, (rOBJ) # obj.field (8/16/32 bits) <- a0 9951 # noop 9952 GOTO_OPCODE(t0) # jump to next instruction 9953 9954 9955/* continuation for OP_IPUT_SHORT */ 9956 9957 /* 9958 * Currently: 9959 * a0 holds resolved field 9960 * rOBJ holds object 9961 */ 9962.LOP_IPUT_SHORT_finish: 9963 #BAL(common_squeak0) 9964 GET_OPA4(a1) # a1 <- A+ 9965 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 9966 GET_VREG(a0, a1) # a0 <- fp[A] 9967 # check object for null 9968 beqz rOBJ, common_errNullObject # object was null 9969 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9970 GET_INST_OPCODE(t0) # extract opcode from rINST 9971 addu rOBJ, rOBJ, a3 # form address 9972 # noop # releasing store 9973 sw a0, (rOBJ) # obj.field (8/16/32 bits) <- a0 9974 # noop 9975 GOTO_OPCODE(t0) # jump to next instruction 9976 9977 9978/* continuation for OP_SGET */ 9979 9980.LOP_SGET_finish: 9981 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 9982 # no-op # acquiring load 9983 GET_OPA(a2) # a2 <- AA 9984 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9985 GET_INST_OPCODE(t0) # extract opcode from rINST 9986 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 9987 9988/* continuation for OP_SGET_WIDE */ 9989 9990.LOP_SGET_WIDE_finish: 9991 GET_OPA(a1) # a1 <- AA 9992 .if 0 9993 vLOAD64_off(a2, a3, a0, offStaticField_value) # a2/a3 <- field value (aligned) 9994 .else 9995 LOAD64_off(a2, a3, a0, offStaticField_value) # a2/a3 <- field value (aligned) 9996 .endif 9997 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 9998 EAS2(a1, rFP, a1) # a1 <- &fp[AA] 9999 STORE64(a2, a3, a1) # vAA/vAA+1 <- a2/a3 10000 GET_INST_OPCODE(t0) # extract opcode from rINST 10001 GOTO_OPCODE(t0) # jump to next instruction 10002 10003 10004 10005/* continuation for OP_SGET_OBJECT */ 10006 10007.LOP_SGET_OBJECT_finish: 10008 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 10009 # no-op # acquiring load 10010 GET_OPA(a2) # a2 <- AA 10011 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10012 GET_INST_OPCODE(t0) # extract opcode from rINST 10013 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 10014 10015/* continuation for OP_SGET_BOOLEAN */ 10016 10017.LOP_SGET_BOOLEAN_finish: 10018 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 10019 # no-op # acquiring load 10020 GET_OPA(a2) # a2 <- AA 10021 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10022 GET_INST_OPCODE(t0) # extract opcode from rINST 10023 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 10024 10025/* continuation for OP_SGET_BYTE */ 10026 10027.LOP_SGET_BYTE_finish: 10028 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 10029 # no-op # acquiring load 10030 GET_OPA(a2) # a2 <- AA 10031 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10032 GET_INST_OPCODE(t0) # extract opcode from rINST 10033 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 10034 10035/* continuation for OP_SGET_CHAR */ 10036 10037.LOP_SGET_CHAR_finish: 10038 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 10039 # no-op # acquiring load 10040 GET_OPA(a2) # a2 <- AA 10041 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10042 GET_INST_OPCODE(t0) # extract opcode from rINST 10043 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 10044 10045/* continuation for OP_SGET_SHORT */ 10046 10047.LOP_SGET_SHORT_finish: 10048 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 10049 # no-op # acquiring load 10050 GET_OPA(a2) # a2 <- AA 10051 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10052 GET_INST_OPCODE(t0) # extract opcode from rINST 10053 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 10054 10055/* continuation for OP_SPUT */ 10056 10057.LOP_SPUT_finish: 10058 # field ptr in a0 10059 GET_OPA(a2) # a2 <- AA 10060 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10061 GET_VREG(a1, a2) # a1 <- fp[AA] 10062 GET_INST_OPCODE(t0) # extract opcode from rINST 10063 # no-op # releasing store 10064 sw a1, offStaticField_value(a0) # field <- vAA 10065 # no-op 10066 GOTO_OPCODE(t0) # jump to next instruction 10067 10068/* continuation for OP_SPUT_WIDE */ 10069 10070 /* 10071 * Continuation if the field has not yet been resolved. 10072 * a1: BBBB field ref 10073 * rOBJ: &fp[AA] 10074 * rBIX: dvmDex->pResFields 10075 * 10076 * Returns StaticField pointer in a2. 10077 */ 10078.LOP_SPUT_WIDE_resolve: 10079 LOAD_rSELF_method(a2) # a2 <- current method 10080#if defined(WITH_JIT) 10081 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 10082#endif 10083 EXPORT_PC() # resolve() could throw, so export now 10084 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 10085 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 10086 # success ? 10087 move a0, v0 10088 beqz v0, common_exceptionThrown # no, handle exception 10089#if defined(WITH_JIT) 10090 /* 10091 * If the JIT is actively building a trace we need to make sure 10092 * that the field is fully resolved before including this instruction. 10093 */ 10094 JAL(common_verifyField) 10095#endif 10096 move a2, v0 10097 b .LOP_SPUT_WIDE_finish # resume 10098 10099/* continuation for OP_SPUT_OBJECT */ 10100.LOP_SPUT_OBJECT_finish: # field ptr in a0 10101 GET_OPA(a2) # a2 <- AA 10102 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10103 GET_VREG(a1, a2) # a1 <- fp[AA] 10104 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 10105 lw t1, offField_clazz(a0) # t1 <- field->clazz 10106 GET_INST_OPCODE(t0) # extract opcode from rINST 10107 # no-op # releasing store 10108 sw a1, offStaticField_value(a0) # field <- vAA 10109 # no-op 10110 beqz a1, 1f 10111 srl t2, t1, GC_CARD_SHIFT 10112 addu t3, a2, t2 10113 sb a2, (t3) 101141: 10115 GOTO_OPCODE(t0) # jump to next instruction 10116 10117/* continuation for OP_SPUT_BOOLEAN */ 10118 10119.LOP_SPUT_BOOLEAN_finish: 10120 # field ptr in a0 10121 GET_OPA(a2) # a2 <- AA 10122 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10123 GET_VREG(a1, a2) # a1 <- fp[AA] 10124 GET_INST_OPCODE(t0) # extract opcode from rINST 10125 # no-op # releasing store 10126 sw a1, offStaticField_value(a0) # field <- vAA 10127 # no-op 10128 GOTO_OPCODE(t0) # jump to next instruction 10129 10130/* continuation for OP_SPUT_BYTE */ 10131 10132.LOP_SPUT_BYTE_finish: 10133 # field ptr in a0 10134 GET_OPA(a2) # a2 <- AA 10135 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10136 GET_VREG(a1, a2) # a1 <- fp[AA] 10137 GET_INST_OPCODE(t0) # extract opcode from rINST 10138 # no-op # releasing store 10139 sw a1, offStaticField_value(a0) # field <- vAA 10140 # no-op 10141 GOTO_OPCODE(t0) # jump to next instruction 10142 10143/* continuation for OP_SPUT_CHAR */ 10144 10145.LOP_SPUT_CHAR_finish: 10146 # field ptr in a0 10147 GET_OPA(a2) # a2 <- AA 10148 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10149 GET_VREG(a1, a2) # a1 <- fp[AA] 10150 GET_INST_OPCODE(t0) # extract opcode from rINST 10151 # no-op # releasing store 10152 sw a1, offStaticField_value(a0) # field <- vAA 10153 # no-op 10154 GOTO_OPCODE(t0) # jump to next instruction 10155 10156/* continuation for OP_SPUT_SHORT */ 10157 10158.LOP_SPUT_SHORT_finish: 10159 # field ptr in a0 10160 GET_OPA(a2) # a2 <- AA 10161 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10162 GET_VREG(a1, a2) # a1 <- fp[AA] 10163 GET_INST_OPCODE(t0) # extract opcode from rINST 10164 # no-op # releasing store 10165 sw a1, offStaticField_value(a0) # field <- vAA 10166 # no-op 10167 GOTO_OPCODE(t0) # jump to next instruction 10168 10169/* continuation for OP_INVOKE_VIRTUAL */ 10170 10171 /* 10172 * At this point: 10173 * a0 = resolved base method 10174 * rBIX= C or CCCC (index of first arg, which is the "this" ptr) 10175 */ 10176.LOP_INVOKE_VIRTUAL_continue: 10177 GET_VREG(rOBJ, rBIX) # rOBJ <- "this" ptr 10178 LOADu2_offMethod_methodIndex(a2, a0) # a2 <- baseMethod->methodIndex 10179 # is "this" null? 10180 beqz rOBJ, common_errNullObject # null "this", throw exception 10181 LOAD_base_offObject_clazz(a3, rOBJ) # a3 <- thisPtr->clazz 10182 LOAD_base_offClassObject_vtable(a3, a3) # a3 <- thisPtr->clazz->vtable 10183 LOAD_eas2(a0, a3, a2) # a0 <- vtable[methodIndex] 10184 b common_invokeMethodNoRange # (a0=method, rOBJ="this") 10185 10186 10187/* continuation for OP_INVOKE_SUPER */ 10188 10189 /* 10190 * At this point: 10191 * a0 = resolved base method 10192 * rBIX = method->clazz 10193 */ 10194.LOP_INVOKE_SUPER_continue: 10195 LOAD_base_offClassObject_super(a1, rBIX) # a1 <- method->clazz->super 10196 LOADu2_offMethod_methodIndex(a2, a0) # a2 <- baseMethod->methodIndex 10197 LOAD_base_offClassObject_vtableCount(a3, a1) # a3 <- super->vtableCount 10198 EXPORT_PC() # must export for invoke 10199 # compare (methodIndex, vtableCount) 10200 bgeu a2, a3, .LOP_INVOKE_SUPER_nsm # method not present in superclass 10201 LOAD_base_offClassObject_vtable(a1, a1) # a1 <- ...clazz->super->vtable 10202 LOAD_eas2(a0, a1, a2) # a0 <- vtable[methodIndex] 10203 b common_invokeMethodNoRange # continue on 10204 10205 /* 10206 * Throw a NoSuchMethodError with the method name as the message. 10207 * a0 = resolved base method 10208 */ 10209.LOP_INVOKE_SUPER_nsm: 10210 LOAD_base_offMethod_name(a1, a0) # a1 <- method name 10211 b common_errNoSuchMethod 10212 10213 10214/* continuation for OP_INVOKE_STATIC */ 10215 10216.LOP_INVOKE_STATIC_resolve: 10217 LOAD_rSELF_method(a3) # a3 <- self->method 10218 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 10219 li a2, METHOD_STATIC # resolver method type 10220 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 10221 move a0, v0 10222#if defined(WITH_JIT) 10223 /* 10224 * Check to see if we're actively building a trace. If so, 10225 * we need to keep this instruction out of it. 10226 * rBIX: &resolved_methodToCall 10227 */ 10228 lhu a2, offThread_subMode(rSELF) 10229 beqz v0, common_exceptionThrown # null, handle exception 10230 and a2, kSubModeJitTraceBuild # trace under construction? 10231 beqz a2, common_invokeMethodNoRange # no, (a0=method, rOBJ="this") 10232 lw a1, 0(rBIX) # reload resolved method 10233 # finished resloving? 10234 bnez a1, common_invokeMethodNoRange # yes, (a0=method, rOBJ="this") 10235 move rBIX, a0 # preserve method 10236 move a0, rSELF 10237 move a1, rPC 10238 JAL(dvmJitEndTraceSelect) # (self, pc) 10239 move a0, rBIX 10240 b common_invokeMethodNoRange # whew, finally! 10241#else 10242 # got null? 10243 bnez v0, common_invokeMethodNoRange # (a0=method, rOBJ="this") 10244 b common_exceptionThrown # yes, handle exception 10245#endif 10246 10247/* continuation for OP_INVOKE_VIRTUAL_RANGE */ 10248 10249 /* 10250 * At this point: 10251 * a0 = resolved base method 10252 * rBIX= C or CCCC (index of first arg, which is the "this" ptr) 10253 */ 10254.LOP_INVOKE_VIRTUAL_RANGE_continue: 10255 GET_VREG(rOBJ, rBIX) # rOBJ <- "this" ptr 10256 LOADu2_offMethod_methodIndex(a2, a0) # a2 <- baseMethod->methodIndex 10257 # is "this" null? 10258 beqz rOBJ, common_errNullObject # null "this", throw exception 10259 LOAD_base_offObject_clazz(a3, rOBJ) # a3 <- thisPtr->clazz 10260 LOAD_base_offClassObject_vtable(a3, a3) # a3 <- thisPtr->clazz->vtable 10261 LOAD_eas2(a0, a3, a2) # a0 <- vtable[methodIndex] 10262 b common_invokeMethodRange # (a0=method, rOBJ="this") 10263 10264 10265/* continuation for OP_INVOKE_SUPER_RANGE */ 10266 10267 /* 10268 * At this point: 10269 * a0 = resolved base method 10270 * rBIX = method->clazz 10271 */ 10272.LOP_INVOKE_SUPER_RANGE_continue: 10273 LOAD_base_offClassObject_super(a1, rBIX) # a1 <- method->clazz->super 10274 LOADu2_offMethod_methodIndex(a2, a0) # a2 <- baseMethod->methodIndex 10275 LOAD_base_offClassObject_vtableCount(a3, a1) # a3 <- super->vtableCount 10276 EXPORT_PC() # must export for invoke 10277 # compare (methodIndex, vtableCount) 10278 bgeu a2, a3, .LOP_INVOKE_SUPER_RANGE_nsm # method not present in superclass 10279 LOAD_base_offClassObject_vtable(a1, a1) # a1 <- ...clazz->super->vtable 10280 LOAD_eas2(a0, a1, a2) # a0 <- vtable[methodIndex] 10281 b common_invokeMethodRange # continue on 10282 10283 /* 10284 * Throw a NoSuchMethodError with the method name as the message. 10285 * a0 = resolved base method 10286 */ 10287.LOP_INVOKE_SUPER_RANGE_nsm: 10288 LOAD_base_offMethod_name(a1, a0) # a1 <- method name 10289 b common_errNoSuchMethod 10290 10291 10292/* continuation for OP_INVOKE_STATIC_RANGE */ 10293 10294.LOP_INVOKE_STATIC_RANGE_resolve: 10295 LOAD_rSELF_method(a3) # a3 <- self->method 10296 LOAD_base_offMethod_clazz(a0, a3) # a0 <- method->clazz 10297 li a2, METHOD_STATIC # resolver method type 10298 JAL(dvmResolveMethod) # v0 <- call(clazz, ref, flags) 10299 move a0, v0 10300#if defined(WITH_JIT) 10301 /* 10302 * Check to see if we're actively building a trace. If so, 10303 * we need to keep this instruction out of it. 10304 * rBIX: &resolved_methodToCall 10305 */ 10306 lhu a2, offThread_subMode(rSELF) 10307 beqz v0, common_exceptionThrown # null, handle exception 10308 and a2, kSubModeJitTraceBuild # trace under construction? 10309 beqz a2, common_invokeMethodRange # no, (a0=method, rOBJ="this") 10310 lw a1, 0(rBIX) # reload resolved method 10311 # finished resloving? 10312 bnez a1, common_invokeMethodRange # yes, (a0=method, rOBJ="this") 10313 move rBIX, a0 # preserve method 10314 move a0, rSELF 10315 move a1, rPC 10316 JAL(dvmJitEndTraceSelect) # (self, pc) 10317 move a0, rBIX 10318 b common_invokeMethodRange # whew, finally! 10319#else 10320 # got null? 10321 bnez v0, common_invokeMethodRange # (a0=method, rOBJ="this") 10322 b common_exceptionThrown # yes, handle exception 10323#endif 10324 10325/* continuation for OP_FLOAT_TO_INT */ 10326 10327/* 10328 * Not an entry point as it is used only once !! 10329 */ 10330f2i_doconv: 10331#ifdef SOFT_FLOAT 10332 li a1, 0x4f000000 # (float)maxint 10333 move rBIX, a0 10334 JAL(__gesf2) # is arg >= maxint? 10335 move t0, v0 10336 li v0, ~0x80000000 # return maxint (7fffffff) 10337 bgez t0, .LOP_FLOAT_TO_INT_set_vreg 10338 10339 move a0, rBIX # recover arg 10340 li a1, 0xcf000000 # (float)minint 10341 JAL(__lesf2) 10342 10343 move t0, v0 10344 li v0, 0x80000000 # return minint (80000000) 10345 blez t0, .LOP_FLOAT_TO_INT_set_vreg 10346 move a0, rBIX 10347 move a1, rBIX 10348 JAL(__nesf2) 10349 10350 move t0, v0 10351 li v0, 0 # return zero for NaN 10352 bnez t0, .LOP_FLOAT_TO_INT_set_vreg 10353 10354 move a0, rBIX 10355 JAL(__fixsfsi) 10356 b .LOP_FLOAT_TO_INT_set_vreg 10357#else 10358 l.s fa1, .LFLOAT_TO_INT_max 10359 c.ole.s fcc0, fa1, fa0 10360 l.s fv0, .LFLOAT_TO_INT_ret_max 10361 bc1t .LOP_FLOAT_TO_INT_set_vreg_f 10362 10363 l.s fa1, .LFLOAT_TO_INT_min 10364 c.ole.s fcc0, fa0, fa1 10365 l.s fv0, .LFLOAT_TO_INT_ret_min 10366 bc1t .LOP_FLOAT_TO_INT_set_vreg_f 10367 10368 mov.s fa1, fa0 10369 c.un.s fcc0, fa0, fa1 10370 li.s fv0, 0 10371 bc1t .LOP_FLOAT_TO_INT_set_vreg_f 10372 10373 trunc.w.s fv0, fa0 10374 b .LOP_FLOAT_TO_INT_set_vreg_f 10375#endif 10376 10377.LFLOAT_TO_INT_max: 10378 .word 0x4f000000 10379.LFLOAT_TO_INT_min: 10380 .word 0xcf000000 10381.LFLOAT_TO_INT_ret_max: 10382 .word 0x7fffffff 10383.LFLOAT_TO_INT_ret_min: 10384 .word 0x80000000 10385 10386 10387/* continuation for OP_FLOAT_TO_LONG */ 10388 10389f2l_doconv: 10390#ifdef SOFT_FLOAT 10391 li a1, 0x5f000000 10392 move rBIX, a0 10393 JAL(__gesf2) 10394 10395 move t0, v0 10396 li rRESULT0, ~0 10397 li rRESULT1, ~0x80000000 10398 bgez t0, .LOP_FLOAT_TO_LONG_set_vreg 10399 10400 move a0, rBIX 10401 li a1, 0xdf000000 10402 JAL(__lesf2) 10403 10404 move t0, v0 10405 li rRESULT0, 0 10406 li rRESULT1, 0x80000000 10407 blez t0, .LOP_FLOAT_TO_LONG_set_vreg 10408 10409 move a0, rBIX 10410 move a1, rBIX 10411 JAL(__nesf2) 10412 10413 move t0, v0 10414 li rRESULT0, 0 10415 li rRESULT1, 0 10416 bnez t0, .LOP_FLOAT_TO_LONG_set_vreg 10417 10418 move a0, rBIX 10419 JAL(__fixsfdi) 10420 10421#else 10422 l.s fa1, .LLONG_TO_max 10423 c.ole.s fcc0, fa1, fa0 10424 li rRESULT0, ~0 10425 li rRESULT1, ~0x80000000 10426 bc1t .LOP_FLOAT_TO_LONG_set_vreg 10427 10428 l.s fa1, .LLONG_TO_min 10429 c.ole.s fcc0, fa0, fa1 10430 li rRESULT0, 0 10431 li rRESULT1, 0x80000000 10432 bc1t .LOP_FLOAT_TO_LONG_set_vreg 10433 10434 mov.s fa1, fa0 10435 c.un.s fcc0, fa0, fa1 10436 li rRESULT0, 0 10437 li rRESULT1, 0 10438 bc1t .LOP_FLOAT_TO_LONG_set_vreg 10439 10440 JAL(__fixsfdi) 10441#endif 10442 10443 b .LOP_FLOAT_TO_LONG_set_vreg 10444 10445.LLONG_TO_max: 10446 .word 0x5f000000 10447 10448.LLONG_TO_min: 10449 .word 0xdf000000 10450 10451/* continuation for OP_DOUBLE_TO_INT */ 10452 10453 10454d2i_doconv: 10455#ifdef SOFT_FLOAT 10456 la t0, .LDOUBLE_TO_INT_max 10457 LOAD64(rARG2, rARG3, t0) 10458 move rBIX, rARG0 # save a0 10459 move rTEMP, rARG1 # and a1 10460 JAL(__gedf2) # is arg >= maxint? 10461 10462 move t0, v0 10463 li v0, ~0x80000000 # return maxint (7fffffff) 10464 bgez t0, .LOP_DOUBLE_TO_INT_set_vreg # nonzero == yes 10465 10466 move rARG0, rBIX # recover arg 10467 move rARG1, rTEMP 10468 la t0, .LDOUBLE_TO_INT_min 10469 LOAD64(rARG2, rARG3, t0) 10470 JAL(__ledf2) # is arg <= minint? 10471 10472 move t0, v0 10473 li v0, 0x80000000 # return minint (80000000) 10474 blez t0, .LOP_DOUBLE_TO_INT_set_vreg # nonzero == yes 10475 10476 move rARG0, rBIX # recover arg 10477 move rARG1, rTEMP 10478 move rARG2, rBIX # compare against self 10479 move rARG3, rTEMP 10480 JAL(__nedf2) # is arg == self? 10481 10482 move t0, v0 # zero == no 10483 li v0, 0 10484 bnez t0, .LOP_DOUBLE_TO_INT_set_vreg # return zero for NaN 10485 10486 move rARG0, rBIX # recover arg 10487 move rARG1, rTEMP 10488 JAL(__fixdfsi) # convert double to int 10489 b .LOP_DOUBLE_TO_INT_set_vreg 10490#else 10491 la t0, .LDOUBLE_TO_INT_max 10492 LOAD64_F(fa1, fa1f, t0) 10493 c.ole.d fcc0, fa1, fa0 10494 l.s fv0, .LDOUBLE_TO_INT_maxret 10495 bc1t .LOP_DOUBLE_TO_INT_set_vreg_f 10496 10497 la t0, .LDOUBLE_TO_INT_min 10498 LOAD64_F(fa1, fa1f, t0) 10499 c.ole.d fcc0, fa0, fa1 10500 l.s fv0, .LDOUBLE_TO_INT_minret 10501 bc1t .LOP_DOUBLE_TO_INT_set_vreg_f 10502 10503 mov.d fa1, fa0 10504 c.un.d fcc0, fa0, fa1 10505 li.s fv0, 0 10506 bc1t .LOP_DOUBLE_TO_INT_set_vreg_f 10507 10508 trunc.w.d fv0, fa0 10509 b .LOP_DOUBLE_TO_INT_set_vreg_f 10510#endif 10511 10512 10513.LDOUBLE_TO_INT_max: 10514 .dword 0x41dfffffffc00000 10515.LDOUBLE_TO_INT_min: 10516 .dword 0xc1e0000000000000 # minint, as a double (high word) 10517.LDOUBLE_TO_INT_maxret: 10518 .word 0x7fffffff 10519.LDOUBLE_TO_INT_minret: 10520 .word 0x80000000 10521 10522/* continuation for OP_DOUBLE_TO_LONG */ 10523 10524d2l_doconv: 10525#ifdef SOFT_FLOAT 10526 la t0, .LDOUBLE_TO_LONG_max 10527 LOAD64(rARG2, rARG3, t0) 10528 move rBIX, rARG0 # save a0 10529 move rTEMP, rARG1 # and a1 10530 JAL(__gedf2) 10531 10532 move t1, v0 10533 la t0, .LDOUBLE_TO_LONG_ret_max 10534 LOAD64(rRESULT0, rRESULT1, t0) 10535 bgez t1, .LOP_DOUBLE_TO_LONG_set_vreg 10536 10537 move rARG0, rBIX 10538 move rARG1, rTEMP 10539 la t0, .LDOUBLE_TO_LONG_min 10540 LOAD64(rARG2, rARG3, t0) 10541 JAL(__ledf2) 10542 10543 move t1, v0 10544 la t0, .LDOUBLE_TO_LONG_ret_min 10545 LOAD64(rRESULT0, rRESULT1, t0) 10546 blez t1, .LOP_DOUBLE_TO_LONG_set_vreg 10547 10548 move rARG0, rBIX 10549 move rARG1, rTEMP 10550 move rARG2, rBIX 10551 move rARG3, rTEMP 10552 JAL(__nedf2) 10553 10554 move t0, v0 10555 li rRESULT0, 0 10556 li rRESULT1, 0 10557 bnez t0, .LOP_DOUBLE_TO_LONG_set_vreg 10558 10559 move rARG0, rBIX 10560 move rARG1, rTEMP 10561 JAL(__fixdfdi) 10562 10563#else 10564 la t0, .LDOUBLE_TO_LONG_max 10565 LOAD64_F(fa1, fa1f, t0) 10566 c.ole.d fcc0, fa1, fa0 10567 la t0, .LDOUBLE_TO_LONG_ret_max 10568 LOAD64(rRESULT0, rRESULT1, t0) 10569 bc1t .LOP_DOUBLE_TO_LONG_set_vreg 10570 10571 la t0, .LDOUBLE_TO_LONG_min 10572 LOAD64_F(fa1, fa1f, t0) 10573 c.ole.d fcc0, fa0, fa1 10574 la t0, .LDOUBLE_TO_LONG_ret_min 10575 LOAD64(rRESULT0, rRESULT1, t0) 10576 bc1t .LOP_DOUBLE_TO_LONG_set_vreg 10577 10578 mov.d fa1, fa0 10579 c.un.d fcc0, fa0, fa1 10580 li rRESULT0, 0 10581 li rRESULT1, 0 10582 bc1t .LOP_DOUBLE_TO_LONG_set_vreg 10583 JAL(__fixdfdi) 10584#endif 10585 b .LOP_DOUBLE_TO_LONG_set_vreg 10586 10587 10588.LDOUBLE_TO_LONG_max: 10589 .dword 0x43e0000000000000 # maxlong, as a double (high word) 10590.LDOUBLE_TO_LONG_min: 10591 .dword 0xc3e0000000000000 # minlong, as a double (high word) 10592.LDOUBLE_TO_LONG_ret_max: 10593 .dword 0x7fffffffffffffff 10594.LDOUBLE_TO_LONG_ret_min: 10595 .dword 0x8000000000000000 10596 10597/* continuation for OP_MUL_LONG */ 10598 10599.LOP_MUL_LONG_finish: 10600 GET_INST_OPCODE(t0) # extract opcode from rINST 10601 STORE64(v0, v1, a0) # vAA::vAA+1 <- v0(low) :: v1(high) 10602 GOTO_OPCODE(t0) # jump to next instruction 10603 10604 10605/* continuation for OP_IGET_VOLATILE */ 10606 10607 /* 10608 * Currently: 10609 * v0 holds resolved field 10610 * rOBJ holds object (caller saved) 10611 */ 10612.LOP_IGET_VOLATILE_finish: 10613 #BAL(common_squeak0) 10614 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 10615 # check object for null 10616 beqz rOBJ, common_errNullObject # object was null 10617 addu a3, a3, rOBJ # form address 10618 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 10619 SMP_DMB # acquiring load 10620 GET_OPA4(a2) # a2 <- A+ 10621 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10622 GET_INST_OPCODE(t0) # extract opcode from rINST 10623 SET_VREG(a0, a2) # fp[A] <- a0 10624 GOTO_OPCODE(t0) # jump to next instruction 10625 10626 10627/* continuation for OP_IPUT_VOLATILE */ 10628 10629 /* 10630 * Currently: 10631 * a0 holds resolved field 10632 * rOBJ holds object 10633 */ 10634.LOP_IPUT_VOLATILE_finish: 10635 #BAL(common_squeak0) 10636 GET_OPA4(a1) # a1 <- A+ 10637 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 10638 GET_VREG(a0, a1) # a0 <- fp[A] 10639 # check object for null 10640 beqz rOBJ, common_errNullObject # object was null 10641 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10642 GET_INST_OPCODE(t0) # extract opcode from rINST 10643 addu rOBJ, rOBJ, a3 # form address 10644 SMP_DMB_ST # releasing store 10645 sw a0, (rOBJ) # obj.field (8/16/32 bits) <- a0 10646 SMP_DMB 10647 GOTO_OPCODE(t0) # jump to next instruction 10648 10649 10650/* continuation for OP_SGET_VOLATILE */ 10651 10652.LOP_SGET_VOLATILE_finish: 10653 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 10654 SMP_DMB # acquiring load 10655 GET_OPA(a2) # a2 <- AA 10656 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10657 GET_INST_OPCODE(t0) # extract opcode from rINST 10658 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 10659 10660/* continuation for OP_SPUT_VOLATILE */ 10661 10662.LOP_SPUT_VOLATILE_finish: 10663 # field ptr in a0 10664 GET_OPA(a2) # a2 <- AA 10665 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10666 GET_VREG(a1, a2) # a1 <- fp[AA] 10667 GET_INST_OPCODE(t0) # extract opcode from rINST 10668 SMP_DMB_ST # releasing store 10669 sw a1, offStaticField_value(a0) # field <- vAA 10670 SMP_DMB 10671 GOTO_OPCODE(t0) # jump to next instruction 10672 10673/* continuation for OP_IGET_OBJECT_VOLATILE */ 10674 10675 /* 10676 * Currently: 10677 * v0 holds resolved field 10678 * rOBJ holds object (caller saved) 10679 */ 10680.LOP_IGET_OBJECT_VOLATILE_finish: 10681 #BAL(common_squeak0) 10682 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 10683 # check object for null 10684 beqz rOBJ, common_errNullObject # object was null 10685 addu a3, a3, rOBJ # form address 10686 lw a0, (a3) # a0 <- obj.field (8/16/32 bits) 10687 SMP_DMB # acquiring load 10688 GET_OPA4(a2) # a2 <- A+ 10689 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10690 GET_INST_OPCODE(t0) # extract opcode from rINST 10691 SET_VREG(a0, a2) # fp[A] <- a0 10692 GOTO_OPCODE(t0) # jump to next instruction 10693 10694 10695/* continuation for OP_IGET_WIDE_VOLATILE */ 10696 10697 /* 10698 * Currently: 10699 * a0 holds resolved field 10700 * rOBJ holds object 10701 */ 10702.LOP_IGET_WIDE_VOLATILE_finish: 10703 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 10704 beqz rOBJ, common_errNullObject # object was null 10705 GET_OPA4(a2) # a2 <- A+ 10706 addu rOBJ, rOBJ, a3 # form address 10707 .if 1 10708 vLOAD64(a0, a1, rOBJ) # a0/a1 <- obj.field (64-bit align ok) 10709 .else 10710 LOAD64(a0, a1, rOBJ) # a0/a1 <- obj.field (64-bit align ok) 10711 .endif 10712 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10713 EAS2(a3, rFP, a2) # a3 <- &fp[A] 10714 GET_INST_OPCODE(t0) # extract opcode from rINST 10715 STORE64(a0, a1, a3) # fp[A] <- a0/a1 10716 GOTO_OPCODE(t0) # jump to next instruction 10717 10718 10719/* continuation for OP_IPUT_WIDE_VOLATILE */ 10720 10721 /* 10722 * Currently: 10723 * a0 holds resolved field 10724 * rOBJ holds object 10725 */ 10726.LOP_IPUT_WIDE_VOLATILE_finish: 10727 GET_OPA4(a2) # a2 <- A+ 10728 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 10729 EAS2(a2, rFP, a2) # a2 <- &fp[A] 10730 # check object for null 10731 beqz rOBJ, common_errNullObject # object was null 10732 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10733 LOAD64(a0, a1, a2) # a0/a1 <- fp[A] 10734 GET_INST_OPCODE(rBIX) # extract opcode from rINST 10735 addu a2, rOBJ, a3 # form address 10736 .if 1 10737 JAL(dvmQuasiAtomicSwap64Sync) # stores r0/r1 into addr r2 10738# STORE64(a0, a1, a2) # obj.field (64 bits, aligned) <- a0 a1 10739 .else 10740 STORE64(a0, a1, a2) # obj.field (64 bits, aligned) <- a0 a1 10741 .endif 10742 GOTO_OPCODE(rBIX) # jump to next instruction 10743 10744 10745/* continuation for OP_SGET_WIDE_VOLATILE */ 10746 10747.LOP_SGET_WIDE_VOLATILE_finish: 10748 GET_OPA(a1) # a1 <- AA 10749 .if 1 10750 vLOAD64_off(a2, a3, a0, offStaticField_value) # a2/a3 <- field value (aligned) 10751 .else 10752 LOAD64_off(a2, a3, a0, offStaticField_value) # a2/a3 <- field value (aligned) 10753 .endif 10754 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10755 EAS2(a1, rFP, a1) # a1 <- &fp[AA] 10756 STORE64(a2, a3, a1) # vAA/vAA+1 <- a2/a3 10757 GET_INST_OPCODE(t0) # extract opcode from rINST 10758 GOTO_OPCODE(t0) # jump to next instruction 10759 10760 10761 10762/* continuation for OP_SPUT_WIDE_VOLATILE */ 10763 10764 /* 10765 * Continuation if the field has not yet been resolved. 10766 * a1: BBBB field ref 10767 * rOBJ: &fp[AA] 10768 * rBIX: dvmDex->pResFields 10769 * 10770 * Returns StaticField pointer in a2. 10771 */ 10772.LOP_SPUT_WIDE_VOLATILE_resolve: 10773 LOAD_rSELF_method(a2) # a2 <- current method 10774#if defined(WITH_JIT) 10775 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 10776#endif 10777 EXPORT_PC() # resolve() could throw, so export now 10778 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 10779 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 10780 # success ? 10781 move a0, v0 10782 beqz v0, common_exceptionThrown # no, handle exception 10783#if defined(WITH_JIT) 10784 /* 10785 * If the JIT is actively building a trace we need to make sure 10786 * that the field is fully resolved before including this instruction. 10787 */ 10788 JAL(common_verifyField) 10789#endif 10790 move a2, v0 10791 b .LOP_SPUT_WIDE_VOLATILE_finish # resume 10792 10793/* continuation for OP_EXECUTE_INLINE */ 10794 10795 /* 10796 * Extract args, call function. 10797 * a0 = #of args (0-4) 10798 * rBIX = call index 10799 * 10800 * Other ideas: 10801 * - Use a jump table from the main piece to jump directly into the 10802 * AND/LW pairs. Costs a data load, saves a branch. 10803 * - Have five separate pieces that do the loading, so we can work the 10804 * interleave a little better. Increases code size. 10805 */ 10806.LOP_EXECUTE_INLINE_continue: 10807 FETCH(rINST, 2) # rINST <- FEDC 10808 beq a0, 0, 0f 10809 beq a0, 1, 1f 10810 beq a0, 2, 2f 10811 beq a0, 3, 3f 10812 beq a0, 4, 4f 10813 JAL(common_abort) # too many arguments 10814 108154: 10816 and t0, rINST, 0xf000 # isolate F 10817 ESRN(t1, rFP, t0, 10) 10818 lw a3, 0(t1) # a3 <- vF (shift right 12, left 2) 108193: 10820 and t0, rINST, 0x0f00 # isolate E 10821 ESRN(t1, rFP, t0, 6) 10822 lw a2, 0(t1) # a2 <- vE 108232: 10824 and t0, rINST, 0x00f0 # isolate D 10825 ESRN(t1, rFP, t0, 2) 10826 lw a1, 0(t1) # a1 <- vD 108271: 10828 and t0, rINST, 0x000f # isolate C 10829 EASN(t1, rFP, t0, 2) 10830 lw a0, 0(t1) # a0 <- vC 108310: 10832 la rINST, gDvmInlineOpsTable # table of InlineOperation 10833 EAS4(t1, rINST, rBIX) # t1 <- rINST + rBIX<<4 10834 lw t9, 0(t1) 10835 jr t9 # sizeof=16, "func" is first entry 10836 # (not reached) 10837 10838 /* 10839 * We're debugging or profiling. 10840 * rBIX: opIndex 10841 */ 10842.LOP_EXECUTE_INLINE_debugmode: 10843 move a0, rBIX 10844 JAL(dvmResolveInlineNative) 10845 beqz v0, .LOP_EXECUTE_INLINE_resume # did it resolve? no, just move on 10846 move rOBJ, v0 # remember method 10847 move a0, v0 10848 move a1, rSELF 10849 JAL(dvmFastMethodTraceEnter) # (method, self) 10850 addu a1, rSELF, offThread_retval # a1<- &self->retval 10851 GET_OPB(a0) # a0 <- B 10852 # Stack should have 16/20 available 10853 sw a1, STACK_OFFSET_ARG04(sp) # push &self->retval 10854 BAL(.LOP_EXECUTE_INLINE_continue) # make call; will return after 10855 lw gp, STACK_OFFSET_GP(sp) # restore gp 10856 move rINST, v0 # save result of inline 10857 move a0, rOBJ # a0<- method 10858 move a1, rSELF # a1<- self 10859 JAL(dvmFastNativeMethodTraceExit) # (method, self) 10860 beqz rINST, common_exceptionThrown # returned false, handle exception 10861 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 10862 GET_INST_OPCODE(t0) # extract opcode from rINST 10863 GOTO_OPCODE(t0) # jump to next instruction 10864 10865/* continuation for OP_EXECUTE_INLINE_RANGE */ 10866 10867 /* 10868 * Extract args, call function. 10869 * a0 = #of args (0-4) 10870 * rBIX = call index 10871 * ra = return addr, above [DO NOT JAL out of here w/o preserving ra] 10872 */ 10873.LOP_EXECUTE_INLINE_RANGE_continue: 10874 FETCH(rOBJ, 2) # rOBJ <- CCCC 10875 beq a0, 0, 0f 10876 beq a0, 1, 1f 10877 beq a0, 2, 2f 10878 beq a0, 3, 3f 10879 beq a0, 4, 4f 10880 JAL(common_abort) # too many arguments 10881 108824: 10883 add t0, rOBJ, 3 10884 GET_VREG(a3, t0) 108853: 10886 add t0, rOBJ, 2 10887 GET_VREG(a2, t0) 108882: 10889 add t0, rOBJ, 1 10890 GET_VREG(a1, t0) 108911: 10892 GET_VREG(a0, rOBJ) 108930: 10894 la rOBJ, gDvmInlineOpsTable # table of InlineOperation 10895 EAS4(t1, rOBJ, rBIX) # t1 <- rINST + rBIX<<4 10896 lw t9, 0(t1) 10897 jr t9 # sizeof=16, "func" is first entry 10898 # not reached 10899 10900 /* 10901 * We're debugging or profiling. 10902 * rBIX: opIndex 10903 */ 10904.LOP_EXECUTE_INLINE_RANGE_debugmode: 10905 move a0, rBIX 10906 JAL(dvmResolveInlineNative) 10907 beqz v0, .LOP_EXECUTE_INLINE_RANGE_resume # did it resolve? no, just move on 10908 move rOBJ, v0 # remember method 10909 move a0, v0 10910 move a1, rSELF 10911 JAL(dvmFastMethodTraceEnter) # (method, self) 10912 addu a1, rSELF, offThread_retval # a1<- &self->retval 10913 GET_OPA(a0) # a0 <- A 10914 # Stack should have 16/20 available 10915 sw a1, STACK_OFFSET_ARG04(sp) # push &self->retval 10916 move rINST, rOBJ # rINST<- method 10917 BAL(.LOP_EXECUTE_INLINE_RANGE_continue) # make call; will return after 10918 lw gp, STACK_OFFSET_GP(sp) # restore gp 10919 move rOBJ, v0 # save result of inline 10920 move a0, rINST # a0<- method 10921 move a1, rSELF # a1<- self 10922 JAL(dvmFastNativeMethodTraceExit) # (method, self) 10923 beqz rOBJ, common_exceptionThrown # returned false, handle exception 10924 FETCH_ADVANCE_INST(3) # advance rPC, load rINST 10925 GET_INST_OPCODE(t0) # extract opcode from rINST 10926 GOTO_OPCODE(t0) # jump to next instruction 10927 10928/* continuation for OP_INVOKE_OBJECT_INIT_RANGE */ 10929 /* 10930 * A debugger is attached, so we need to go ahead and do 10931 * this. For simplicity, we'll just jump directly to the 10932 * corresponding handler. Note that we can't use 10933 * rIBASE here because it may be in single-step mode. 10934 * Load the primary table base directly. 10935 */ 10936.LOP_INVOKE_OBJECT_INIT_RANGE_debugger: 10937 lw a1, offThread_mainHandlerTable(rSELF) 10938 li t0, OP_INVOKE_DIRECT_RANGE 10939 GOTO_OPCODE_BASE(a1, t0) # execute it 10940 10941/* continuation for OP_IPUT_OBJECT_VOLATILE */ 10942 10943 /* 10944 * Currently: 10945 * a0 holds resolved field 10946 * rOBJ holds object 10947 */ 10948.LOP_IPUT_OBJECT_VOLATILE_finish: 10949 #BAL(common_squeak0) 10950 GET_OPA4(a1) # a1 <- A+ 10951 LOAD_base_offInstField_byteOffset(a3, a0) # a3 <- byte offset of field 10952 GET_VREG(a0, a1) # a0 <- fp[A] 10953 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 10954 # check object for null 10955 beqz rOBJ, common_errNullObject # object was null 10956 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10957 GET_INST_OPCODE(t0) # extract opcode from rINST 10958 addu t2, rOBJ, a3 # form address 10959 SMP_DMB_ST # releasing store 10960 sw a0, (t2) # obj.field (32 bits) <- a0 10961 SMP_DMB 10962 beqz a0, 1f # stored a null reference? 10963 srl t1, rOBJ, GC_CARD_SHIFT 10964 addu t2, a2, t1 10965 sb a2, (t2) # mark card if not 109661: 10967 GOTO_OPCODE(t0) # jump to next instruction 10968 10969 10970/* continuation for OP_SGET_OBJECT_VOLATILE */ 10971 10972.LOP_SGET_OBJECT_VOLATILE_finish: 10973 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 10974 SMP_DMB # acquiring load 10975 GET_OPA(a2) # a2 <- AA 10976 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10977 GET_INST_OPCODE(t0) # extract opcode from rINST 10978 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1 10979 10980/* continuation for OP_SPUT_OBJECT_VOLATILE */ 10981.LOP_SPUT_OBJECT_VOLATILE_finish: # field ptr in a0 10982 GET_OPA(a2) # a2 <- AA 10983 FETCH_ADVANCE_INST(2) # advance rPC, load rINST 10984 GET_VREG(a1, a2) # a1 <- fp[AA] 10985 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 10986 lw t1, offField_clazz(a0) # t1 <- field->clazz 10987 GET_INST_OPCODE(t0) # extract opcode from rINST 10988 SMP_DMB_ST # releasing store 10989 sw a1, offStaticField_value(a0) # field <- vAA 10990 SMP_DMB 10991 beqz a1, 1f 10992 srl t2, t1, GC_CARD_SHIFT 10993 addu t3, a2, t2 10994 sb a2, (t3) 109951: 10996 GOTO_OPCODE(t0) # jump to next instruction 10997 10998 .size dvmAsmSisterStart, .-dvmAsmSisterStart 10999 .global dvmAsmSisterEnd 11000dvmAsmSisterEnd: 11001 11002/* File: mips/footer.S */ 11003/* 11004 * =========================================================================== 11005 * Common subroutines and data 11006 * =========================================================================== 11007 */ 11008 11009 .text 11010 .align 2 11011 11012#if defined(WITH_JIT) 11013#if defined(WITH_SELF_VERIFICATION) 11014 11015/* 11016 * "longjmp" to a translation after single-stepping. Before returning 11017 * to translation, must save state for self-verification. 11018 */ 11019 .global dvmJitResumeTranslation # (Thread* self, u4* dFP) 11020dvmJitResumeTranslation: 11021 move rSELF, a0 # restore self 11022 move rPC, a1 # restore Dalvik pc 11023 move rFP, a2 # restore Dalvik fp 11024 lw rBIX, offThread_jitResumeNPC(rSELF) 11025 sw zero, offThread_jitResumeNPC(rSELF) # reset resume address 11026 lw sp, offThread_jitResumeNSP(rSELF) # cut back native stack 11027 b jitSVShadowRunStart # resume as if cache hit 11028 # expects resume addr in rBIX 11029 11030 .global dvmJitToInterpPunt 11031dvmJitToInterpPunt: 11032 li a2, kSVSPunt # a2 <- interpreter entry point 11033 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11034 b jitSVShadowRunEnd # doesn't return 11035 11036 .global dvmJitToInterpSingleStep 11037dvmJitToInterpSingleStep: 11038 move rPC, a0 # set up dalvik pc 11039 EXPORT_PC() 11040 sw ra, offThread_jitResumeNPC(rSELF) 11041 sw a1, offThread_jitResumeDPC(rSELF) 11042 li a2, kSVSSingleStep # a2 <- interpreter entry point 11043 b jitSVShadowRunEnd # doesn't return 11044 11045 .global dvmJitToInterpNoChainNoProfile 11046dvmJitToInterpNoChainNoProfile: 11047 move a0, rPC # pass our target PC 11048 li a2, kSVSNoProfile # a2 <- interpreter entry point 11049 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11050 b jitSVShadowRunEnd # doesn't return 11051 11052 .global dvmJitToInterpTraceSelectNoChain 11053dvmJitToInterpTraceSelectNoChain: 11054 move a0, rPC # pass our target PC 11055 li a2, kSVSTraceSelect # a2 <- interpreter entry point 11056 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11057 b jitSVShadowRunEnd # doesn't return 11058 11059 .global dvmJitToInterpTraceSelect 11060dvmJitToInterpTraceSelect: 11061 lw a0, 0(ra) # pass our target PC 11062 li a2, kSVSTraceSelect # a2 <- interpreter entry point 11063 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11064 b jitSVShadowRunEnd # doesn't return 11065 11066 .global dvmJitToInterpBackwardBranch 11067dvmJitToInterpBackwardBranch: 11068 lw a0, 0(ra) # pass our target PC 11069 li a2, kSVSBackwardBranch # a2 <- interpreter entry point 11070 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11071 b jitSVShadowRunEnd # doesn't return 11072 11073 .global dvmJitToInterpNormal 11074dvmJitToInterpNormal: 11075 lw a0, 0(ra) # pass our target PC 11076 li a2, kSVSNormal # a2 <- interpreter entry point 11077 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11078 b jitSVShadowRunEnd # doesn't return 11079 11080 .global dvmJitToInterpNoChain 11081dvmJitToInterpNoChain: 11082 move a0, rPC # pass our target PC 11083 li a2, kSVSNoChain # a2 <- interpreter entry point 11084 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11085 b jitSVShadowRunEnd # doesn't return 11086#else /* WITH_SELF_VERIFICATION */ 11087 11088 11089/* 11090 * "longjmp" to a translation after single-stepping. 11091 */ 11092 .global dvmJitResumeTranslation # (Thread* self, u4* dFP) 11093dvmJitResumeTranslation: 11094 move rSELF, a0 # restore self 11095 move rPC, a1 # restore Dalvik pc 11096 move rFP, a2 # restore Dalvik fp 11097 lw a0, offThread_jitResumeNPC(rSELF) 11098 sw zero, offThread_jitResumeNPC(rSELF) # reset resume address 11099 lw sp, offThread_jitResumeNSP(rSELF) # cut back native stack 11100 jr a0 # resume translation 11101 11102 11103/* 11104 * Return from the translation cache to the interpreter when the compiler is 11105 * having issues translating/executing a Dalvik instruction. We have to skip 11106 * the code cache lookup otherwise it is possible to indefinitely bouce 11107 * between the interpreter and the code cache if the instruction that fails 11108 * to be compiled happens to be at a trace start. 11109 */ 11110 .global dvmJitToInterpPunt 11111dvmJitToInterpPunt: 11112 lw gp, STACK_OFFSET_GP(sp) 11113 move rPC, a0 11114#if defined(WITH_JIT_TUNING) 11115 move a0, ra 11116 JAL(dvmBumpPunt) 11117#endif 11118 EXPORT_PC() 11119 sw zero, offThread_inJitCodeCache(rSELF) # Back to the interp land 11120 lw rIBASE, offThread_curHandlerTable(rSELF) 11121 FETCH_INST() 11122 GET_INST_OPCODE(t0) 11123 GOTO_OPCODE(t0) 11124 11125/* 11126 * Return to the interpreter to handle a single instruction. 11127 * On entry: 11128 * rPC <= Dalvik PC of instrucion to interpret 11129 * a1 <= Dalvik PC of resume instruction 11130 * ra <= resume point in translation 11131 */ 11132 11133 .global dvmJitToInterpSingleStep 11134dvmJitToInterpSingleStep: 11135 lw gp, STACK_OFFSET_GP(sp) 11136 move rPC, a0 # set up dalvik pc 11137 EXPORT_PC() 11138 sw ra, offThread_jitResumeNPC(rSELF) 11139 sw sp, offThread_jitResumeNSP(rSELF) 11140 sw a1, offThread_jitResumeDPC(rSELF) 11141 li a1, 1 11142 sw a1, offThread_singleStepCount(rSELF) # just step once 11143 move a0, rSELF 11144 li a1, kSubModeCountedStep 11145 JAL(dvmEnableSubMode) # (self, subMode) 11146 lw rIBASE, offThread_curHandlerTable(rSELF) 11147 FETCH_INST() 11148 GET_INST_OPCODE(t0) 11149 GOTO_OPCODE(t0) 11150/* 11151 * Return from the translation cache and immediately request 11152 * a translation for the exit target. Commonly used for callees. 11153 */ 11154 .global dvmJitToInterpTraceSelectNoChain 11155dvmJitToInterpTraceSelectNoChain: 11156 lw gp, STACK_OFFSET_GP(sp) 11157#if defined(WITH_JIT_TUNING) 11158 JAL(dvmBumpNoChain) 11159#endif 11160 move a0, rPC 11161 move a1, rSELF 11162 JAL(dvmJitGetTraceAddrThread) # (pc, self) 11163 move a0, v0 11164 sw a0, offThread_inJitCodeCache(rSELF) # set the inJitCodeCache flag 11165 move a1, rPC # arg1 of translation may need this 11166 move ra, zero # in case target is HANDLER_INTERPRET 11167 beqz a0, 2f # 0 means translation does not exist 11168 jr a0 11169 11170/* 11171 * Return from the translation cache and immediately request 11172 * a translation for the exit target. Commonly used following 11173 * invokes. 11174 */ 11175 .global dvmJitToInterpTraceSelect 11176dvmJitToInterpTraceSelect: 11177 lw gp, STACK_OFFSET_GP(sp) 11178 lw rPC, (ra) # get our target PC 11179 subu rINST, ra, 8 # save start of chain branch 11180 move a0, rPC 11181 move a1, rSELF 11182 JAL(dvmJitGetTraceAddrThread) # @ (pc, self) 11183 sw v0, offThread_inJitCodeCache(rSELF) # set the inJitCodeCache flag 11184 beqz v0, 2f 11185 move a0, v0 11186 move a1, rINST 11187 JAL(dvmJitChain) # v0 <- dvmJitChain(codeAddr, chainAddr) 11188 move a1, rPC # arg1 of translation may need this 11189 move ra, zero # in case target is HANDLER_INTERPRET 11190 move a0, v0 11191 beqz a0, toInterpreter # didn't chain - resume with interpreter 11192 11193 jr a0 # continue native execution 11194 11195/* No translation, so request one if profiling isn't disabled */ 111962: 11197 lw rIBASE, offThread_curHandlerTable(rSELF) 11198 lw a0, offThread_pJitProfTable(rSELF) 11199 FETCH_INST() 11200 li t0, kJitTSelectRequestHot 11201 movn a2, t0, a0 # ask for trace selection 11202 bnez a0, common_selectTrace 11203 GET_INST_OPCODE(t0) 11204 GOTO_OPCODE(t0) 11205 11206/* 11207 * Return from the translation cache to the interpreter. 11208 * The return was done with a BLX from thumb mode, and 11209 * the following 32-bit word contains the target rPC value. 11210 * Note that lr (r14) will have its low-order bit set to denote 11211 * its thumb-mode origin. 11212 * 11213 * We'll need to stash our lr origin away, recover the new 11214 * target and then check to see if there is a translation available 11215 * for our new target. If so, we do a translation chain and 11216 * go back to native execution. Otherwise, it's back to the 11217 * interpreter (after treating this entry as a potential 11218 * trace start). 11219 */ 11220 .global dvmJitToInterpNormal 11221dvmJitToInterpNormal: 11222 lw gp, STACK_OFFSET_GP(sp) 11223 lw rPC, (ra) # get our target PC 11224 subu rINST, ra, 8 # save start of chain branch 11225#if defined(WITH_JIT_TUNING) 11226 JAL(dvmBumpNormal) 11227#endif 11228 move a0, rPC 11229 move a1, rSELF 11230 JAL(dvmJitGetTraceAddrThread) # @ (pc, self) 11231 move a0, v0 11232 sw a0, offThread_inJitCodeCache(rSELF) # set the inJitCodeCache flag 11233 beqz a0, toInterpreter # go if not, otherwise do chain 11234 move a1, rINST 11235 JAL(dvmJitChain) # v0 <- dvmJitChain(codeAddr, chainAddr) 11236 move a1, rPC # arg1 of translation may need this 11237 move ra, zero # in case target is HANDLER_INTERPRET 11238 move a0, v0 11239 beqz a0, toInterpreter # didn't chain - resume with interpreter 11240 11241 jr a0 # continue native execution 11242 11243/* 11244 * Return from the translation cache to the interpreter to do method invocation. 11245 * Check if translation exists for the callee, but don't chain to it. 11246 */ 11247 .global dvmJitToInterpNoChainNoProfile 11248dvmJitToInterpNoChainNoProfile: 11249#if defined(WITH_JIT_TUNING) 11250 JAL(dvmBumpNoChain) 11251#endif 11252 move a0, rPC 11253 move a1, rSELF 11254 JAL(dvmJitGetTraceAddrThread) # (pc, self) 11255 move a0, v0 11256 sw a0, offThread_inJitCodeCache(rSELF) # set the inJitCodeCache flag 11257 move a1, rPC # arg1 of translation may need this 11258 move ra, zero # in case target is HANDLER_INTERPRET 11259 beqz a0, footer235 11260 11261 jr a0 # continue native execution if so 11262footer235: 11263 EXPORT_PC() 11264 lw rIBASE, offThread_curHandlerTable(rSELF) 11265 FETCH_INST() 11266 GET_INST_OPCODE(t0) # extract opcode from rINST 11267 GOTO_OPCODE(t0) # jump to next instruction 11268 11269/* 11270 * Return from the translation cache to the interpreter to do method invocation. 11271 * Check if translation exists for the callee, but don't chain to it. 11272 */ 11273 11274 .global dvmJitToInterpNoChain 11275dvmJitToInterpNoChain: 11276 lw gp, STACK_OFFSET_GP(sp) 11277#if defined(WITH_JIT_TUNING) 11278 JAL(dvmBumpNoChain) 11279#endif 11280 move a0, rPC 11281 move a1, rSELF 11282 JAL(dvmJitGetTraceAddrThread) # (pc, self) 11283 move a0, v0 11284 sw a0, offThread_inJitCodeCache(rSELF) # set the inJitCodeCache flag 11285 move a1, rPC # arg1 of translation may need this 11286 move ra, zero # in case target is HANDLER_INTERPRET 11287 beqz a0, 1f 11288 jr a0 # continue native execution if so 112891: 11290#endif /* WITH_SELF_VERIFICATION */ 11291 11292/* 11293 * No translation, restore interpreter regs and start interpreting. 11294 * rSELF & rFP were preserved in the translated code, and rPC has 11295 * already been restored by the time we get here. We'll need to set 11296 * up rIBASE & rINST, and load the address of the JitTable into r0. 11297 */ 11298 11299toInterpreter: 11300 EXPORT_PC() 11301 lw rIBASE, offThread_curHandlerTable(rSELF) 11302 FETCH_INST() 11303 lw a0, offThread_pJitProfTable(rSELF) 11304 lw rIBASE, offThread_curHandlerTable(rSELF) 11305 # NOTE: intended fallthrough 11306 11307/* 11308 * Similar to common_updateProfile, but tests for null pJitProfTable 11309 * r0 holds pJifProfTAble, rINST is loaded, rPC is current and 11310 * rIBASE has been recently refreshed. 11311 */ 11312 11313common_testUpdateProfile: 11314 11315 beqz a0, 4f 11316 11317/* 11318 * Common code to update potential trace start counter, and initiate 11319 * a trace-build if appropriate. 11320 * On entry here: 11321 * r0 <= pJitProfTable (verified non-NULL) 11322 * rPC <= Dalvik PC 11323 * rINST <= next instruction 11324 */ 11325common_updateProfile: 11326 srl a3, rPC, 12 # cheap, but fast hash function 11327 xor a3, a3, rPC 11328 andi a3, a3, JIT_PROF_SIZE-1 # eliminate excess bits 11329 addu t1, a0, a3 11330 lbu a1, (t1) # get counter 11331 GET_INST_OPCODE(t0) 11332 subu a1, a1, 1 # decrement counter 11333 sb a1, (t1) # and store it 11334 beqz a1, 1f 11335 GOTO_OPCODE(t0) # if not threshold, fallthrough otherwise 113361: 11337 /* Looks good, reset the counter */ 11338 lw a1, offThread_jitThreshold(rSELF) 11339 sb a1, (t1) 11340 EXPORT_PC() 11341 move a0, rPC 11342 move a1, rSELF 11343 JAL(dvmJitGetTraceAddrThread) # (pc, self) 11344 move a0, v0 11345 sw v0, offThread_inJitCodeCache(rSELF) # set the inJitCodeCache flag 11346 move a1, rPC # arg1 of translation may need this 11347 move ra, zero # in case target is HANDLER_INTERPRET 11348 11349#if !defined(WITH_SELF_VERIFICATION) 11350 li t0, kJitTSelectRequest # ask for trace selection 11351 movz a2, t0, a0 11352 beqz a0, common_selectTrace 11353 jr a0 # jump to the translation 11354#else 11355 11356 bne a0, zero, skip_ask_for_trace_selection 11357 li a2, kJitTSelectRequest # ask for trace selection 11358 j common_selectTrace 11359 11360skip_ask_for_trace_selection: 11361 /* 11362 * At this point, we have a target translation. However, if 11363 * that translation is actually the interpret-only pseudo-translation 11364 * we want to treat it the same as no translation. 11365 */ 11366 move rBIX, a0 # save target 11367 jal dvmCompilerGetInterpretTemplate 11368 # special case? 11369 bne v0, rBIX, jitSVShadowRunStart # set up self verification shadow space 11370 # Need to clear the inJitCodeCache flag 11371 sw zero, offThread_inJitCodeCache(rSELF) # back to the interp land 11372 GET_INST_OPCODE(t0) 11373 GOTO_OPCODE(t0) 11374 /* no return */ 11375#endif 11376 11377/* 11378 * On entry: 11379 * r2 is jit state. 11380 */ 11381 11382common_selectTrace: 11383 lhu a0, offThread_subMode(rSELF) 11384 andi a0, (kSubModeJitTraceBuild | kSubModeJitSV) 11385 bnez a0, 3f # already doing JIT work, continue 11386 sw a2, offThread_jitState(rSELF) 11387 move a0, rSELF 11388 11389/* 11390 * Call out to validate trace-building request. If successful, 11391 * rIBASE will be swapped to to send us into single-stepping trace 11392 * building mode, so we need to refresh before we continue. 11393 */ 11394 11395 EXPORT_PC() 11396 SAVE_PC_TO_SELF() 11397 SAVE_FP_TO_SELF() 11398 JAL(dvmJitCheckTraceRequest) 113993: 11400 FETCH_INST() 11401 lw rIBASE, offThread_curHandlerTable(rSELF) 114024: 11403 GET_INST_OPCODE(t0) # extract opcode from rINST 11404 GOTO_OPCODE(t0) 11405 /* no return */ 11406#endif 11407 11408#if defined(WITH_SELF_VERIFICATION) 11409 11410/* 11411 * Save PC and registers to shadow memory for self verification mode 11412 * before jumping to native translation. 11413 * On entry: 11414 * rPC, rFP, rSELF: the values that they should contain 11415 * r10: the address of the target translation. 11416 */ 11417jitSVShadowRunStart: 11418 move a0, rPC # r0 <- program counter 11419 move a1, rFP # r1 <- frame pointer 11420 move a2, rSELF # r2 <- InterpState pointer 11421 move a3, rBIX # r3 <- target translation 11422 jal dvmSelfVerificationSaveState # save registers to shadow space 11423 lw rFP, offShadowSpace_shadowFP(v0) # rFP <- fp in shadow space 11424 jr rBIX # jump to the translation 11425 11426/* 11427 * Restore PC, registers, and interpState to original values 11428 * before jumping back to the interpreter. 11429 */ 11430jitSVShadowRunEnd: 11431 move a1, rFP # pass ending fp 11432 move a3, rSELF # pass self ptr for convenience 11433 jal dvmSelfVerificationRestoreState # restore pc and fp values 11434 LOAD_PC_FP_FROM_SELF() # restore pc, fp 11435 lw a1, offShadowSpace_svState(a0) # get self verification state 11436 beq a1, zero, 1f # check for punt condition 11437 11438 # Setup SV single-stepping 11439 move a0, rSELF 11440 li a1, kSubModeJitSV 11441 JAL(dvmEnableSubMode) # (self, subMode) 11442 li a2, kJitSelfVerification # ask for self verification 11443 sw a2, offThread_jitState(rSELF) 11444 # Intentional fallthrough 11445 114461: 11447 # exit to interpreter without check 11448 EXPORT_PC() 11449 lw rIBASE, offThread_curHandlerTable(rSELF) 11450 FETCH_INST() 11451 GET_INST_OPCODE(t0) 11452 GOTO_OPCODE(t0) 11453#endif 11454 11455/* 11456 * The equivalent of "goto bail", this calls through the "bail handler". 11457 * It will end this interpreter activation, and return to the caller 11458 * of dvmMterpStdRun. 11459 * 11460 * State registers will be saved to the "thread" area before bailing 11461 * debugging purposes 11462 */ 11463 .ent common_gotoBail 11464common_gotoBail: 11465 SAVE_PC_FP_TO_SELF() # export state to "thread" 11466 move a0, rSELF # a0 <- self ptr 11467 b dvmMterpStdBail # call(self, changeInterp) 11468 .end common_gotoBail 11469 11470/* 11471 * The JIT's invoke method needs to remember the callsite class and 11472 * target pair. Save them here so that they are available to 11473 * dvmCheckJit following the interpretation of this invoke. 11474 */ 11475#if defined(WITH_JIT) 11476save_callsiteinfo: 11477 beqz rOBJ, 1f 11478 lw rOBJ, offObject_clazz(rOBJ) 114791: 11480 sw a0, offThread_methodToCall(rSELF) 11481 sw rOBJ, offThread_callsiteClass(rSELF) 11482 jr ra 11483#endif 11484 11485/* 11486 * Common code for method invocation with range. 11487 * 11488 * On entry: 11489 * a0 is "Method* methodToCall", the method we're trying to call 11490 */ 11491common_invokeMethodRange: 11492.LinvokeNewRange: 11493#if defined(WITH_JIT) 11494 lhu a1, offThread_subMode(rSELF) 11495 andi a1, kSubModeJitTraceBuild 11496 beqz a1, 1f 11497 JAL(save_callsiteinfo) 11498#endif 11499 # prepare to copy args to "outs" area of current frame 115001: 11501 GET_OPA(a2) 11502 SAVEAREA_FROM_FP(rBIX, rFP) # rBIX <- stack save area 11503 beqz a2, .LinvokeArgsDone 11504 FETCH(a1, 2) # a1 <- CCCC 11505.LinvokeRangeArgs: 11506 # a0=methodToCall, a1=CCCC, a2=count, rBIX=outs 11507 # (very few methods have > 10 args; could unroll for common cases) 11508 EAS2(a3, rFP, a1) 11509 sll t0, a2, 2 11510 subu rBIX, rBIX, t0 11511 115121: 11513 lw a1, 0(a3) 11514 addu a3, a3, 4 11515 subu a2, a2, 1 11516 sw a1, 0(rBIX) 11517 addu rBIX, 4 11518 bnez a2, 1b 11519 b .LinvokeArgsDone 11520 11521/* 11522 * Common code for method invocation without range. 11523 * 11524 * On entry: 11525 * a0 is "Method* methodToCall", "rOBJ is this" 11526 */ 11527common_invokeMethodNoRange: 11528.LinvokeNewNoRange: 11529#if defined(WITH_JIT) 11530 lhu a1, offThread_subMode(rSELF) 11531 andi a1, kSubModeJitTraceBuild 11532 beqz a1, 1f 11533 JAL(save_callsiteinfo) 11534#endif 11535 11536 # prepare to copy args to "outs" area of current frame 115371: 11538 GET_OPB(a2) 11539 SAVEAREA_FROM_FP(rBIX, rFP) 11540 beqz a2, .LinvokeArgsDone 11541 FETCH(a1, 2) 11542 11543 # a0=methodToCall, a1=GFED, a2=count, 11544.LinvokeNonRange: 11545 beq a2, 0, 0f 11546 beq a2, 1, 1f 11547 beq a2, 2, 2f 11548 beq a2, 3, 3f 11549 beq a2, 4, 4f 11550 beq a2, 5, 5f 11551 115525: 11553 and t0, rINST, 0x0f00 11554 ESRN(t2, rFP, t0, 6) 11555 lw a3, (t2) 11556 subu rBIX, 4 11557 sw a3, 0(rBIX) 11558 115594: 11560 and t0, a1, 0xf000 11561 ESRN(t2, rFP, t0, 10) 11562 lw a3, (t2) 11563 subu rBIX, 4 11564 sw a3, 0(rBIX) 11565 115663: 11567 and t0, a1, 0x0f00 11568 ESRN(t2, rFP, t0, 6) 11569 lw a3, (t2) 11570 subu rBIX, 4 11571 sw a3, 0(rBIX) 11572 115732: 11574 and t0, a1, 0x00f0 11575 ESRN(t2, rFP, t0, 2) 11576 lw a3, (t2) 11577 subu rBIX, 4 11578 sw a3, 0(rBIX) 11579 115801: 11581 and t0, a1, 0x000f 11582 EASN(t2, rFP, t0, 2) 11583 lw a3, (t2) 11584 subu rBIX, 4 11585 sw a3, 0(rBIX) 11586 115870: 11588 #fall through .LinvokeArgsDone 11589 11590 11591.LinvokeArgsDone: # a0=methodToCall 11592 lhu rOBJ, offMethod_registersSize(a0) 11593 lhu a3, offMethod_outsSize(a0) 11594 lw a2, offMethod_insns(a0) 11595 lw rINST, offMethod_clazz(a0) 11596 # find space for the new stack frame, check for overflow 11597 SAVEAREA_FROM_FP(a1, rFP) # a1 <- stack save area 11598 sll t0, rOBJ, 2 # a1 <- newFp (old savearea - regsSize) 11599 subu a1, a1, t0 11600 SAVEAREA_FROM_FP(rBIX, a1) 11601 lw rOBJ, offThread_interpStackEnd(rSELF) # t3 <- interpStackEnd 11602 sll t2, a3, 2 11603 subu t0, rBIX, t2 11604 lhu ra, offThread_subMode(rSELF) 11605 lw a3, offMethod_accessFlags(a0) # a3 <- methodToCall->accessFlags 11606 bltu t0, rOBJ, .LstackOverflow # yes, this frame will overflow stack 11607 11608 11609 # set up newSaveArea 11610#ifdef EASY_GDB 11611 SAVEAREA_FROM_FP(t0, rFP) 11612 sw t0, offStackSaveArea_prevSave(rBIX) 11613#endif 11614 sw rFP, (offStackSaveArea_prevFrame)(rBIX) 11615 sw rPC, (offStackSaveArea_savedPc)(rBIX) 11616#if defined(WITH_JIT) 11617 sw zero, (offStackSaveArea_returnAddr)(rBIX) 11618#endif 11619 sw a0, (offStackSaveArea_method)(rBIX) 11620 # Profiling? 11621 bnez ra, 2f 116221: 11623 and t2, a3, ACC_NATIVE 11624 bnez t2, .LinvokeNative 11625 lhu rOBJ, (a2) # rOBJ -< load Inst from New PC 11626 lw a3, offClassObject_pDvmDex(rINST) 11627 move rPC, a2 # Publish new rPC 11628 # Update state values for the new method 11629 # a0=methodToCall, a1=newFp, a3=newMethodClass, rOBJ=newINST 11630 sw a0, offThread_method(rSELF) 11631 sw a3, offThread_methodClassDex(rSELF) 11632 li a2, 1 11633 sw a2, offThread_debugIsMethodEntry(rSELF) 11634 11635#if defined(WITH_JIT) 11636 lw a0, offThread_pJitProfTable(rSELF) 11637 move rFP, a1 # fp = newFp 11638 GET_PREFETCHED_OPCODE(t0, rOBJ) # extract prefetched opcode from rOBJ 11639 move rINST, rOBJ # publish new rINST 11640 sw a1, offThread_curFrame(rSELF) 11641 bnez a0, common_updateProfile 11642 GOTO_OPCODE(t0) 11643#else 11644 move rFP, a1 11645 GET_PREFETCHED_OPCODE(t0, rOBJ) 11646 move rINST, rOBJ 11647 sw a1, offThread_curFrame(rSELF) 11648 GOTO_OPCODE(t0) 11649#endif 11650 116512: 11652 # Profiling - record method entry. a0: methodToCall 11653 STACK_STORE(a0, 0) 11654 STACK_STORE(a1, 4) 11655 STACK_STORE(a2, 8) 11656 STACK_STORE(a3, 12) 11657 sw rPC, offThread_pc(rSELF) # update interpSave.pc 11658 move a1, a0 11659 move a0, rSELF 11660 JAL(dvmReportInvoke) 11661 STACK_LOAD(a3, 12) # restore a0-a3 11662 STACK_LOAD(a2, 8) 11663 STACK_LOAD(a1, 4) 11664 STACK_LOAD(a0, 0) 11665 b 1b 11666.LinvokeNative: 11667 # Prep for the native call 11668 # a0=methodToCall, a1=newFp, rBIX=newSaveArea 11669 lhu ra, offThread_subMode(rSELF) 11670 lw t3, offThread_jniLocal_topCookie(rSELF) 11671 sw a1, offThread_curFrame(rSELF) 11672 sw t3, offStackSaveArea_localRefCookie(rBIX) # newFp->localRefCookie=top 11673 move a2, a0 11674 move a0, a1 11675 addu a1, rSELF, offThread_retval 11676 move a3, rSELF 11677#ifdef ASSIST_DEBUGGER 11678 /* insert fake function header to help gdb find the stack frame */ 11679 b .Lskip 11680 .ent dalvik_mterp 11681dalvik_mterp: 11682 STACK_STORE_FULL() 11683.Lskip: 11684#endif 11685 bnez ra, 11f # Any special SubModes active? 11686 lw t9, offMethod_nativeFunc(a2) 11687 jalr t9 11688 lw gp, STACK_OFFSET_GP(sp) 116897: 11690 # native return; rBIX=newSaveArea 11691 # equivalent to dvmPopJniLocals 11692 lw a0, offStackSaveArea_localRefCookie(rBIX) 11693 lw a1, offThread_exception(rSELF) 11694 sw rFP, offThread_curFrame(rSELF) 11695 sw a0, offThread_jniLocal_topCookie(rSELF) # new top <- old top 11696 bnez a1, common_exceptionThrown 11697 11698 FETCH_ADVANCE_INST(3) 11699 GET_INST_OPCODE(t0) 11700 GOTO_OPCODE(t0) 1170111: 11702 # a0=newFp, a1=&retval, a2=methodToCall, a3=self, ra=subModes 11703 SCRATCH_STORE(a0, 0) 11704 SCRATCH_STORE(a1, 4) 11705 SCRATCH_STORE(a2, 8) 11706 SCRATCH_STORE(a3, 12) 11707 move a0, a2 # a0 <- methodToCall 11708 move a1, rSELF 11709 move a2, rFP 11710 JAL(dvmReportPreNativeInvoke) # (methodToCall, self, fp) 11711 SCRATCH_LOAD(a3, 12) # restore a0-a3 11712 SCRATCH_LOAD(a2, 8) 11713 SCRATCH_LOAD(a1, 4) 11714 SCRATCH_LOAD(a0, 0) 11715 11716 # Call the native method 11717 lw t9, offMethod_nativeFunc(a2) # t9<-methodToCall->nativeFunc 11718 jalr t9 11719 lw gp, STACK_OFFSET_GP(sp) 11720 11721 # Restore the pre-call arguments 11722 SCRATCH_LOAD(a3, 12) # restore a0-a3 11723 SCRATCH_LOAD(a2, 8) 11724 SCRATCH_LOAD(a1, 4) 11725 SCRATCH_LOAD(a0, 0) 11726 11727 # Finish up any post-invoke subMode requirements 11728 move a0, a2 11729 move a1, rSELF 11730 move a2, rFP 11731 JAL(dvmReportPostNativeInvoke) # (methodToCall, self, fp) 11732 b 7b 11733 11734 11735.LstackOverflow: # a0=methodToCall 11736 move a1, a0 # a1 <- methodToCall 11737 move a0, rSELF # a0 <- self 11738 JAL(dvmHandleStackOverflow) # dvmHandleStackOverflow(self, methodToCall) 11739 b common_exceptionThrown 11740#ifdef ASSIST_DEBUGGER 11741 .end dalvik_mterp 11742#endif 11743 11744 /* 11745 * Common code for method invocation, calling through "glue code". 11746 * 11747 * TODO: now that we have range and non-range invoke handlers, this 11748 * needs to be split into two. Maybe just create entry points 11749 * that set r9 and jump here? 11750 * 11751 * On entry: 11752 * r0 is "Method* methodToCall", the method we're trying to call 11753 * r9 is "bool methodCallRange", indicating if this is a /range variant 11754 */ 11755 11756/* 11757 * Common code for handling a return instruction. 11758 * 11759 * This does not return. 11760 */ 11761common_returnFromMethod: 11762.LreturnNew: 11763 lhu t0, offThread_subMode(rSELF) 11764 SAVEAREA_FROM_FP(a0, rFP) 11765 lw rOBJ, offStackSaveArea_savedPc(a0) # rOBJ = saveArea->savedPc 11766 bnez t0, 19f 1176714: 11768 lw rFP, offStackSaveArea_prevFrame(a0) # fp = saveArea->prevFrame 11769 lw a2, (offStackSaveArea_method - sizeofStackSaveArea)(rFP) 11770 # a2<- method we're returning to 11771 # is this a break frame? 11772 beqz a2, common_gotoBail # break frame, bail out completely 11773 11774 lw rBIX, offMethod_clazz(a2) # rBIX<- method->clazz 11775 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh rIBASE 11776 PREFETCH_ADVANCE_INST(rINST, rOBJ, 3) # advance rOBJ, update new rINST 11777 sw a2, offThread_method(rSELF) # self->method = newSave->method 11778 lw a1, offClassObject_pDvmDex(rBIX) # r1<- method->clazz->pDvmDex 11779 sw rFP, offThread_curFrame(rSELF) # curFrame = fp 11780#if defined(WITH_JIT) 11781 lw rBIX, offStackSaveArea_returnAddr(a0) 11782 move rPC, rOBJ # publish new rPC 11783 sw a1, offThread_methodClassDex(rSELF) 11784 sw rBIX, offThread_inJitCodeCache(rSELF) # may return to JIT'ed land 11785 beqz rBIX, 15f # caller is compiled code 11786 move t9, rBIX 11787 jalr t9 11788 lw gp, STACK_OFFSET_GP(sp) 1178915: 11790 GET_INST_OPCODE(t0) # extract opcode from rINST 11791 GOTO_OPCODE(t0) # jump to next instruction 11792#else 11793 GET_INST_OPCODE(t0) # extract opcode from rINST 11794 move rPC, rOBJ # publish new rPC 11795 sw a1, offThread_methodClassDex(rSELF) 11796 GOTO_OPCODE(t0) 11797#endif 11798 1179919: 11800 # Handle special actions 11801 # On entry, a0: StackSaveArea 11802 lw a1, offStackSaveArea_prevFrame(a0) # a1<- prevFP 11803 sw rPC, offThread_pc(rSELF) # update interpSave.pc 11804 sw a1, offThread_curFrame(rSELF) # update interpSave.curFrame 11805 move a0, rSELF 11806 JAL(dvmReportReturn) 11807 SAVEAREA_FROM_FP(a0, rFP) # restore StackSaveArea 11808 b 14b 11809 11810 .if 0 11811 /* 11812 * Return handling, calls through "glue code". 11813 */ 11814.LreturnOld: 11815 SAVE_PC_FP_TO_SELF() # export state 11816 move a0, rSELF # arg to function 11817 JAL(dvmMterp_returnFromMethod) 11818 b common_resumeAfterGlueCall 11819 .endif 11820 11821/* 11822 * Somebody has thrown an exception. Handle it. 11823 * 11824 * If the exception processing code returns to us (instead of falling 11825 * out of the interpreter), continue with whatever the next instruction 11826 * now happens to be. 11827 * 11828 * This does not return. 11829 */ 11830 .global dvmMterpCommonExceptionThrown 11831dvmMterpCommonExceptionThrown: 11832common_exceptionThrown: 11833.LexceptionNew: 11834 11835 EXPORT_PC() 11836 move a0, rSELF 11837 JAL(dvmCheckSuspendPending) 11838 lw rOBJ, offThread_exception(rSELF) 11839 move a1, rSELF 11840 move a0, rOBJ 11841 JAL(dvmAddTrackedAlloc) 11842 lhu a2, offThread_subMode(rSELF) 11843 sw zero, offThread_exception(rSELF) 11844 11845 # Special subMode? 11846 bnez a2, 7f # any special subMode handling needed? 118478: 11848 /* set up args and a local for "&fp" */ 11849 sw rFP, 20(sp) # store rFP => tmp 11850 addu t0, sp, 20 # compute &tmp 11851 sw t0, STACK_OFFSET_ARG04(sp) # save it in arg4 as per ABI 11852 li a3, 0 # a3 <- false 11853 lw a1, offThread_method(rSELF) 11854 move a0, rSELF 11855 lw a1, offMethod_insns(a1) 11856 move a2, rOBJ 11857 subu a1, rPC, a1 11858 sra a1, a1, 1 11859 11860 /* call, r0 gets catchRelPc (a code-unit offset) */ 11861 JAL(dvmFindCatchBlock) # call(self, relPc, exc, scan?, &fp) 11862 lw rFP, 20(sp) # retrieve the updated rFP 11863 11864 /* update frame pointer and check result from dvmFindCatchBlock */ 11865 move a0, v0 11866 bltz v0, .LnotCaughtLocally 11867 11868 /* fix earlier stack overflow if necessary; Preserve a0 */ 11869 lbu a1, offThread_stackOverflowed(rSELF) 11870 beqz a1, 1f 11871 move rBIX, a0 11872 move a0, rSELF 11873 move a1, rOBJ 11874 JAL(dvmCleanupStackOverflow) 11875 move a0, rBIX 11876 118771: 11878 11879/* adjust locals to match self->interpSave.curFrame and updated PC */ 11880 SAVEAREA_FROM_FP(a1, rFP) # a1<- new save area 11881 lw a1, offStackSaveArea_method(a1) 11882 sw a1, offThread_method(rSELF) 11883 lw a2, offMethod_clazz(a1) 11884 lw a3, offMethod_insns(a1) 11885 lw a2, offClassObject_pDvmDex(a2) 11886 EAS1(rPC, a3, a0) 11887 sw a2, offThread_methodClassDex(rSELF) 11888 11889 /* release the tracked alloc on the exception */ 11890 move a0, rOBJ 11891 move a1, rSELF 11892 JAL(dvmReleaseTrackedAlloc) 11893 11894 /* restore the exception if the handler wants it */ 11895 lw rIBASE, offThread_curHandlerTable(rSELF) 11896 FETCH_INST() 11897 GET_INST_OPCODE(t0) 11898 bne t0, OP_MOVE_EXCEPTION, 2f 11899 sw rOBJ, offThread_exception(rSELF) 119002: 11901 GOTO_OPCODE(t0) 11902 11903 # Manage debugger bookkeeping 119047: 11905 sw rPC, offThread_pc(rSELF) 11906 sw rFP, offThread_curFrame(rSELF) 11907 move a0, rSELF 11908 move a1, rOBJ 11909 JAL(dvmReportExceptionThrow) 11910 b 8b 11911 11912.LnotCaughtLocally: # rOBJ = exception 11913 /* fix stack overflow if necessary */ 11914 lbu a1, offThread_stackOverflowed(rSELF) 11915 beqz a1, 3f 11916 move a0, rSELF 11917 move a1, rOBJ 11918 JAL(dvmCleanupStackOverflow) # dvmCleanupStackOverflow(self, exception) 11919 119203: 11921 # may want to show "not caught locally" debug messages here 11922#if DVM_SHOW_EXCEPTION >= 2 11923 /* call __android_log_print(prio, tag, format, ...) */ 11924 /* "Exception %s from %s:%d not caught locally" */ 11925 lw a0, offThread_method(rSELF) 11926 lw a1, offMethod_insns(a0) 11927 subu a1, rPC, a1 11928 sra a1, a1, 1 11929 JAL(dvmLineNumFromPC) 11930 sw v0, 20(sp) 11931 # dvmGetMethodSourceFile(method) 11932 lw a0, offThread_method(rSELF) 11933 JAL(dvmGetMethodSourceFile) 11934 sw v0, 16(sp) 11935 # exception->clazz->descriptor 11936 lw a3, offObject_clazz(rOBJ) 11937 lw a3, offClassObject_descriptor(a3) 11938 la a2, .LstrExceptionNotCaughtLocally 11939 la a1, .LstrLogTag 11940 li a0, 3 11941 JAL(__android_log_print) 11942#endif 11943 sw rOBJ, offThread_exception(rSELF) 11944 move a0, rOBJ 11945 move a1, rSELF 11946 JAL(dvmReleaseTrackedAlloc) 11947 b common_gotoBail 11948 11949 /* 11950 * Exception handling, calls through "glue code". 11951 */ 11952 .if 0 11953.LexceptionOld: 11954 SAVE_PC_TO_SELF() # export state 11955 SAVE_FP_TO_SELF() 11956 move a0, rSELF # arg to function 11957 JAL(dvmMterp_exceptionThrown) 11958 b common_resumeAfterGlueCall 11959 .endif 11960 11961#if defined(WITH_JIT) 11962 /* 11963 * If the JIT is actively building a trace we need to make sure 11964 * that the field is fully resolved before including the current 11965 * instruction. 11966 * 11967 * On entry: 11968 * rBIX: &dvmDex->pResFields[field] 11969 * a0: field pointer (must preserve) 11970 */ 11971common_verifyField: 11972 lhu a3, offThread_subMode(rSELF) 11973 andi a3, kSubModeJitTraceBuild 11974 bnez a3, 1f # Not building trace, continue 11975 jr ra 119761: 11977 lw a1, (rBIX) 11978 beqz a1, 2f # resolution complete ? 11979 jr ra 119802: 11981 SCRATCH_STORE(a0, 0) 11982 SCRATCH_STORE(a1, 4) 11983 SCRATCH_STORE(a2, 8) 11984 SCRATCH_STORE(a3, 12) 11985 SCRATCH_STORE(ra, 16) 11986 move a0, rSELF 11987 move a1, rPC 11988 JAL(dvmJitEndTraceSelect) #(self,pc) end trace before this inst) 11989 SCRATCH_LOAD(a0, 0) 11990 SCRATCH_LOAD(a1, 4) 11991 SCRATCH_LOAD(a2, 8) 11992 SCRATCH_LOAD(a3, 12) 11993 SCRATCH_LOAD(ra, 16) 11994 jr ra # return 11995#endif 11996 11997/* 11998 * After returning from a "glued" function, pull out the updated 11999 * values and start executing at the next instruction. 12000 */ 12001common_resumeAfterGlueCall: 12002 LOAD_PC_FP_FROM_SELF() # pull rPC and rFP out of thread 12003 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh 12004 FETCH_INST() # load rINST from rPC 12005 GET_INST_OPCODE(t0) # extract opcode from rINST 12006 GOTO_OPCODE(t0) # jump to next instruction 12007 12008/* 12009 * Invalid array index. Note that our calling convention is strange; we use a1 12010 * and a3 because those just happen to be the registers all our callers are 12011 * using. We move a3 before calling the C function, but a1 happens to match. 12012 * a1: index 12013 * a3: size 12014 */ 12015common_errArrayIndex: 12016 EXPORT_PC() 12017 move a0, a3 12018 JAL(dvmThrowArrayIndexOutOfBoundsException) 12019 b common_exceptionThrown 12020 12021/* 12022 * Integer divide or mod by zero. 12023 */ 12024common_errDivideByZero: 12025 EXPORT_PC() 12026 la a0, .LstrDivideByZero 12027 JAL(dvmThrowArithmeticException) 12028 b common_exceptionThrown 12029 12030/* 12031 * Attempt to allocate an array with a negative size. 12032 * On entry: length in a1 12033 */ 12034common_errNegativeArraySize: 12035 EXPORT_PC() 12036 move a0, a1 # arg0 <- len 12037 JAL(dvmThrowNegativeArraySizeException) # (len) 12038 b common_exceptionThrown 12039 12040/* 12041 * Invocation of a non-existent method. 12042 * On entry: method name in a1 12043 */ 12044common_errNoSuchMethod: 12045 EXPORT_PC() 12046 move a0, a1 12047 JAL(dvmThrowNoSuchMethodError) 12048 b common_exceptionThrown 12049 12050/* 12051 * We encountered a null object when we weren't expecting one. We 12052 * export the PC, throw a NullPointerException, and goto the exception 12053 * processing code. 12054 */ 12055common_errNullObject: 12056 EXPORT_PC() 12057 li a0, 0 12058 JAL(dvmThrowNullPointerException) 12059 b common_exceptionThrown 12060 12061/* 12062 * For debugging, cause an immediate fault. The source address will be in ra. Use a jal to jump here. 12063 */ 12064common_abort: 12065 lw zero,-4(zero) # generate SIGSEGV 12066 12067/* 12068 * Spit out a "we were here", preserving all registers. 12069 */ 12070 .macro SQUEAK num 12071common_squeak\num: 12072 STACK_STORE_RA(); 12073 la a0, .LstrSqueak 12074 LOAD_IMM(a1, \num); 12075 JAL(printf); 12076 STACK_LOAD_RA(); 12077 RETURN; 12078 .endm 12079 12080 SQUEAK 0 12081 SQUEAK 1 12082 SQUEAK 2 12083 SQUEAK 3 12084 SQUEAK 4 12085 SQUEAK 5 12086 12087/* 12088 * Spit out the number in a0, preserving registers. 12089 */ 12090common_printNum: 12091 STACK_STORE_RA() 12092 MOVE_REG(a1, a0) 12093 la a0, .LstrSqueak 12094 JAL(printf) 12095 STACK_LOAD_RA() 12096 RETURN 12097 12098/* 12099 * Print a newline, preserving registers. 12100 */ 12101common_printNewline: 12102 STACK_STORE_RA() 12103 la a0, .LstrNewline 12104 JAL(printf) 12105 STACK_LOAD_RA() 12106 RETURN 12107 12108 /* 12109 * Print the 32-bit quantity in a0 as a hex value, preserving registers. 12110 */ 12111common_printHex: 12112 STACK_STORE_RA() 12113 MOVE_REG(a1, a0) 12114 la a0, .LstrPrintHex 12115 JAL(printf) 12116 STACK_LOAD_RA() 12117RETURN; 12118 12119/* 12120 * Print the 64-bit quantity in a0-a1, preserving registers. 12121 */ 12122common_printLong: 12123 STACK_STORE_RA() 12124 MOVE_REG(a3, a1) 12125 MOVE_REG(a2, a0) 12126 la a0, .LstrPrintLong 12127 JAL(printf) 12128 STACK_LOAD_RA() 12129 RETURN; 12130 12131/* 12132 * Print full method info. Pass the Method* in a0. Preserves regs. 12133 */ 12134common_printMethod: 12135 STACK_STORE_RA() 12136 JAL(dvmMterpPrintMethod) 12137 STACK_LOAD_RA() 12138 RETURN 12139 12140/* 12141 * Call a C helper function that dumps regs and possibly some 12142 * additional info. Requires the C function to be compiled in. 12143 */ 12144 .if 0 12145common_dumpRegs: 12146 STACK_STORE_RA() 12147 JAL(dvmMterpDumpMipsRegs) 12148 STACK_LOAD_RA() 12149 RETURN 12150 .endif 12151 12152/* 12153 * Zero-terminated ASCII string data. 12154 */ 12155 .data 12156 12157.LstrBadEntryPoint: 12158 .asciiz "Bad entry point %d\n" 12159.LstrDivideByZero: 12160 .asciiz "divide by zero" 12161.LstrFilledNewArrayNotImpl: 12162 .asciiz "filled-new-array only implemented for 'int'" 12163.LstrLogTag: 12164 .asciiz "mterp" 12165.LstrExceptionNotCaughtLocally: 12166 .asciiz "Exception %s from %s:%d not caught locally\n" 12167 12168.LstrNewline: 12169 .asciiz "\n" 12170.LstrSqueak: 12171 .asciiz "<%d>" 12172.LstrPrintHex: 12173 .asciiz "<0x%x>" 12174.LstrPrintLong: 12175 .asciiz "<%lld>" 12176 12177 12178 .global dvmAsmAltInstructionStart 12179 .type dvmAsmAltInstructionStart, %function 12180 .text 12181 12182dvmAsmAltInstructionStart = .L_ALT_OP_NOP 12183/* ------------------------------ */ 12184 .balign 128 12185.L_ALT_OP_NOP: /* 0x00 */ 12186/* File: mips/alt_stub.S */ 12187/* 12188 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12189 * any interesting requests and then jump to the real instruction 12190 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12191 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12192 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12193 * bail to the real handler if breakFlags==0. 12194 */ 12195 lbu a3, offThread_breakFlags(rSELF) 12196 la rBIX, dvmAsmInstructionStart + (0 * 128) 12197 lw rIBASE, offThread_curHandlerTable(rSELF) 12198 bnez a3, 1f 12199 jr rBIX # nothing to do - jump to real handler 122001: 12201 EXPORT_PC() 12202 move a0, rPC # arg0 12203 move a1, rFP # arg1 12204 move a2, rSELF # arg2 12205 JAL(dvmCheckBefore) 12206 jr rBIX 12207 12208/* ------------------------------ */ 12209 .balign 128 12210.L_ALT_OP_MOVE: /* 0x01 */ 12211/* File: mips/alt_stub.S */ 12212/* 12213 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12214 * any interesting requests and then jump to the real instruction 12215 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12216 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12217 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12218 * bail to the real handler if breakFlags==0. 12219 */ 12220 lbu a3, offThread_breakFlags(rSELF) 12221 la rBIX, dvmAsmInstructionStart + (1 * 128) 12222 lw rIBASE, offThread_curHandlerTable(rSELF) 12223 bnez a3, 1f 12224 jr rBIX # nothing to do - jump to real handler 122251: 12226 EXPORT_PC() 12227 move a0, rPC # arg0 12228 move a1, rFP # arg1 12229 move a2, rSELF # arg2 12230 JAL(dvmCheckBefore) 12231 jr rBIX 12232 12233/* ------------------------------ */ 12234 .balign 128 12235.L_ALT_OP_MOVE_FROM16: /* 0x02 */ 12236/* File: mips/alt_stub.S */ 12237/* 12238 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12239 * any interesting requests and then jump to the real instruction 12240 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12241 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12242 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12243 * bail to the real handler if breakFlags==0. 12244 */ 12245 lbu a3, offThread_breakFlags(rSELF) 12246 la rBIX, dvmAsmInstructionStart + (2 * 128) 12247 lw rIBASE, offThread_curHandlerTable(rSELF) 12248 bnez a3, 1f 12249 jr rBIX # nothing to do - jump to real handler 122501: 12251 EXPORT_PC() 12252 move a0, rPC # arg0 12253 move a1, rFP # arg1 12254 move a2, rSELF # arg2 12255 JAL(dvmCheckBefore) 12256 jr rBIX 12257 12258/* ------------------------------ */ 12259 .balign 128 12260.L_ALT_OP_MOVE_16: /* 0x03 */ 12261/* File: mips/alt_stub.S */ 12262/* 12263 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12264 * any interesting requests and then jump to the real instruction 12265 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12266 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12267 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12268 * bail to the real handler if breakFlags==0. 12269 */ 12270 lbu a3, offThread_breakFlags(rSELF) 12271 la rBIX, dvmAsmInstructionStart + (3 * 128) 12272 lw rIBASE, offThread_curHandlerTable(rSELF) 12273 bnez a3, 1f 12274 jr rBIX # nothing to do - jump to real handler 122751: 12276 EXPORT_PC() 12277 move a0, rPC # arg0 12278 move a1, rFP # arg1 12279 move a2, rSELF # arg2 12280 JAL(dvmCheckBefore) 12281 jr rBIX 12282 12283/* ------------------------------ */ 12284 .balign 128 12285.L_ALT_OP_MOVE_WIDE: /* 0x04 */ 12286/* File: mips/alt_stub.S */ 12287/* 12288 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12289 * any interesting requests and then jump to the real instruction 12290 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12291 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12292 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12293 * bail to the real handler if breakFlags==0. 12294 */ 12295 lbu a3, offThread_breakFlags(rSELF) 12296 la rBIX, dvmAsmInstructionStart + (4 * 128) 12297 lw rIBASE, offThread_curHandlerTable(rSELF) 12298 bnez a3, 1f 12299 jr rBIX # nothing to do - jump to real handler 123001: 12301 EXPORT_PC() 12302 move a0, rPC # arg0 12303 move a1, rFP # arg1 12304 move a2, rSELF # arg2 12305 JAL(dvmCheckBefore) 12306 jr rBIX 12307 12308/* ------------------------------ */ 12309 .balign 128 12310.L_ALT_OP_MOVE_WIDE_FROM16: /* 0x05 */ 12311/* File: mips/alt_stub.S */ 12312/* 12313 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12314 * any interesting requests and then jump to the real instruction 12315 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12316 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12317 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12318 * bail to the real handler if breakFlags==0. 12319 */ 12320 lbu a3, offThread_breakFlags(rSELF) 12321 la rBIX, dvmAsmInstructionStart + (5 * 128) 12322 lw rIBASE, offThread_curHandlerTable(rSELF) 12323 bnez a3, 1f 12324 jr rBIX # nothing to do - jump to real handler 123251: 12326 EXPORT_PC() 12327 move a0, rPC # arg0 12328 move a1, rFP # arg1 12329 move a2, rSELF # arg2 12330 JAL(dvmCheckBefore) 12331 jr rBIX 12332 12333/* ------------------------------ */ 12334 .balign 128 12335.L_ALT_OP_MOVE_WIDE_16: /* 0x06 */ 12336/* File: mips/alt_stub.S */ 12337/* 12338 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12339 * any interesting requests and then jump to the real instruction 12340 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12341 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12342 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12343 * bail to the real handler if breakFlags==0. 12344 */ 12345 lbu a3, offThread_breakFlags(rSELF) 12346 la rBIX, dvmAsmInstructionStart + (6 * 128) 12347 lw rIBASE, offThread_curHandlerTable(rSELF) 12348 bnez a3, 1f 12349 jr rBIX # nothing to do - jump to real handler 123501: 12351 EXPORT_PC() 12352 move a0, rPC # arg0 12353 move a1, rFP # arg1 12354 move a2, rSELF # arg2 12355 JAL(dvmCheckBefore) 12356 jr rBIX 12357 12358/* ------------------------------ */ 12359 .balign 128 12360.L_ALT_OP_MOVE_OBJECT: /* 0x07 */ 12361/* File: mips/alt_stub.S */ 12362/* 12363 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12364 * any interesting requests and then jump to the real instruction 12365 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12366 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12367 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12368 * bail to the real handler if breakFlags==0. 12369 */ 12370 lbu a3, offThread_breakFlags(rSELF) 12371 la rBIX, dvmAsmInstructionStart + (7 * 128) 12372 lw rIBASE, offThread_curHandlerTable(rSELF) 12373 bnez a3, 1f 12374 jr rBIX # nothing to do - jump to real handler 123751: 12376 EXPORT_PC() 12377 move a0, rPC # arg0 12378 move a1, rFP # arg1 12379 move a2, rSELF # arg2 12380 JAL(dvmCheckBefore) 12381 jr rBIX 12382 12383/* ------------------------------ */ 12384 .balign 128 12385.L_ALT_OP_MOVE_OBJECT_FROM16: /* 0x08 */ 12386/* File: mips/alt_stub.S */ 12387/* 12388 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12389 * any interesting requests and then jump to the real instruction 12390 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12391 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12392 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12393 * bail to the real handler if breakFlags==0. 12394 */ 12395 lbu a3, offThread_breakFlags(rSELF) 12396 la rBIX, dvmAsmInstructionStart + (8 * 128) 12397 lw rIBASE, offThread_curHandlerTable(rSELF) 12398 bnez a3, 1f 12399 jr rBIX # nothing to do - jump to real handler 124001: 12401 EXPORT_PC() 12402 move a0, rPC # arg0 12403 move a1, rFP # arg1 12404 move a2, rSELF # arg2 12405 JAL(dvmCheckBefore) 12406 jr rBIX 12407 12408/* ------------------------------ */ 12409 .balign 128 12410.L_ALT_OP_MOVE_OBJECT_16: /* 0x09 */ 12411/* File: mips/alt_stub.S */ 12412/* 12413 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12414 * any interesting requests and then jump to the real instruction 12415 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12416 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12417 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12418 * bail to the real handler if breakFlags==0. 12419 */ 12420 lbu a3, offThread_breakFlags(rSELF) 12421 la rBIX, dvmAsmInstructionStart + (9 * 128) 12422 lw rIBASE, offThread_curHandlerTable(rSELF) 12423 bnez a3, 1f 12424 jr rBIX # nothing to do - jump to real handler 124251: 12426 EXPORT_PC() 12427 move a0, rPC # arg0 12428 move a1, rFP # arg1 12429 move a2, rSELF # arg2 12430 JAL(dvmCheckBefore) 12431 jr rBIX 12432 12433/* ------------------------------ */ 12434 .balign 128 12435.L_ALT_OP_MOVE_RESULT: /* 0x0a */ 12436/* File: mips/alt_stub.S */ 12437/* 12438 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12439 * any interesting requests and then jump to the real instruction 12440 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12441 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12442 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12443 * bail to the real handler if breakFlags==0. 12444 */ 12445 lbu a3, offThread_breakFlags(rSELF) 12446 la rBIX, dvmAsmInstructionStart + (10 * 128) 12447 lw rIBASE, offThread_curHandlerTable(rSELF) 12448 bnez a3, 1f 12449 jr rBIX # nothing to do - jump to real handler 124501: 12451 EXPORT_PC() 12452 move a0, rPC # arg0 12453 move a1, rFP # arg1 12454 move a2, rSELF # arg2 12455 JAL(dvmCheckBefore) 12456 jr rBIX 12457 12458/* ------------------------------ */ 12459 .balign 128 12460.L_ALT_OP_MOVE_RESULT_WIDE: /* 0x0b */ 12461/* File: mips/alt_stub.S */ 12462/* 12463 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12464 * any interesting requests and then jump to the real instruction 12465 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12466 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12467 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12468 * bail to the real handler if breakFlags==0. 12469 */ 12470 lbu a3, offThread_breakFlags(rSELF) 12471 la rBIX, dvmAsmInstructionStart + (11 * 128) 12472 lw rIBASE, offThread_curHandlerTable(rSELF) 12473 bnez a3, 1f 12474 jr rBIX # nothing to do - jump to real handler 124751: 12476 EXPORT_PC() 12477 move a0, rPC # arg0 12478 move a1, rFP # arg1 12479 move a2, rSELF # arg2 12480 JAL(dvmCheckBefore) 12481 jr rBIX 12482 12483/* ------------------------------ */ 12484 .balign 128 12485.L_ALT_OP_MOVE_RESULT_OBJECT: /* 0x0c */ 12486/* File: mips/alt_stub.S */ 12487/* 12488 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12489 * any interesting requests and then jump to the real instruction 12490 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12491 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12492 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12493 * bail to the real handler if breakFlags==0. 12494 */ 12495 lbu a3, offThread_breakFlags(rSELF) 12496 la rBIX, dvmAsmInstructionStart + (12 * 128) 12497 lw rIBASE, offThread_curHandlerTable(rSELF) 12498 bnez a3, 1f 12499 jr rBIX # nothing to do - jump to real handler 125001: 12501 EXPORT_PC() 12502 move a0, rPC # arg0 12503 move a1, rFP # arg1 12504 move a2, rSELF # arg2 12505 JAL(dvmCheckBefore) 12506 jr rBIX 12507 12508/* ------------------------------ */ 12509 .balign 128 12510.L_ALT_OP_MOVE_EXCEPTION: /* 0x0d */ 12511/* File: mips/alt_stub.S */ 12512/* 12513 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12514 * any interesting requests and then jump to the real instruction 12515 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12516 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12517 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12518 * bail to the real handler if breakFlags==0. 12519 */ 12520 lbu a3, offThread_breakFlags(rSELF) 12521 la rBIX, dvmAsmInstructionStart + (13 * 128) 12522 lw rIBASE, offThread_curHandlerTable(rSELF) 12523 bnez a3, 1f 12524 jr rBIX # nothing to do - jump to real handler 125251: 12526 EXPORT_PC() 12527 move a0, rPC # arg0 12528 move a1, rFP # arg1 12529 move a2, rSELF # arg2 12530 JAL(dvmCheckBefore) 12531 jr rBIX 12532 12533/* ------------------------------ */ 12534 .balign 128 12535.L_ALT_OP_RETURN_VOID: /* 0x0e */ 12536/* File: mips/alt_stub.S */ 12537/* 12538 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12539 * any interesting requests and then jump to the real instruction 12540 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12541 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12542 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12543 * bail to the real handler if breakFlags==0. 12544 */ 12545 lbu a3, offThread_breakFlags(rSELF) 12546 la rBIX, dvmAsmInstructionStart + (14 * 128) 12547 lw rIBASE, offThread_curHandlerTable(rSELF) 12548 bnez a3, 1f 12549 jr rBIX # nothing to do - jump to real handler 125501: 12551 EXPORT_PC() 12552 move a0, rPC # arg0 12553 move a1, rFP # arg1 12554 move a2, rSELF # arg2 12555 JAL(dvmCheckBefore) 12556 jr rBIX 12557 12558/* ------------------------------ */ 12559 .balign 128 12560.L_ALT_OP_RETURN: /* 0x0f */ 12561/* File: mips/alt_stub.S */ 12562/* 12563 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12564 * any interesting requests and then jump to the real instruction 12565 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12566 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12567 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12568 * bail to the real handler if breakFlags==0. 12569 */ 12570 lbu a3, offThread_breakFlags(rSELF) 12571 la rBIX, dvmAsmInstructionStart + (15 * 128) 12572 lw rIBASE, offThread_curHandlerTable(rSELF) 12573 bnez a3, 1f 12574 jr rBIX # nothing to do - jump to real handler 125751: 12576 EXPORT_PC() 12577 move a0, rPC # arg0 12578 move a1, rFP # arg1 12579 move a2, rSELF # arg2 12580 JAL(dvmCheckBefore) 12581 jr rBIX 12582 12583/* ------------------------------ */ 12584 .balign 128 12585.L_ALT_OP_RETURN_WIDE: /* 0x10 */ 12586/* File: mips/alt_stub.S */ 12587/* 12588 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12589 * any interesting requests and then jump to the real instruction 12590 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12591 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12592 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12593 * bail to the real handler if breakFlags==0. 12594 */ 12595 lbu a3, offThread_breakFlags(rSELF) 12596 la rBIX, dvmAsmInstructionStart + (16 * 128) 12597 lw rIBASE, offThread_curHandlerTable(rSELF) 12598 bnez a3, 1f 12599 jr rBIX # nothing to do - jump to real handler 126001: 12601 EXPORT_PC() 12602 move a0, rPC # arg0 12603 move a1, rFP # arg1 12604 move a2, rSELF # arg2 12605 JAL(dvmCheckBefore) 12606 jr rBIX 12607 12608/* ------------------------------ */ 12609 .balign 128 12610.L_ALT_OP_RETURN_OBJECT: /* 0x11 */ 12611/* File: mips/alt_stub.S */ 12612/* 12613 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12614 * any interesting requests and then jump to the real instruction 12615 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12616 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12617 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12618 * bail to the real handler if breakFlags==0. 12619 */ 12620 lbu a3, offThread_breakFlags(rSELF) 12621 la rBIX, dvmAsmInstructionStart + (17 * 128) 12622 lw rIBASE, offThread_curHandlerTable(rSELF) 12623 bnez a3, 1f 12624 jr rBIX # nothing to do - jump to real handler 126251: 12626 EXPORT_PC() 12627 move a0, rPC # arg0 12628 move a1, rFP # arg1 12629 move a2, rSELF # arg2 12630 JAL(dvmCheckBefore) 12631 jr rBIX 12632 12633/* ------------------------------ */ 12634 .balign 128 12635.L_ALT_OP_CONST_4: /* 0x12 */ 12636/* File: mips/alt_stub.S */ 12637/* 12638 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12639 * any interesting requests and then jump to the real instruction 12640 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12641 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12642 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12643 * bail to the real handler if breakFlags==0. 12644 */ 12645 lbu a3, offThread_breakFlags(rSELF) 12646 la rBIX, dvmAsmInstructionStart + (18 * 128) 12647 lw rIBASE, offThread_curHandlerTable(rSELF) 12648 bnez a3, 1f 12649 jr rBIX # nothing to do - jump to real handler 126501: 12651 EXPORT_PC() 12652 move a0, rPC # arg0 12653 move a1, rFP # arg1 12654 move a2, rSELF # arg2 12655 JAL(dvmCheckBefore) 12656 jr rBIX 12657 12658/* ------------------------------ */ 12659 .balign 128 12660.L_ALT_OP_CONST_16: /* 0x13 */ 12661/* File: mips/alt_stub.S */ 12662/* 12663 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12664 * any interesting requests and then jump to the real instruction 12665 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12666 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12667 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12668 * bail to the real handler if breakFlags==0. 12669 */ 12670 lbu a3, offThread_breakFlags(rSELF) 12671 la rBIX, dvmAsmInstructionStart + (19 * 128) 12672 lw rIBASE, offThread_curHandlerTable(rSELF) 12673 bnez a3, 1f 12674 jr rBIX # nothing to do - jump to real handler 126751: 12676 EXPORT_PC() 12677 move a0, rPC # arg0 12678 move a1, rFP # arg1 12679 move a2, rSELF # arg2 12680 JAL(dvmCheckBefore) 12681 jr rBIX 12682 12683/* ------------------------------ */ 12684 .balign 128 12685.L_ALT_OP_CONST: /* 0x14 */ 12686/* File: mips/alt_stub.S */ 12687/* 12688 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12689 * any interesting requests and then jump to the real instruction 12690 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12691 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12692 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12693 * bail to the real handler if breakFlags==0. 12694 */ 12695 lbu a3, offThread_breakFlags(rSELF) 12696 la rBIX, dvmAsmInstructionStart + (20 * 128) 12697 lw rIBASE, offThread_curHandlerTable(rSELF) 12698 bnez a3, 1f 12699 jr rBIX # nothing to do - jump to real handler 127001: 12701 EXPORT_PC() 12702 move a0, rPC # arg0 12703 move a1, rFP # arg1 12704 move a2, rSELF # arg2 12705 JAL(dvmCheckBefore) 12706 jr rBIX 12707 12708/* ------------------------------ */ 12709 .balign 128 12710.L_ALT_OP_CONST_HIGH16: /* 0x15 */ 12711/* File: mips/alt_stub.S */ 12712/* 12713 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12714 * any interesting requests and then jump to the real instruction 12715 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12716 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12717 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12718 * bail to the real handler if breakFlags==0. 12719 */ 12720 lbu a3, offThread_breakFlags(rSELF) 12721 la rBIX, dvmAsmInstructionStart + (21 * 128) 12722 lw rIBASE, offThread_curHandlerTable(rSELF) 12723 bnez a3, 1f 12724 jr rBIX # nothing to do - jump to real handler 127251: 12726 EXPORT_PC() 12727 move a0, rPC # arg0 12728 move a1, rFP # arg1 12729 move a2, rSELF # arg2 12730 JAL(dvmCheckBefore) 12731 jr rBIX 12732 12733/* ------------------------------ */ 12734 .balign 128 12735.L_ALT_OP_CONST_WIDE_16: /* 0x16 */ 12736/* File: mips/alt_stub.S */ 12737/* 12738 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12739 * any interesting requests and then jump to the real instruction 12740 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12741 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12742 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12743 * bail to the real handler if breakFlags==0. 12744 */ 12745 lbu a3, offThread_breakFlags(rSELF) 12746 la rBIX, dvmAsmInstructionStart + (22 * 128) 12747 lw rIBASE, offThread_curHandlerTable(rSELF) 12748 bnez a3, 1f 12749 jr rBIX # nothing to do - jump to real handler 127501: 12751 EXPORT_PC() 12752 move a0, rPC # arg0 12753 move a1, rFP # arg1 12754 move a2, rSELF # arg2 12755 JAL(dvmCheckBefore) 12756 jr rBIX 12757 12758/* ------------------------------ */ 12759 .balign 128 12760.L_ALT_OP_CONST_WIDE_32: /* 0x17 */ 12761/* File: mips/alt_stub.S */ 12762/* 12763 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12764 * any interesting requests and then jump to the real instruction 12765 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12766 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12767 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12768 * bail to the real handler if breakFlags==0. 12769 */ 12770 lbu a3, offThread_breakFlags(rSELF) 12771 la rBIX, dvmAsmInstructionStart + (23 * 128) 12772 lw rIBASE, offThread_curHandlerTable(rSELF) 12773 bnez a3, 1f 12774 jr rBIX # nothing to do - jump to real handler 127751: 12776 EXPORT_PC() 12777 move a0, rPC # arg0 12778 move a1, rFP # arg1 12779 move a2, rSELF # arg2 12780 JAL(dvmCheckBefore) 12781 jr rBIX 12782 12783/* ------------------------------ */ 12784 .balign 128 12785.L_ALT_OP_CONST_WIDE: /* 0x18 */ 12786/* File: mips/alt_stub.S */ 12787/* 12788 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12789 * any interesting requests and then jump to the real instruction 12790 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12791 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12792 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12793 * bail to the real handler if breakFlags==0. 12794 */ 12795 lbu a3, offThread_breakFlags(rSELF) 12796 la rBIX, dvmAsmInstructionStart + (24 * 128) 12797 lw rIBASE, offThread_curHandlerTable(rSELF) 12798 bnez a3, 1f 12799 jr rBIX # nothing to do - jump to real handler 128001: 12801 EXPORT_PC() 12802 move a0, rPC # arg0 12803 move a1, rFP # arg1 12804 move a2, rSELF # arg2 12805 JAL(dvmCheckBefore) 12806 jr rBIX 12807 12808/* ------------------------------ */ 12809 .balign 128 12810.L_ALT_OP_CONST_WIDE_HIGH16: /* 0x19 */ 12811/* File: mips/alt_stub.S */ 12812/* 12813 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12814 * any interesting requests and then jump to the real instruction 12815 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12816 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12817 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12818 * bail to the real handler if breakFlags==0. 12819 */ 12820 lbu a3, offThread_breakFlags(rSELF) 12821 la rBIX, dvmAsmInstructionStart + (25 * 128) 12822 lw rIBASE, offThread_curHandlerTable(rSELF) 12823 bnez a3, 1f 12824 jr rBIX # nothing to do - jump to real handler 128251: 12826 EXPORT_PC() 12827 move a0, rPC # arg0 12828 move a1, rFP # arg1 12829 move a2, rSELF # arg2 12830 JAL(dvmCheckBefore) 12831 jr rBIX 12832 12833/* ------------------------------ */ 12834 .balign 128 12835.L_ALT_OP_CONST_STRING: /* 0x1a */ 12836/* File: mips/alt_stub.S */ 12837/* 12838 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12839 * any interesting requests and then jump to the real instruction 12840 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12841 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12842 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12843 * bail to the real handler if breakFlags==0. 12844 */ 12845 lbu a3, offThread_breakFlags(rSELF) 12846 la rBIX, dvmAsmInstructionStart + (26 * 128) 12847 lw rIBASE, offThread_curHandlerTable(rSELF) 12848 bnez a3, 1f 12849 jr rBIX # nothing to do - jump to real handler 128501: 12851 EXPORT_PC() 12852 move a0, rPC # arg0 12853 move a1, rFP # arg1 12854 move a2, rSELF # arg2 12855 JAL(dvmCheckBefore) 12856 jr rBIX 12857 12858/* ------------------------------ */ 12859 .balign 128 12860.L_ALT_OP_CONST_STRING_JUMBO: /* 0x1b */ 12861/* File: mips/alt_stub.S */ 12862/* 12863 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12864 * any interesting requests and then jump to the real instruction 12865 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12866 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12867 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12868 * bail to the real handler if breakFlags==0. 12869 */ 12870 lbu a3, offThread_breakFlags(rSELF) 12871 la rBIX, dvmAsmInstructionStart + (27 * 128) 12872 lw rIBASE, offThread_curHandlerTable(rSELF) 12873 bnez a3, 1f 12874 jr rBIX # nothing to do - jump to real handler 128751: 12876 EXPORT_PC() 12877 move a0, rPC # arg0 12878 move a1, rFP # arg1 12879 move a2, rSELF # arg2 12880 JAL(dvmCheckBefore) 12881 jr rBIX 12882 12883/* ------------------------------ */ 12884 .balign 128 12885.L_ALT_OP_CONST_CLASS: /* 0x1c */ 12886/* File: mips/alt_stub.S */ 12887/* 12888 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12889 * any interesting requests and then jump to the real instruction 12890 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12891 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12892 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12893 * bail to the real handler if breakFlags==0. 12894 */ 12895 lbu a3, offThread_breakFlags(rSELF) 12896 la rBIX, dvmAsmInstructionStart + (28 * 128) 12897 lw rIBASE, offThread_curHandlerTable(rSELF) 12898 bnez a3, 1f 12899 jr rBIX # nothing to do - jump to real handler 129001: 12901 EXPORT_PC() 12902 move a0, rPC # arg0 12903 move a1, rFP # arg1 12904 move a2, rSELF # arg2 12905 JAL(dvmCheckBefore) 12906 jr rBIX 12907 12908/* ------------------------------ */ 12909 .balign 128 12910.L_ALT_OP_MONITOR_ENTER: /* 0x1d */ 12911/* File: mips/alt_stub.S */ 12912/* 12913 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12914 * any interesting requests and then jump to the real instruction 12915 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12916 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12917 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12918 * bail to the real handler if breakFlags==0. 12919 */ 12920 lbu a3, offThread_breakFlags(rSELF) 12921 la rBIX, dvmAsmInstructionStart + (29 * 128) 12922 lw rIBASE, offThread_curHandlerTable(rSELF) 12923 bnez a3, 1f 12924 jr rBIX # nothing to do - jump to real handler 129251: 12926 EXPORT_PC() 12927 move a0, rPC # arg0 12928 move a1, rFP # arg1 12929 move a2, rSELF # arg2 12930 JAL(dvmCheckBefore) 12931 jr rBIX 12932 12933/* ------------------------------ */ 12934 .balign 128 12935.L_ALT_OP_MONITOR_EXIT: /* 0x1e */ 12936/* File: mips/alt_stub.S */ 12937/* 12938 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12939 * any interesting requests and then jump to the real instruction 12940 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12941 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12942 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12943 * bail to the real handler if breakFlags==0. 12944 */ 12945 lbu a3, offThread_breakFlags(rSELF) 12946 la rBIX, dvmAsmInstructionStart + (30 * 128) 12947 lw rIBASE, offThread_curHandlerTable(rSELF) 12948 bnez a3, 1f 12949 jr rBIX # nothing to do - jump to real handler 129501: 12951 EXPORT_PC() 12952 move a0, rPC # arg0 12953 move a1, rFP # arg1 12954 move a2, rSELF # arg2 12955 JAL(dvmCheckBefore) 12956 jr rBIX 12957 12958/* ------------------------------ */ 12959 .balign 128 12960.L_ALT_OP_CHECK_CAST: /* 0x1f */ 12961/* File: mips/alt_stub.S */ 12962/* 12963 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12964 * any interesting requests and then jump to the real instruction 12965 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12966 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12967 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12968 * bail to the real handler if breakFlags==0. 12969 */ 12970 lbu a3, offThread_breakFlags(rSELF) 12971 la rBIX, dvmAsmInstructionStart + (31 * 128) 12972 lw rIBASE, offThread_curHandlerTable(rSELF) 12973 bnez a3, 1f 12974 jr rBIX # nothing to do - jump to real handler 129751: 12976 EXPORT_PC() 12977 move a0, rPC # arg0 12978 move a1, rFP # arg1 12979 move a2, rSELF # arg2 12980 JAL(dvmCheckBefore) 12981 jr rBIX 12982 12983/* ------------------------------ */ 12984 .balign 128 12985.L_ALT_OP_INSTANCE_OF: /* 0x20 */ 12986/* File: mips/alt_stub.S */ 12987/* 12988 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 12989 * any interesting requests and then jump to the real instruction 12990 * handler. Note that the call to dvmCheckBefore is done as a tail call. 12991 * rIBASE updates won't be seen until a refresh, and we can tell we have a 12992 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 12993 * bail to the real handler if breakFlags==0. 12994 */ 12995 lbu a3, offThread_breakFlags(rSELF) 12996 la rBIX, dvmAsmInstructionStart + (32 * 128) 12997 lw rIBASE, offThread_curHandlerTable(rSELF) 12998 bnez a3, 1f 12999 jr rBIX # nothing to do - jump to real handler 130001: 13001 EXPORT_PC() 13002 move a0, rPC # arg0 13003 move a1, rFP # arg1 13004 move a2, rSELF # arg2 13005 JAL(dvmCheckBefore) 13006 jr rBIX 13007 13008/* ------------------------------ */ 13009 .balign 128 13010.L_ALT_OP_ARRAY_LENGTH: /* 0x21 */ 13011/* File: mips/alt_stub.S */ 13012/* 13013 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13014 * any interesting requests and then jump to the real instruction 13015 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13016 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13017 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13018 * bail to the real handler if breakFlags==0. 13019 */ 13020 lbu a3, offThread_breakFlags(rSELF) 13021 la rBIX, dvmAsmInstructionStart + (33 * 128) 13022 lw rIBASE, offThread_curHandlerTable(rSELF) 13023 bnez a3, 1f 13024 jr rBIX # nothing to do - jump to real handler 130251: 13026 EXPORT_PC() 13027 move a0, rPC # arg0 13028 move a1, rFP # arg1 13029 move a2, rSELF # arg2 13030 JAL(dvmCheckBefore) 13031 jr rBIX 13032 13033/* ------------------------------ */ 13034 .balign 128 13035.L_ALT_OP_NEW_INSTANCE: /* 0x22 */ 13036/* File: mips/alt_stub.S */ 13037/* 13038 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13039 * any interesting requests and then jump to the real instruction 13040 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13041 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13042 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13043 * bail to the real handler if breakFlags==0. 13044 */ 13045 lbu a3, offThread_breakFlags(rSELF) 13046 la rBIX, dvmAsmInstructionStart + (34 * 128) 13047 lw rIBASE, offThread_curHandlerTable(rSELF) 13048 bnez a3, 1f 13049 jr rBIX # nothing to do - jump to real handler 130501: 13051 EXPORT_PC() 13052 move a0, rPC # arg0 13053 move a1, rFP # arg1 13054 move a2, rSELF # arg2 13055 JAL(dvmCheckBefore) 13056 jr rBIX 13057 13058/* ------------------------------ */ 13059 .balign 128 13060.L_ALT_OP_NEW_ARRAY: /* 0x23 */ 13061/* File: mips/alt_stub.S */ 13062/* 13063 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13064 * any interesting requests and then jump to the real instruction 13065 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13066 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13067 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13068 * bail to the real handler if breakFlags==0. 13069 */ 13070 lbu a3, offThread_breakFlags(rSELF) 13071 la rBIX, dvmAsmInstructionStart + (35 * 128) 13072 lw rIBASE, offThread_curHandlerTable(rSELF) 13073 bnez a3, 1f 13074 jr rBIX # nothing to do - jump to real handler 130751: 13076 EXPORT_PC() 13077 move a0, rPC # arg0 13078 move a1, rFP # arg1 13079 move a2, rSELF # arg2 13080 JAL(dvmCheckBefore) 13081 jr rBIX 13082 13083/* ------------------------------ */ 13084 .balign 128 13085.L_ALT_OP_FILLED_NEW_ARRAY: /* 0x24 */ 13086/* File: mips/alt_stub.S */ 13087/* 13088 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13089 * any interesting requests and then jump to the real instruction 13090 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13091 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13092 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13093 * bail to the real handler if breakFlags==0. 13094 */ 13095 lbu a3, offThread_breakFlags(rSELF) 13096 la rBIX, dvmAsmInstructionStart + (36 * 128) 13097 lw rIBASE, offThread_curHandlerTable(rSELF) 13098 bnez a3, 1f 13099 jr rBIX # nothing to do - jump to real handler 131001: 13101 EXPORT_PC() 13102 move a0, rPC # arg0 13103 move a1, rFP # arg1 13104 move a2, rSELF # arg2 13105 JAL(dvmCheckBefore) 13106 jr rBIX 13107 13108/* ------------------------------ */ 13109 .balign 128 13110.L_ALT_OP_FILLED_NEW_ARRAY_RANGE: /* 0x25 */ 13111/* File: mips/alt_stub.S */ 13112/* 13113 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13114 * any interesting requests and then jump to the real instruction 13115 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13116 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13117 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13118 * bail to the real handler if breakFlags==0. 13119 */ 13120 lbu a3, offThread_breakFlags(rSELF) 13121 la rBIX, dvmAsmInstructionStart + (37 * 128) 13122 lw rIBASE, offThread_curHandlerTable(rSELF) 13123 bnez a3, 1f 13124 jr rBIX # nothing to do - jump to real handler 131251: 13126 EXPORT_PC() 13127 move a0, rPC # arg0 13128 move a1, rFP # arg1 13129 move a2, rSELF # arg2 13130 JAL(dvmCheckBefore) 13131 jr rBIX 13132 13133/* ------------------------------ */ 13134 .balign 128 13135.L_ALT_OP_FILL_ARRAY_DATA: /* 0x26 */ 13136/* File: mips/alt_stub.S */ 13137/* 13138 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13139 * any interesting requests and then jump to the real instruction 13140 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13141 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13142 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13143 * bail to the real handler if breakFlags==0. 13144 */ 13145 lbu a3, offThread_breakFlags(rSELF) 13146 la rBIX, dvmAsmInstructionStart + (38 * 128) 13147 lw rIBASE, offThread_curHandlerTable(rSELF) 13148 bnez a3, 1f 13149 jr rBIX # nothing to do - jump to real handler 131501: 13151 EXPORT_PC() 13152 move a0, rPC # arg0 13153 move a1, rFP # arg1 13154 move a2, rSELF # arg2 13155 JAL(dvmCheckBefore) 13156 jr rBIX 13157 13158/* ------------------------------ */ 13159 .balign 128 13160.L_ALT_OP_THROW: /* 0x27 */ 13161/* File: mips/alt_stub.S */ 13162/* 13163 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13164 * any interesting requests and then jump to the real instruction 13165 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13166 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13167 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13168 * bail to the real handler if breakFlags==0. 13169 */ 13170 lbu a3, offThread_breakFlags(rSELF) 13171 la rBIX, dvmAsmInstructionStart + (39 * 128) 13172 lw rIBASE, offThread_curHandlerTable(rSELF) 13173 bnez a3, 1f 13174 jr rBIX # nothing to do - jump to real handler 131751: 13176 EXPORT_PC() 13177 move a0, rPC # arg0 13178 move a1, rFP # arg1 13179 move a2, rSELF # arg2 13180 JAL(dvmCheckBefore) 13181 jr rBIX 13182 13183/* ------------------------------ */ 13184 .balign 128 13185.L_ALT_OP_GOTO: /* 0x28 */ 13186/* File: mips/alt_stub.S */ 13187/* 13188 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13189 * any interesting requests and then jump to the real instruction 13190 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13191 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13192 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13193 * bail to the real handler if breakFlags==0. 13194 */ 13195 lbu a3, offThread_breakFlags(rSELF) 13196 la rBIX, dvmAsmInstructionStart + (40 * 128) 13197 lw rIBASE, offThread_curHandlerTable(rSELF) 13198 bnez a3, 1f 13199 jr rBIX # nothing to do - jump to real handler 132001: 13201 EXPORT_PC() 13202 move a0, rPC # arg0 13203 move a1, rFP # arg1 13204 move a2, rSELF # arg2 13205 JAL(dvmCheckBefore) 13206 jr rBIX 13207 13208/* ------------------------------ */ 13209 .balign 128 13210.L_ALT_OP_GOTO_16: /* 0x29 */ 13211/* File: mips/alt_stub.S */ 13212/* 13213 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13214 * any interesting requests and then jump to the real instruction 13215 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13216 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13217 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13218 * bail to the real handler if breakFlags==0. 13219 */ 13220 lbu a3, offThread_breakFlags(rSELF) 13221 la rBIX, dvmAsmInstructionStart + (41 * 128) 13222 lw rIBASE, offThread_curHandlerTable(rSELF) 13223 bnez a3, 1f 13224 jr rBIX # nothing to do - jump to real handler 132251: 13226 EXPORT_PC() 13227 move a0, rPC # arg0 13228 move a1, rFP # arg1 13229 move a2, rSELF # arg2 13230 JAL(dvmCheckBefore) 13231 jr rBIX 13232 13233/* ------------------------------ */ 13234 .balign 128 13235.L_ALT_OP_GOTO_32: /* 0x2a */ 13236/* File: mips/alt_stub.S */ 13237/* 13238 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13239 * any interesting requests and then jump to the real instruction 13240 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13241 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13242 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13243 * bail to the real handler if breakFlags==0. 13244 */ 13245 lbu a3, offThread_breakFlags(rSELF) 13246 la rBIX, dvmAsmInstructionStart + (42 * 128) 13247 lw rIBASE, offThread_curHandlerTable(rSELF) 13248 bnez a3, 1f 13249 jr rBIX # nothing to do - jump to real handler 132501: 13251 EXPORT_PC() 13252 move a0, rPC # arg0 13253 move a1, rFP # arg1 13254 move a2, rSELF # arg2 13255 JAL(dvmCheckBefore) 13256 jr rBIX 13257 13258/* ------------------------------ */ 13259 .balign 128 13260.L_ALT_OP_PACKED_SWITCH: /* 0x2b */ 13261/* File: mips/alt_stub.S */ 13262/* 13263 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13264 * any interesting requests and then jump to the real instruction 13265 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13266 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13267 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13268 * bail to the real handler if breakFlags==0. 13269 */ 13270 lbu a3, offThread_breakFlags(rSELF) 13271 la rBIX, dvmAsmInstructionStart + (43 * 128) 13272 lw rIBASE, offThread_curHandlerTable(rSELF) 13273 bnez a3, 1f 13274 jr rBIX # nothing to do - jump to real handler 132751: 13276 EXPORT_PC() 13277 move a0, rPC # arg0 13278 move a1, rFP # arg1 13279 move a2, rSELF # arg2 13280 JAL(dvmCheckBefore) 13281 jr rBIX 13282 13283/* ------------------------------ */ 13284 .balign 128 13285.L_ALT_OP_SPARSE_SWITCH: /* 0x2c */ 13286/* File: mips/alt_stub.S */ 13287/* 13288 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13289 * any interesting requests and then jump to the real instruction 13290 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13291 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13292 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13293 * bail to the real handler if breakFlags==0. 13294 */ 13295 lbu a3, offThread_breakFlags(rSELF) 13296 la rBIX, dvmAsmInstructionStart + (44 * 128) 13297 lw rIBASE, offThread_curHandlerTable(rSELF) 13298 bnez a3, 1f 13299 jr rBIX # nothing to do - jump to real handler 133001: 13301 EXPORT_PC() 13302 move a0, rPC # arg0 13303 move a1, rFP # arg1 13304 move a2, rSELF # arg2 13305 JAL(dvmCheckBefore) 13306 jr rBIX 13307 13308/* ------------------------------ */ 13309 .balign 128 13310.L_ALT_OP_CMPL_FLOAT: /* 0x2d */ 13311/* File: mips/alt_stub.S */ 13312/* 13313 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13314 * any interesting requests and then jump to the real instruction 13315 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13316 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13317 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13318 * bail to the real handler if breakFlags==0. 13319 */ 13320 lbu a3, offThread_breakFlags(rSELF) 13321 la rBIX, dvmAsmInstructionStart + (45 * 128) 13322 lw rIBASE, offThread_curHandlerTable(rSELF) 13323 bnez a3, 1f 13324 jr rBIX # nothing to do - jump to real handler 133251: 13326 EXPORT_PC() 13327 move a0, rPC # arg0 13328 move a1, rFP # arg1 13329 move a2, rSELF # arg2 13330 JAL(dvmCheckBefore) 13331 jr rBIX 13332 13333/* ------------------------------ */ 13334 .balign 128 13335.L_ALT_OP_CMPG_FLOAT: /* 0x2e */ 13336/* File: mips/alt_stub.S */ 13337/* 13338 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13339 * any interesting requests and then jump to the real instruction 13340 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13341 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13342 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13343 * bail to the real handler if breakFlags==0. 13344 */ 13345 lbu a3, offThread_breakFlags(rSELF) 13346 la rBIX, dvmAsmInstructionStart + (46 * 128) 13347 lw rIBASE, offThread_curHandlerTable(rSELF) 13348 bnez a3, 1f 13349 jr rBIX # nothing to do - jump to real handler 133501: 13351 EXPORT_PC() 13352 move a0, rPC # arg0 13353 move a1, rFP # arg1 13354 move a2, rSELF # arg2 13355 JAL(dvmCheckBefore) 13356 jr rBIX 13357 13358/* ------------------------------ */ 13359 .balign 128 13360.L_ALT_OP_CMPL_DOUBLE: /* 0x2f */ 13361/* File: mips/alt_stub.S */ 13362/* 13363 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13364 * any interesting requests and then jump to the real instruction 13365 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13366 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13367 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13368 * bail to the real handler if breakFlags==0. 13369 */ 13370 lbu a3, offThread_breakFlags(rSELF) 13371 la rBIX, dvmAsmInstructionStart + (47 * 128) 13372 lw rIBASE, offThread_curHandlerTable(rSELF) 13373 bnez a3, 1f 13374 jr rBIX # nothing to do - jump to real handler 133751: 13376 EXPORT_PC() 13377 move a0, rPC # arg0 13378 move a1, rFP # arg1 13379 move a2, rSELF # arg2 13380 JAL(dvmCheckBefore) 13381 jr rBIX 13382 13383/* ------------------------------ */ 13384 .balign 128 13385.L_ALT_OP_CMPG_DOUBLE: /* 0x30 */ 13386/* File: mips/alt_stub.S */ 13387/* 13388 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13389 * any interesting requests and then jump to the real instruction 13390 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13391 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13392 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13393 * bail to the real handler if breakFlags==0. 13394 */ 13395 lbu a3, offThread_breakFlags(rSELF) 13396 la rBIX, dvmAsmInstructionStart + (48 * 128) 13397 lw rIBASE, offThread_curHandlerTable(rSELF) 13398 bnez a3, 1f 13399 jr rBIX # nothing to do - jump to real handler 134001: 13401 EXPORT_PC() 13402 move a0, rPC # arg0 13403 move a1, rFP # arg1 13404 move a2, rSELF # arg2 13405 JAL(dvmCheckBefore) 13406 jr rBIX 13407 13408/* ------------------------------ */ 13409 .balign 128 13410.L_ALT_OP_CMP_LONG: /* 0x31 */ 13411/* File: mips/alt_stub.S */ 13412/* 13413 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13414 * any interesting requests and then jump to the real instruction 13415 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13416 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13417 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13418 * bail to the real handler if breakFlags==0. 13419 */ 13420 lbu a3, offThread_breakFlags(rSELF) 13421 la rBIX, dvmAsmInstructionStart + (49 * 128) 13422 lw rIBASE, offThread_curHandlerTable(rSELF) 13423 bnez a3, 1f 13424 jr rBIX # nothing to do - jump to real handler 134251: 13426 EXPORT_PC() 13427 move a0, rPC # arg0 13428 move a1, rFP # arg1 13429 move a2, rSELF # arg2 13430 JAL(dvmCheckBefore) 13431 jr rBIX 13432 13433/* ------------------------------ */ 13434 .balign 128 13435.L_ALT_OP_IF_EQ: /* 0x32 */ 13436/* File: mips/alt_stub.S */ 13437/* 13438 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13439 * any interesting requests and then jump to the real instruction 13440 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13441 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13442 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13443 * bail to the real handler if breakFlags==0. 13444 */ 13445 lbu a3, offThread_breakFlags(rSELF) 13446 la rBIX, dvmAsmInstructionStart + (50 * 128) 13447 lw rIBASE, offThread_curHandlerTable(rSELF) 13448 bnez a3, 1f 13449 jr rBIX # nothing to do - jump to real handler 134501: 13451 EXPORT_PC() 13452 move a0, rPC # arg0 13453 move a1, rFP # arg1 13454 move a2, rSELF # arg2 13455 JAL(dvmCheckBefore) 13456 jr rBIX 13457 13458/* ------------------------------ */ 13459 .balign 128 13460.L_ALT_OP_IF_NE: /* 0x33 */ 13461/* File: mips/alt_stub.S */ 13462/* 13463 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13464 * any interesting requests and then jump to the real instruction 13465 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13466 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13467 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13468 * bail to the real handler if breakFlags==0. 13469 */ 13470 lbu a3, offThread_breakFlags(rSELF) 13471 la rBIX, dvmAsmInstructionStart + (51 * 128) 13472 lw rIBASE, offThread_curHandlerTable(rSELF) 13473 bnez a3, 1f 13474 jr rBIX # nothing to do - jump to real handler 134751: 13476 EXPORT_PC() 13477 move a0, rPC # arg0 13478 move a1, rFP # arg1 13479 move a2, rSELF # arg2 13480 JAL(dvmCheckBefore) 13481 jr rBIX 13482 13483/* ------------------------------ */ 13484 .balign 128 13485.L_ALT_OP_IF_LT: /* 0x34 */ 13486/* File: mips/alt_stub.S */ 13487/* 13488 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13489 * any interesting requests and then jump to the real instruction 13490 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13491 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13492 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13493 * bail to the real handler if breakFlags==0. 13494 */ 13495 lbu a3, offThread_breakFlags(rSELF) 13496 la rBIX, dvmAsmInstructionStart + (52 * 128) 13497 lw rIBASE, offThread_curHandlerTable(rSELF) 13498 bnez a3, 1f 13499 jr rBIX # nothing to do - jump to real handler 135001: 13501 EXPORT_PC() 13502 move a0, rPC # arg0 13503 move a1, rFP # arg1 13504 move a2, rSELF # arg2 13505 JAL(dvmCheckBefore) 13506 jr rBIX 13507 13508/* ------------------------------ */ 13509 .balign 128 13510.L_ALT_OP_IF_GE: /* 0x35 */ 13511/* File: mips/alt_stub.S */ 13512/* 13513 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13514 * any interesting requests and then jump to the real instruction 13515 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13516 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13517 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13518 * bail to the real handler if breakFlags==0. 13519 */ 13520 lbu a3, offThread_breakFlags(rSELF) 13521 la rBIX, dvmAsmInstructionStart + (53 * 128) 13522 lw rIBASE, offThread_curHandlerTable(rSELF) 13523 bnez a3, 1f 13524 jr rBIX # nothing to do - jump to real handler 135251: 13526 EXPORT_PC() 13527 move a0, rPC # arg0 13528 move a1, rFP # arg1 13529 move a2, rSELF # arg2 13530 JAL(dvmCheckBefore) 13531 jr rBIX 13532 13533/* ------------------------------ */ 13534 .balign 128 13535.L_ALT_OP_IF_GT: /* 0x36 */ 13536/* File: mips/alt_stub.S */ 13537/* 13538 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13539 * any interesting requests and then jump to the real instruction 13540 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13541 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13542 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13543 * bail to the real handler if breakFlags==0. 13544 */ 13545 lbu a3, offThread_breakFlags(rSELF) 13546 la rBIX, dvmAsmInstructionStart + (54 * 128) 13547 lw rIBASE, offThread_curHandlerTable(rSELF) 13548 bnez a3, 1f 13549 jr rBIX # nothing to do - jump to real handler 135501: 13551 EXPORT_PC() 13552 move a0, rPC # arg0 13553 move a1, rFP # arg1 13554 move a2, rSELF # arg2 13555 JAL(dvmCheckBefore) 13556 jr rBIX 13557 13558/* ------------------------------ */ 13559 .balign 128 13560.L_ALT_OP_IF_LE: /* 0x37 */ 13561/* File: mips/alt_stub.S */ 13562/* 13563 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13564 * any interesting requests and then jump to the real instruction 13565 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13566 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13567 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13568 * bail to the real handler if breakFlags==0. 13569 */ 13570 lbu a3, offThread_breakFlags(rSELF) 13571 la rBIX, dvmAsmInstructionStart + (55 * 128) 13572 lw rIBASE, offThread_curHandlerTable(rSELF) 13573 bnez a3, 1f 13574 jr rBIX # nothing to do - jump to real handler 135751: 13576 EXPORT_PC() 13577 move a0, rPC # arg0 13578 move a1, rFP # arg1 13579 move a2, rSELF # arg2 13580 JAL(dvmCheckBefore) 13581 jr rBIX 13582 13583/* ------------------------------ */ 13584 .balign 128 13585.L_ALT_OP_IF_EQZ: /* 0x38 */ 13586/* File: mips/alt_stub.S */ 13587/* 13588 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13589 * any interesting requests and then jump to the real instruction 13590 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13591 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13592 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13593 * bail to the real handler if breakFlags==0. 13594 */ 13595 lbu a3, offThread_breakFlags(rSELF) 13596 la rBIX, dvmAsmInstructionStart + (56 * 128) 13597 lw rIBASE, offThread_curHandlerTable(rSELF) 13598 bnez a3, 1f 13599 jr rBIX # nothing to do - jump to real handler 136001: 13601 EXPORT_PC() 13602 move a0, rPC # arg0 13603 move a1, rFP # arg1 13604 move a2, rSELF # arg2 13605 JAL(dvmCheckBefore) 13606 jr rBIX 13607 13608/* ------------------------------ */ 13609 .balign 128 13610.L_ALT_OP_IF_NEZ: /* 0x39 */ 13611/* File: mips/alt_stub.S */ 13612/* 13613 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13614 * any interesting requests and then jump to the real instruction 13615 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13616 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13617 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13618 * bail to the real handler if breakFlags==0. 13619 */ 13620 lbu a3, offThread_breakFlags(rSELF) 13621 la rBIX, dvmAsmInstructionStart + (57 * 128) 13622 lw rIBASE, offThread_curHandlerTable(rSELF) 13623 bnez a3, 1f 13624 jr rBIX # nothing to do - jump to real handler 136251: 13626 EXPORT_PC() 13627 move a0, rPC # arg0 13628 move a1, rFP # arg1 13629 move a2, rSELF # arg2 13630 JAL(dvmCheckBefore) 13631 jr rBIX 13632 13633/* ------------------------------ */ 13634 .balign 128 13635.L_ALT_OP_IF_LTZ: /* 0x3a */ 13636/* File: mips/alt_stub.S */ 13637/* 13638 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13639 * any interesting requests and then jump to the real instruction 13640 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13641 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13642 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13643 * bail to the real handler if breakFlags==0. 13644 */ 13645 lbu a3, offThread_breakFlags(rSELF) 13646 la rBIX, dvmAsmInstructionStart + (58 * 128) 13647 lw rIBASE, offThread_curHandlerTable(rSELF) 13648 bnez a3, 1f 13649 jr rBIX # nothing to do - jump to real handler 136501: 13651 EXPORT_PC() 13652 move a0, rPC # arg0 13653 move a1, rFP # arg1 13654 move a2, rSELF # arg2 13655 JAL(dvmCheckBefore) 13656 jr rBIX 13657 13658/* ------------------------------ */ 13659 .balign 128 13660.L_ALT_OP_IF_GEZ: /* 0x3b */ 13661/* File: mips/alt_stub.S */ 13662/* 13663 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13664 * any interesting requests and then jump to the real instruction 13665 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13666 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13667 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13668 * bail to the real handler if breakFlags==0. 13669 */ 13670 lbu a3, offThread_breakFlags(rSELF) 13671 la rBIX, dvmAsmInstructionStart + (59 * 128) 13672 lw rIBASE, offThread_curHandlerTable(rSELF) 13673 bnez a3, 1f 13674 jr rBIX # nothing to do - jump to real handler 136751: 13676 EXPORT_PC() 13677 move a0, rPC # arg0 13678 move a1, rFP # arg1 13679 move a2, rSELF # arg2 13680 JAL(dvmCheckBefore) 13681 jr rBIX 13682 13683/* ------------------------------ */ 13684 .balign 128 13685.L_ALT_OP_IF_GTZ: /* 0x3c */ 13686/* File: mips/alt_stub.S */ 13687/* 13688 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13689 * any interesting requests and then jump to the real instruction 13690 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13691 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13692 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13693 * bail to the real handler if breakFlags==0. 13694 */ 13695 lbu a3, offThread_breakFlags(rSELF) 13696 la rBIX, dvmAsmInstructionStart + (60 * 128) 13697 lw rIBASE, offThread_curHandlerTable(rSELF) 13698 bnez a3, 1f 13699 jr rBIX # nothing to do - jump to real handler 137001: 13701 EXPORT_PC() 13702 move a0, rPC # arg0 13703 move a1, rFP # arg1 13704 move a2, rSELF # arg2 13705 JAL(dvmCheckBefore) 13706 jr rBIX 13707 13708/* ------------------------------ */ 13709 .balign 128 13710.L_ALT_OP_IF_LEZ: /* 0x3d */ 13711/* File: mips/alt_stub.S */ 13712/* 13713 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13714 * any interesting requests and then jump to the real instruction 13715 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13716 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13717 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13718 * bail to the real handler if breakFlags==0. 13719 */ 13720 lbu a3, offThread_breakFlags(rSELF) 13721 la rBIX, dvmAsmInstructionStart + (61 * 128) 13722 lw rIBASE, offThread_curHandlerTable(rSELF) 13723 bnez a3, 1f 13724 jr rBIX # nothing to do - jump to real handler 137251: 13726 EXPORT_PC() 13727 move a0, rPC # arg0 13728 move a1, rFP # arg1 13729 move a2, rSELF # arg2 13730 JAL(dvmCheckBefore) 13731 jr rBIX 13732 13733/* ------------------------------ */ 13734 .balign 128 13735.L_ALT_OP_UNUSED_3E: /* 0x3e */ 13736/* File: mips/alt_stub.S */ 13737/* 13738 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13739 * any interesting requests and then jump to the real instruction 13740 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13741 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13742 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13743 * bail to the real handler if breakFlags==0. 13744 */ 13745 lbu a3, offThread_breakFlags(rSELF) 13746 la rBIX, dvmAsmInstructionStart + (62 * 128) 13747 lw rIBASE, offThread_curHandlerTable(rSELF) 13748 bnez a3, 1f 13749 jr rBIX # nothing to do - jump to real handler 137501: 13751 EXPORT_PC() 13752 move a0, rPC # arg0 13753 move a1, rFP # arg1 13754 move a2, rSELF # arg2 13755 JAL(dvmCheckBefore) 13756 jr rBIX 13757 13758/* ------------------------------ */ 13759 .balign 128 13760.L_ALT_OP_UNUSED_3F: /* 0x3f */ 13761/* File: mips/alt_stub.S */ 13762/* 13763 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13764 * any interesting requests and then jump to the real instruction 13765 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13766 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13767 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13768 * bail to the real handler if breakFlags==0. 13769 */ 13770 lbu a3, offThread_breakFlags(rSELF) 13771 la rBIX, dvmAsmInstructionStart + (63 * 128) 13772 lw rIBASE, offThread_curHandlerTable(rSELF) 13773 bnez a3, 1f 13774 jr rBIX # nothing to do - jump to real handler 137751: 13776 EXPORT_PC() 13777 move a0, rPC # arg0 13778 move a1, rFP # arg1 13779 move a2, rSELF # arg2 13780 JAL(dvmCheckBefore) 13781 jr rBIX 13782 13783/* ------------------------------ */ 13784 .balign 128 13785.L_ALT_OP_UNUSED_40: /* 0x40 */ 13786/* File: mips/alt_stub.S */ 13787/* 13788 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13789 * any interesting requests and then jump to the real instruction 13790 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13791 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13792 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13793 * bail to the real handler if breakFlags==0. 13794 */ 13795 lbu a3, offThread_breakFlags(rSELF) 13796 la rBIX, dvmAsmInstructionStart + (64 * 128) 13797 lw rIBASE, offThread_curHandlerTable(rSELF) 13798 bnez a3, 1f 13799 jr rBIX # nothing to do - jump to real handler 138001: 13801 EXPORT_PC() 13802 move a0, rPC # arg0 13803 move a1, rFP # arg1 13804 move a2, rSELF # arg2 13805 JAL(dvmCheckBefore) 13806 jr rBIX 13807 13808/* ------------------------------ */ 13809 .balign 128 13810.L_ALT_OP_UNUSED_41: /* 0x41 */ 13811/* File: mips/alt_stub.S */ 13812/* 13813 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13814 * any interesting requests and then jump to the real instruction 13815 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13816 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13817 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13818 * bail to the real handler if breakFlags==0. 13819 */ 13820 lbu a3, offThread_breakFlags(rSELF) 13821 la rBIX, dvmAsmInstructionStart + (65 * 128) 13822 lw rIBASE, offThread_curHandlerTable(rSELF) 13823 bnez a3, 1f 13824 jr rBIX # nothing to do - jump to real handler 138251: 13826 EXPORT_PC() 13827 move a0, rPC # arg0 13828 move a1, rFP # arg1 13829 move a2, rSELF # arg2 13830 JAL(dvmCheckBefore) 13831 jr rBIX 13832 13833/* ------------------------------ */ 13834 .balign 128 13835.L_ALT_OP_UNUSED_42: /* 0x42 */ 13836/* File: mips/alt_stub.S */ 13837/* 13838 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13839 * any interesting requests and then jump to the real instruction 13840 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13841 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13842 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13843 * bail to the real handler if breakFlags==0. 13844 */ 13845 lbu a3, offThread_breakFlags(rSELF) 13846 la rBIX, dvmAsmInstructionStart + (66 * 128) 13847 lw rIBASE, offThread_curHandlerTable(rSELF) 13848 bnez a3, 1f 13849 jr rBIX # nothing to do - jump to real handler 138501: 13851 EXPORT_PC() 13852 move a0, rPC # arg0 13853 move a1, rFP # arg1 13854 move a2, rSELF # arg2 13855 JAL(dvmCheckBefore) 13856 jr rBIX 13857 13858/* ------------------------------ */ 13859 .balign 128 13860.L_ALT_OP_UNUSED_43: /* 0x43 */ 13861/* File: mips/alt_stub.S */ 13862/* 13863 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13864 * any interesting requests and then jump to the real instruction 13865 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13866 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13867 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13868 * bail to the real handler if breakFlags==0. 13869 */ 13870 lbu a3, offThread_breakFlags(rSELF) 13871 la rBIX, dvmAsmInstructionStart + (67 * 128) 13872 lw rIBASE, offThread_curHandlerTable(rSELF) 13873 bnez a3, 1f 13874 jr rBIX # nothing to do - jump to real handler 138751: 13876 EXPORT_PC() 13877 move a0, rPC # arg0 13878 move a1, rFP # arg1 13879 move a2, rSELF # arg2 13880 JAL(dvmCheckBefore) 13881 jr rBIX 13882 13883/* ------------------------------ */ 13884 .balign 128 13885.L_ALT_OP_AGET: /* 0x44 */ 13886/* File: mips/alt_stub.S */ 13887/* 13888 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13889 * any interesting requests and then jump to the real instruction 13890 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13891 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13892 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13893 * bail to the real handler if breakFlags==0. 13894 */ 13895 lbu a3, offThread_breakFlags(rSELF) 13896 la rBIX, dvmAsmInstructionStart + (68 * 128) 13897 lw rIBASE, offThread_curHandlerTable(rSELF) 13898 bnez a3, 1f 13899 jr rBIX # nothing to do - jump to real handler 139001: 13901 EXPORT_PC() 13902 move a0, rPC # arg0 13903 move a1, rFP # arg1 13904 move a2, rSELF # arg2 13905 JAL(dvmCheckBefore) 13906 jr rBIX 13907 13908/* ------------------------------ */ 13909 .balign 128 13910.L_ALT_OP_AGET_WIDE: /* 0x45 */ 13911/* File: mips/alt_stub.S */ 13912/* 13913 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13914 * any interesting requests and then jump to the real instruction 13915 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13916 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13917 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13918 * bail to the real handler if breakFlags==0. 13919 */ 13920 lbu a3, offThread_breakFlags(rSELF) 13921 la rBIX, dvmAsmInstructionStart + (69 * 128) 13922 lw rIBASE, offThread_curHandlerTable(rSELF) 13923 bnez a3, 1f 13924 jr rBIX # nothing to do - jump to real handler 139251: 13926 EXPORT_PC() 13927 move a0, rPC # arg0 13928 move a1, rFP # arg1 13929 move a2, rSELF # arg2 13930 JAL(dvmCheckBefore) 13931 jr rBIX 13932 13933/* ------------------------------ */ 13934 .balign 128 13935.L_ALT_OP_AGET_OBJECT: /* 0x46 */ 13936/* File: mips/alt_stub.S */ 13937/* 13938 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13939 * any interesting requests and then jump to the real instruction 13940 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13941 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13942 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13943 * bail to the real handler if breakFlags==0. 13944 */ 13945 lbu a3, offThread_breakFlags(rSELF) 13946 la rBIX, dvmAsmInstructionStart + (70 * 128) 13947 lw rIBASE, offThread_curHandlerTable(rSELF) 13948 bnez a3, 1f 13949 jr rBIX # nothing to do - jump to real handler 139501: 13951 EXPORT_PC() 13952 move a0, rPC # arg0 13953 move a1, rFP # arg1 13954 move a2, rSELF # arg2 13955 JAL(dvmCheckBefore) 13956 jr rBIX 13957 13958/* ------------------------------ */ 13959 .balign 128 13960.L_ALT_OP_AGET_BOOLEAN: /* 0x47 */ 13961/* File: mips/alt_stub.S */ 13962/* 13963 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13964 * any interesting requests and then jump to the real instruction 13965 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13966 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13967 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13968 * bail to the real handler if breakFlags==0. 13969 */ 13970 lbu a3, offThread_breakFlags(rSELF) 13971 la rBIX, dvmAsmInstructionStart + (71 * 128) 13972 lw rIBASE, offThread_curHandlerTable(rSELF) 13973 bnez a3, 1f 13974 jr rBIX # nothing to do - jump to real handler 139751: 13976 EXPORT_PC() 13977 move a0, rPC # arg0 13978 move a1, rFP # arg1 13979 move a2, rSELF # arg2 13980 JAL(dvmCheckBefore) 13981 jr rBIX 13982 13983/* ------------------------------ */ 13984 .balign 128 13985.L_ALT_OP_AGET_BYTE: /* 0x48 */ 13986/* File: mips/alt_stub.S */ 13987/* 13988 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 13989 * any interesting requests and then jump to the real instruction 13990 * handler. Note that the call to dvmCheckBefore is done as a tail call. 13991 * rIBASE updates won't be seen until a refresh, and we can tell we have a 13992 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 13993 * bail to the real handler if breakFlags==0. 13994 */ 13995 lbu a3, offThread_breakFlags(rSELF) 13996 la rBIX, dvmAsmInstructionStart + (72 * 128) 13997 lw rIBASE, offThread_curHandlerTable(rSELF) 13998 bnez a3, 1f 13999 jr rBIX # nothing to do - jump to real handler 140001: 14001 EXPORT_PC() 14002 move a0, rPC # arg0 14003 move a1, rFP # arg1 14004 move a2, rSELF # arg2 14005 JAL(dvmCheckBefore) 14006 jr rBIX 14007 14008/* ------------------------------ */ 14009 .balign 128 14010.L_ALT_OP_AGET_CHAR: /* 0x49 */ 14011/* File: mips/alt_stub.S */ 14012/* 14013 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14014 * any interesting requests and then jump to the real instruction 14015 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14016 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14017 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14018 * bail to the real handler if breakFlags==0. 14019 */ 14020 lbu a3, offThread_breakFlags(rSELF) 14021 la rBIX, dvmAsmInstructionStart + (73 * 128) 14022 lw rIBASE, offThread_curHandlerTable(rSELF) 14023 bnez a3, 1f 14024 jr rBIX # nothing to do - jump to real handler 140251: 14026 EXPORT_PC() 14027 move a0, rPC # arg0 14028 move a1, rFP # arg1 14029 move a2, rSELF # arg2 14030 JAL(dvmCheckBefore) 14031 jr rBIX 14032 14033/* ------------------------------ */ 14034 .balign 128 14035.L_ALT_OP_AGET_SHORT: /* 0x4a */ 14036/* File: mips/alt_stub.S */ 14037/* 14038 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14039 * any interesting requests and then jump to the real instruction 14040 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14041 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14042 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14043 * bail to the real handler if breakFlags==0. 14044 */ 14045 lbu a3, offThread_breakFlags(rSELF) 14046 la rBIX, dvmAsmInstructionStart + (74 * 128) 14047 lw rIBASE, offThread_curHandlerTable(rSELF) 14048 bnez a3, 1f 14049 jr rBIX # nothing to do - jump to real handler 140501: 14051 EXPORT_PC() 14052 move a0, rPC # arg0 14053 move a1, rFP # arg1 14054 move a2, rSELF # arg2 14055 JAL(dvmCheckBefore) 14056 jr rBIX 14057 14058/* ------------------------------ */ 14059 .balign 128 14060.L_ALT_OP_APUT: /* 0x4b */ 14061/* File: mips/alt_stub.S */ 14062/* 14063 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14064 * any interesting requests and then jump to the real instruction 14065 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14066 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14067 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14068 * bail to the real handler if breakFlags==0. 14069 */ 14070 lbu a3, offThread_breakFlags(rSELF) 14071 la rBIX, dvmAsmInstructionStart + (75 * 128) 14072 lw rIBASE, offThread_curHandlerTable(rSELF) 14073 bnez a3, 1f 14074 jr rBIX # nothing to do - jump to real handler 140751: 14076 EXPORT_PC() 14077 move a0, rPC # arg0 14078 move a1, rFP # arg1 14079 move a2, rSELF # arg2 14080 JAL(dvmCheckBefore) 14081 jr rBIX 14082 14083/* ------------------------------ */ 14084 .balign 128 14085.L_ALT_OP_APUT_WIDE: /* 0x4c */ 14086/* File: mips/alt_stub.S */ 14087/* 14088 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14089 * any interesting requests and then jump to the real instruction 14090 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14091 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14092 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14093 * bail to the real handler if breakFlags==0. 14094 */ 14095 lbu a3, offThread_breakFlags(rSELF) 14096 la rBIX, dvmAsmInstructionStart + (76 * 128) 14097 lw rIBASE, offThread_curHandlerTable(rSELF) 14098 bnez a3, 1f 14099 jr rBIX # nothing to do - jump to real handler 141001: 14101 EXPORT_PC() 14102 move a0, rPC # arg0 14103 move a1, rFP # arg1 14104 move a2, rSELF # arg2 14105 JAL(dvmCheckBefore) 14106 jr rBIX 14107 14108/* ------------------------------ */ 14109 .balign 128 14110.L_ALT_OP_APUT_OBJECT: /* 0x4d */ 14111/* File: mips/alt_stub.S */ 14112/* 14113 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14114 * any interesting requests and then jump to the real instruction 14115 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14116 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14117 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14118 * bail to the real handler if breakFlags==0. 14119 */ 14120 lbu a3, offThread_breakFlags(rSELF) 14121 la rBIX, dvmAsmInstructionStart + (77 * 128) 14122 lw rIBASE, offThread_curHandlerTable(rSELF) 14123 bnez a3, 1f 14124 jr rBIX # nothing to do - jump to real handler 141251: 14126 EXPORT_PC() 14127 move a0, rPC # arg0 14128 move a1, rFP # arg1 14129 move a2, rSELF # arg2 14130 JAL(dvmCheckBefore) 14131 jr rBIX 14132 14133/* ------------------------------ */ 14134 .balign 128 14135.L_ALT_OP_APUT_BOOLEAN: /* 0x4e */ 14136/* File: mips/alt_stub.S */ 14137/* 14138 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14139 * any interesting requests and then jump to the real instruction 14140 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14141 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14142 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14143 * bail to the real handler if breakFlags==0. 14144 */ 14145 lbu a3, offThread_breakFlags(rSELF) 14146 la rBIX, dvmAsmInstructionStart + (78 * 128) 14147 lw rIBASE, offThread_curHandlerTable(rSELF) 14148 bnez a3, 1f 14149 jr rBIX # nothing to do - jump to real handler 141501: 14151 EXPORT_PC() 14152 move a0, rPC # arg0 14153 move a1, rFP # arg1 14154 move a2, rSELF # arg2 14155 JAL(dvmCheckBefore) 14156 jr rBIX 14157 14158/* ------------------------------ */ 14159 .balign 128 14160.L_ALT_OP_APUT_BYTE: /* 0x4f */ 14161/* File: mips/alt_stub.S */ 14162/* 14163 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14164 * any interesting requests and then jump to the real instruction 14165 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14166 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14167 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14168 * bail to the real handler if breakFlags==0. 14169 */ 14170 lbu a3, offThread_breakFlags(rSELF) 14171 la rBIX, dvmAsmInstructionStart + (79 * 128) 14172 lw rIBASE, offThread_curHandlerTable(rSELF) 14173 bnez a3, 1f 14174 jr rBIX # nothing to do - jump to real handler 141751: 14176 EXPORT_PC() 14177 move a0, rPC # arg0 14178 move a1, rFP # arg1 14179 move a2, rSELF # arg2 14180 JAL(dvmCheckBefore) 14181 jr rBIX 14182 14183/* ------------------------------ */ 14184 .balign 128 14185.L_ALT_OP_APUT_CHAR: /* 0x50 */ 14186/* File: mips/alt_stub.S */ 14187/* 14188 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14189 * any interesting requests and then jump to the real instruction 14190 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14191 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14192 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14193 * bail to the real handler if breakFlags==0. 14194 */ 14195 lbu a3, offThread_breakFlags(rSELF) 14196 la rBIX, dvmAsmInstructionStart + (80 * 128) 14197 lw rIBASE, offThread_curHandlerTable(rSELF) 14198 bnez a3, 1f 14199 jr rBIX # nothing to do - jump to real handler 142001: 14201 EXPORT_PC() 14202 move a0, rPC # arg0 14203 move a1, rFP # arg1 14204 move a2, rSELF # arg2 14205 JAL(dvmCheckBefore) 14206 jr rBIX 14207 14208/* ------------------------------ */ 14209 .balign 128 14210.L_ALT_OP_APUT_SHORT: /* 0x51 */ 14211/* File: mips/alt_stub.S */ 14212/* 14213 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14214 * any interesting requests and then jump to the real instruction 14215 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14216 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14217 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14218 * bail to the real handler if breakFlags==0. 14219 */ 14220 lbu a3, offThread_breakFlags(rSELF) 14221 la rBIX, dvmAsmInstructionStart + (81 * 128) 14222 lw rIBASE, offThread_curHandlerTable(rSELF) 14223 bnez a3, 1f 14224 jr rBIX # nothing to do - jump to real handler 142251: 14226 EXPORT_PC() 14227 move a0, rPC # arg0 14228 move a1, rFP # arg1 14229 move a2, rSELF # arg2 14230 JAL(dvmCheckBefore) 14231 jr rBIX 14232 14233/* ------------------------------ */ 14234 .balign 128 14235.L_ALT_OP_IGET: /* 0x52 */ 14236/* File: mips/alt_stub.S */ 14237/* 14238 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14239 * any interesting requests and then jump to the real instruction 14240 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14241 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14242 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14243 * bail to the real handler if breakFlags==0. 14244 */ 14245 lbu a3, offThread_breakFlags(rSELF) 14246 la rBIX, dvmAsmInstructionStart + (82 * 128) 14247 lw rIBASE, offThread_curHandlerTable(rSELF) 14248 bnez a3, 1f 14249 jr rBIX # nothing to do - jump to real handler 142501: 14251 EXPORT_PC() 14252 move a0, rPC # arg0 14253 move a1, rFP # arg1 14254 move a2, rSELF # arg2 14255 JAL(dvmCheckBefore) 14256 jr rBIX 14257 14258/* ------------------------------ */ 14259 .balign 128 14260.L_ALT_OP_IGET_WIDE: /* 0x53 */ 14261/* File: mips/alt_stub.S */ 14262/* 14263 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14264 * any interesting requests and then jump to the real instruction 14265 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14266 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14267 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14268 * bail to the real handler if breakFlags==0. 14269 */ 14270 lbu a3, offThread_breakFlags(rSELF) 14271 la rBIX, dvmAsmInstructionStart + (83 * 128) 14272 lw rIBASE, offThread_curHandlerTable(rSELF) 14273 bnez a3, 1f 14274 jr rBIX # nothing to do - jump to real handler 142751: 14276 EXPORT_PC() 14277 move a0, rPC # arg0 14278 move a1, rFP # arg1 14279 move a2, rSELF # arg2 14280 JAL(dvmCheckBefore) 14281 jr rBIX 14282 14283/* ------------------------------ */ 14284 .balign 128 14285.L_ALT_OP_IGET_OBJECT: /* 0x54 */ 14286/* File: mips/alt_stub.S */ 14287/* 14288 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14289 * any interesting requests and then jump to the real instruction 14290 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14291 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14292 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14293 * bail to the real handler if breakFlags==0. 14294 */ 14295 lbu a3, offThread_breakFlags(rSELF) 14296 la rBIX, dvmAsmInstructionStart + (84 * 128) 14297 lw rIBASE, offThread_curHandlerTable(rSELF) 14298 bnez a3, 1f 14299 jr rBIX # nothing to do - jump to real handler 143001: 14301 EXPORT_PC() 14302 move a0, rPC # arg0 14303 move a1, rFP # arg1 14304 move a2, rSELF # arg2 14305 JAL(dvmCheckBefore) 14306 jr rBIX 14307 14308/* ------------------------------ */ 14309 .balign 128 14310.L_ALT_OP_IGET_BOOLEAN: /* 0x55 */ 14311/* File: mips/alt_stub.S */ 14312/* 14313 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14314 * any interesting requests and then jump to the real instruction 14315 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14316 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14317 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14318 * bail to the real handler if breakFlags==0. 14319 */ 14320 lbu a3, offThread_breakFlags(rSELF) 14321 la rBIX, dvmAsmInstructionStart + (85 * 128) 14322 lw rIBASE, offThread_curHandlerTable(rSELF) 14323 bnez a3, 1f 14324 jr rBIX # nothing to do - jump to real handler 143251: 14326 EXPORT_PC() 14327 move a0, rPC # arg0 14328 move a1, rFP # arg1 14329 move a2, rSELF # arg2 14330 JAL(dvmCheckBefore) 14331 jr rBIX 14332 14333/* ------------------------------ */ 14334 .balign 128 14335.L_ALT_OP_IGET_BYTE: /* 0x56 */ 14336/* File: mips/alt_stub.S */ 14337/* 14338 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14339 * any interesting requests and then jump to the real instruction 14340 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14341 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14342 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14343 * bail to the real handler if breakFlags==0. 14344 */ 14345 lbu a3, offThread_breakFlags(rSELF) 14346 la rBIX, dvmAsmInstructionStart + (86 * 128) 14347 lw rIBASE, offThread_curHandlerTable(rSELF) 14348 bnez a3, 1f 14349 jr rBIX # nothing to do - jump to real handler 143501: 14351 EXPORT_PC() 14352 move a0, rPC # arg0 14353 move a1, rFP # arg1 14354 move a2, rSELF # arg2 14355 JAL(dvmCheckBefore) 14356 jr rBIX 14357 14358/* ------------------------------ */ 14359 .balign 128 14360.L_ALT_OP_IGET_CHAR: /* 0x57 */ 14361/* File: mips/alt_stub.S */ 14362/* 14363 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14364 * any interesting requests and then jump to the real instruction 14365 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14366 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14367 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14368 * bail to the real handler if breakFlags==0. 14369 */ 14370 lbu a3, offThread_breakFlags(rSELF) 14371 la rBIX, dvmAsmInstructionStart + (87 * 128) 14372 lw rIBASE, offThread_curHandlerTable(rSELF) 14373 bnez a3, 1f 14374 jr rBIX # nothing to do - jump to real handler 143751: 14376 EXPORT_PC() 14377 move a0, rPC # arg0 14378 move a1, rFP # arg1 14379 move a2, rSELF # arg2 14380 JAL(dvmCheckBefore) 14381 jr rBIX 14382 14383/* ------------------------------ */ 14384 .balign 128 14385.L_ALT_OP_IGET_SHORT: /* 0x58 */ 14386/* File: mips/alt_stub.S */ 14387/* 14388 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14389 * any interesting requests and then jump to the real instruction 14390 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14391 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14392 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14393 * bail to the real handler if breakFlags==0. 14394 */ 14395 lbu a3, offThread_breakFlags(rSELF) 14396 la rBIX, dvmAsmInstructionStart + (88 * 128) 14397 lw rIBASE, offThread_curHandlerTable(rSELF) 14398 bnez a3, 1f 14399 jr rBIX # nothing to do - jump to real handler 144001: 14401 EXPORT_PC() 14402 move a0, rPC # arg0 14403 move a1, rFP # arg1 14404 move a2, rSELF # arg2 14405 JAL(dvmCheckBefore) 14406 jr rBIX 14407 14408/* ------------------------------ */ 14409 .balign 128 14410.L_ALT_OP_IPUT: /* 0x59 */ 14411/* File: mips/alt_stub.S */ 14412/* 14413 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14414 * any interesting requests and then jump to the real instruction 14415 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14416 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14417 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14418 * bail to the real handler if breakFlags==0. 14419 */ 14420 lbu a3, offThread_breakFlags(rSELF) 14421 la rBIX, dvmAsmInstructionStart + (89 * 128) 14422 lw rIBASE, offThread_curHandlerTable(rSELF) 14423 bnez a3, 1f 14424 jr rBIX # nothing to do - jump to real handler 144251: 14426 EXPORT_PC() 14427 move a0, rPC # arg0 14428 move a1, rFP # arg1 14429 move a2, rSELF # arg2 14430 JAL(dvmCheckBefore) 14431 jr rBIX 14432 14433/* ------------------------------ */ 14434 .balign 128 14435.L_ALT_OP_IPUT_WIDE: /* 0x5a */ 14436/* File: mips/alt_stub.S */ 14437/* 14438 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14439 * any interesting requests and then jump to the real instruction 14440 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14441 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14442 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14443 * bail to the real handler if breakFlags==0. 14444 */ 14445 lbu a3, offThread_breakFlags(rSELF) 14446 la rBIX, dvmAsmInstructionStart + (90 * 128) 14447 lw rIBASE, offThread_curHandlerTable(rSELF) 14448 bnez a3, 1f 14449 jr rBIX # nothing to do - jump to real handler 144501: 14451 EXPORT_PC() 14452 move a0, rPC # arg0 14453 move a1, rFP # arg1 14454 move a2, rSELF # arg2 14455 JAL(dvmCheckBefore) 14456 jr rBIX 14457 14458/* ------------------------------ */ 14459 .balign 128 14460.L_ALT_OP_IPUT_OBJECT: /* 0x5b */ 14461/* File: mips/alt_stub.S */ 14462/* 14463 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14464 * any interesting requests and then jump to the real instruction 14465 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14466 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14467 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14468 * bail to the real handler if breakFlags==0. 14469 */ 14470 lbu a3, offThread_breakFlags(rSELF) 14471 la rBIX, dvmAsmInstructionStart + (91 * 128) 14472 lw rIBASE, offThread_curHandlerTable(rSELF) 14473 bnez a3, 1f 14474 jr rBIX # nothing to do - jump to real handler 144751: 14476 EXPORT_PC() 14477 move a0, rPC # arg0 14478 move a1, rFP # arg1 14479 move a2, rSELF # arg2 14480 JAL(dvmCheckBefore) 14481 jr rBIX 14482 14483/* ------------------------------ */ 14484 .balign 128 14485.L_ALT_OP_IPUT_BOOLEAN: /* 0x5c */ 14486/* File: mips/alt_stub.S */ 14487/* 14488 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14489 * any interesting requests and then jump to the real instruction 14490 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14491 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14492 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14493 * bail to the real handler if breakFlags==0. 14494 */ 14495 lbu a3, offThread_breakFlags(rSELF) 14496 la rBIX, dvmAsmInstructionStart + (92 * 128) 14497 lw rIBASE, offThread_curHandlerTable(rSELF) 14498 bnez a3, 1f 14499 jr rBIX # nothing to do - jump to real handler 145001: 14501 EXPORT_PC() 14502 move a0, rPC # arg0 14503 move a1, rFP # arg1 14504 move a2, rSELF # arg2 14505 JAL(dvmCheckBefore) 14506 jr rBIX 14507 14508/* ------------------------------ */ 14509 .balign 128 14510.L_ALT_OP_IPUT_BYTE: /* 0x5d */ 14511/* File: mips/alt_stub.S */ 14512/* 14513 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14514 * any interesting requests and then jump to the real instruction 14515 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14516 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14517 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14518 * bail to the real handler if breakFlags==0. 14519 */ 14520 lbu a3, offThread_breakFlags(rSELF) 14521 la rBIX, dvmAsmInstructionStart + (93 * 128) 14522 lw rIBASE, offThread_curHandlerTable(rSELF) 14523 bnez a3, 1f 14524 jr rBIX # nothing to do - jump to real handler 145251: 14526 EXPORT_PC() 14527 move a0, rPC # arg0 14528 move a1, rFP # arg1 14529 move a2, rSELF # arg2 14530 JAL(dvmCheckBefore) 14531 jr rBIX 14532 14533/* ------------------------------ */ 14534 .balign 128 14535.L_ALT_OP_IPUT_CHAR: /* 0x5e */ 14536/* File: mips/alt_stub.S */ 14537/* 14538 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14539 * any interesting requests and then jump to the real instruction 14540 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14541 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14542 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14543 * bail to the real handler if breakFlags==0. 14544 */ 14545 lbu a3, offThread_breakFlags(rSELF) 14546 la rBIX, dvmAsmInstructionStart + (94 * 128) 14547 lw rIBASE, offThread_curHandlerTable(rSELF) 14548 bnez a3, 1f 14549 jr rBIX # nothing to do - jump to real handler 145501: 14551 EXPORT_PC() 14552 move a0, rPC # arg0 14553 move a1, rFP # arg1 14554 move a2, rSELF # arg2 14555 JAL(dvmCheckBefore) 14556 jr rBIX 14557 14558/* ------------------------------ */ 14559 .balign 128 14560.L_ALT_OP_IPUT_SHORT: /* 0x5f */ 14561/* File: mips/alt_stub.S */ 14562/* 14563 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14564 * any interesting requests and then jump to the real instruction 14565 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14566 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14567 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14568 * bail to the real handler if breakFlags==0. 14569 */ 14570 lbu a3, offThread_breakFlags(rSELF) 14571 la rBIX, dvmAsmInstructionStart + (95 * 128) 14572 lw rIBASE, offThread_curHandlerTable(rSELF) 14573 bnez a3, 1f 14574 jr rBIX # nothing to do - jump to real handler 145751: 14576 EXPORT_PC() 14577 move a0, rPC # arg0 14578 move a1, rFP # arg1 14579 move a2, rSELF # arg2 14580 JAL(dvmCheckBefore) 14581 jr rBIX 14582 14583/* ------------------------------ */ 14584 .balign 128 14585.L_ALT_OP_SGET: /* 0x60 */ 14586/* File: mips/alt_stub.S */ 14587/* 14588 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14589 * any interesting requests and then jump to the real instruction 14590 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14591 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14592 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14593 * bail to the real handler if breakFlags==0. 14594 */ 14595 lbu a3, offThread_breakFlags(rSELF) 14596 la rBIX, dvmAsmInstructionStart + (96 * 128) 14597 lw rIBASE, offThread_curHandlerTable(rSELF) 14598 bnez a3, 1f 14599 jr rBIX # nothing to do - jump to real handler 146001: 14601 EXPORT_PC() 14602 move a0, rPC # arg0 14603 move a1, rFP # arg1 14604 move a2, rSELF # arg2 14605 JAL(dvmCheckBefore) 14606 jr rBIX 14607 14608/* ------------------------------ */ 14609 .balign 128 14610.L_ALT_OP_SGET_WIDE: /* 0x61 */ 14611/* File: mips/alt_stub.S */ 14612/* 14613 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14614 * any interesting requests and then jump to the real instruction 14615 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14616 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14617 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14618 * bail to the real handler if breakFlags==0. 14619 */ 14620 lbu a3, offThread_breakFlags(rSELF) 14621 la rBIX, dvmAsmInstructionStart + (97 * 128) 14622 lw rIBASE, offThread_curHandlerTable(rSELF) 14623 bnez a3, 1f 14624 jr rBIX # nothing to do - jump to real handler 146251: 14626 EXPORT_PC() 14627 move a0, rPC # arg0 14628 move a1, rFP # arg1 14629 move a2, rSELF # arg2 14630 JAL(dvmCheckBefore) 14631 jr rBIX 14632 14633/* ------------------------------ */ 14634 .balign 128 14635.L_ALT_OP_SGET_OBJECT: /* 0x62 */ 14636/* File: mips/alt_stub.S */ 14637/* 14638 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14639 * any interesting requests and then jump to the real instruction 14640 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14641 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14642 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14643 * bail to the real handler if breakFlags==0. 14644 */ 14645 lbu a3, offThread_breakFlags(rSELF) 14646 la rBIX, dvmAsmInstructionStart + (98 * 128) 14647 lw rIBASE, offThread_curHandlerTable(rSELF) 14648 bnez a3, 1f 14649 jr rBIX # nothing to do - jump to real handler 146501: 14651 EXPORT_PC() 14652 move a0, rPC # arg0 14653 move a1, rFP # arg1 14654 move a2, rSELF # arg2 14655 JAL(dvmCheckBefore) 14656 jr rBIX 14657 14658/* ------------------------------ */ 14659 .balign 128 14660.L_ALT_OP_SGET_BOOLEAN: /* 0x63 */ 14661/* File: mips/alt_stub.S */ 14662/* 14663 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14664 * any interesting requests and then jump to the real instruction 14665 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14666 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14667 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14668 * bail to the real handler if breakFlags==0. 14669 */ 14670 lbu a3, offThread_breakFlags(rSELF) 14671 la rBIX, dvmAsmInstructionStart + (99 * 128) 14672 lw rIBASE, offThread_curHandlerTable(rSELF) 14673 bnez a3, 1f 14674 jr rBIX # nothing to do - jump to real handler 146751: 14676 EXPORT_PC() 14677 move a0, rPC # arg0 14678 move a1, rFP # arg1 14679 move a2, rSELF # arg2 14680 JAL(dvmCheckBefore) 14681 jr rBIX 14682 14683/* ------------------------------ */ 14684 .balign 128 14685.L_ALT_OP_SGET_BYTE: /* 0x64 */ 14686/* File: mips/alt_stub.S */ 14687/* 14688 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14689 * any interesting requests and then jump to the real instruction 14690 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14691 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14692 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14693 * bail to the real handler if breakFlags==0. 14694 */ 14695 lbu a3, offThread_breakFlags(rSELF) 14696 la rBIX, dvmAsmInstructionStart + (100 * 128) 14697 lw rIBASE, offThread_curHandlerTable(rSELF) 14698 bnez a3, 1f 14699 jr rBIX # nothing to do - jump to real handler 147001: 14701 EXPORT_PC() 14702 move a0, rPC # arg0 14703 move a1, rFP # arg1 14704 move a2, rSELF # arg2 14705 JAL(dvmCheckBefore) 14706 jr rBIX 14707 14708/* ------------------------------ */ 14709 .balign 128 14710.L_ALT_OP_SGET_CHAR: /* 0x65 */ 14711/* File: mips/alt_stub.S */ 14712/* 14713 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14714 * any interesting requests and then jump to the real instruction 14715 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14716 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14717 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14718 * bail to the real handler if breakFlags==0. 14719 */ 14720 lbu a3, offThread_breakFlags(rSELF) 14721 la rBIX, dvmAsmInstructionStart + (101 * 128) 14722 lw rIBASE, offThread_curHandlerTable(rSELF) 14723 bnez a3, 1f 14724 jr rBIX # nothing to do - jump to real handler 147251: 14726 EXPORT_PC() 14727 move a0, rPC # arg0 14728 move a1, rFP # arg1 14729 move a2, rSELF # arg2 14730 JAL(dvmCheckBefore) 14731 jr rBIX 14732 14733/* ------------------------------ */ 14734 .balign 128 14735.L_ALT_OP_SGET_SHORT: /* 0x66 */ 14736/* File: mips/alt_stub.S */ 14737/* 14738 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14739 * any interesting requests and then jump to the real instruction 14740 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14741 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14742 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14743 * bail to the real handler if breakFlags==0. 14744 */ 14745 lbu a3, offThread_breakFlags(rSELF) 14746 la rBIX, dvmAsmInstructionStart + (102 * 128) 14747 lw rIBASE, offThread_curHandlerTable(rSELF) 14748 bnez a3, 1f 14749 jr rBIX # nothing to do - jump to real handler 147501: 14751 EXPORT_PC() 14752 move a0, rPC # arg0 14753 move a1, rFP # arg1 14754 move a2, rSELF # arg2 14755 JAL(dvmCheckBefore) 14756 jr rBIX 14757 14758/* ------------------------------ */ 14759 .balign 128 14760.L_ALT_OP_SPUT: /* 0x67 */ 14761/* File: mips/alt_stub.S */ 14762/* 14763 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14764 * any interesting requests and then jump to the real instruction 14765 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14766 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14767 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14768 * bail to the real handler if breakFlags==0. 14769 */ 14770 lbu a3, offThread_breakFlags(rSELF) 14771 la rBIX, dvmAsmInstructionStart + (103 * 128) 14772 lw rIBASE, offThread_curHandlerTable(rSELF) 14773 bnez a3, 1f 14774 jr rBIX # nothing to do - jump to real handler 147751: 14776 EXPORT_PC() 14777 move a0, rPC # arg0 14778 move a1, rFP # arg1 14779 move a2, rSELF # arg2 14780 JAL(dvmCheckBefore) 14781 jr rBIX 14782 14783/* ------------------------------ */ 14784 .balign 128 14785.L_ALT_OP_SPUT_WIDE: /* 0x68 */ 14786/* File: mips/alt_stub.S */ 14787/* 14788 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14789 * any interesting requests and then jump to the real instruction 14790 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14791 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14792 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14793 * bail to the real handler if breakFlags==0. 14794 */ 14795 lbu a3, offThread_breakFlags(rSELF) 14796 la rBIX, dvmAsmInstructionStart + (104 * 128) 14797 lw rIBASE, offThread_curHandlerTable(rSELF) 14798 bnez a3, 1f 14799 jr rBIX # nothing to do - jump to real handler 148001: 14801 EXPORT_PC() 14802 move a0, rPC # arg0 14803 move a1, rFP # arg1 14804 move a2, rSELF # arg2 14805 JAL(dvmCheckBefore) 14806 jr rBIX 14807 14808/* ------------------------------ */ 14809 .balign 128 14810.L_ALT_OP_SPUT_OBJECT: /* 0x69 */ 14811/* File: mips/alt_stub.S */ 14812/* 14813 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14814 * any interesting requests and then jump to the real instruction 14815 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14816 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14817 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14818 * bail to the real handler if breakFlags==0. 14819 */ 14820 lbu a3, offThread_breakFlags(rSELF) 14821 la rBIX, dvmAsmInstructionStart + (105 * 128) 14822 lw rIBASE, offThread_curHandlerTable(rSELF) 14823 bnez a3, 1f 14824 jr rBIX # nothing to do - jump to real handler 148251: 14826 EXPORT_PC() 14827 move a0, rPC # arg0 14828 move a1, rFP # arg1 14829 move a2, rSELF # arg2 14830 JAL(dvmCheckBefore) 14831 jr rBIX 14832 14833/* ------------------------------ */ 14834 .balign 128 14835.L_ALT_OP_SPUT_BOOLEAN: /* 0x6a */ 14836/* File: mips/alt_stub.S */ 14837/* 14838 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14839 * any interesting requests and then jump to the real instruction 14840 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14841 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14842 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14843 * bail to the real handler if breakFlags==0. 14844 */ 14845 lbu a3, offThread_breakFlags(rSELF) 14846 la rBIX, dvmAsmInstructionStart + (106 * 128) 14847 lw rIBASE, offThread_curHandlerTable(rSELF) 14848 bnez a3, 1f 14849 jr rBIX # nothing to do - jump to real handler 148501: 14851 EXPORT_PC() 14852 move a0, rPC # arg0 14853 move a1, rFP # arg1 14854 move a2, rSELF # arg2 14855 JAL(dvmCheckBefore) 14856 jr rBIX 14857 14858/* ------------------------------ */ 14859 .balign 128 14860.L_ALT_OP_SPUT_BYTE: /* 0x6b */ 14861/* File: mips/alt_stub.S */ 14862/* 14863 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14864 * any interesting requests and then jump to the real instruction 14865 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14866 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14867 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14868 * bail to the real handler if breakFlags==0. 14869 */ 14870 lbu a3, offThread_breakFlags(rSELF) 14871 la rBIX, dvmAsmInstructionStart + (107 * 128) 14872 lw rIBASE, offThread_curHandlerTable(rSELF) 14873 bnez a3, 1f 14874 jr rBIX # nothing to do - jump to real handler 148751: 14876 EXPORT_PC() 14877 move a0, rPC # arg0 14878 move a1, rFP # arg1 14879 move a2, rSELF # arg2 14880 JAL(dvmCheckBefore) 14881 jr rBIX 14882 14883/* ------------------------------ */ 14884 .balign 128 14885.L_ALT_OP_SPUT_CHAR: /* 0x6c */ 14886/* File: mips/alt_stub.S */ 14887/* 14888 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14889 * any interesting requests and then jump to the real instruction 14890 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14891 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14892 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14893 * bail to the real handler if breakFlags==0. 14894 */ 14895 lbu a3, offThread_breakFlags(rSELF) 14896 la rBIX, dvmAsmInstructionStart + (108 * 128) 14897 lw rIBASE, offThread_curHandlerTable(rSELF) 14898 bnez a3, 1f 14899 jr rBIX # nothing to do - jump to real handler 149001: 14901 EXPORT_PC() 14902 move a0, rPC # arg0 14903 move a1, rFP # arg1 14904 move a2, rSELF # arg2 14905 JAL(dvmCheckBefore) 14906 jr rBIX 14907 14908/* ------------------------------ */ 14909 .balign 128 14910.L_ALT_OP_SPUT_SHORT: /* 0x6d */ 14911/* File: mips/alt_stub.S */ 14912/* 14913 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14914 * any interesting requests and then jump to the real instruction 14915 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14916 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14917 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14918 * bail to the real handler if breakFlags==0. 14919 */ 14920 lbu a3, offThread_breakFlags(rSELF) 14921 la rBIX, dvmAsmInstructionStart + (109 * 128) 14922 lw rIBASE, offThread_curHandlerTable(rSELF) 14923 bnez a3, 1f 14924 jr rBIX # nothing to do - jump to real handler 149251: 14926 EXPORT_PC() 14927 move a0, rPC # arg0 14928 move a1, rFP # arg1 14929 move a2, rSELF # arg2 14930 JAL(dvmCheckBefore) 14931 jr rBIX 14932 14933/* ------------------------------ */ 14934 .balign 128 14935.L_ALT_OP_INVOKE_VIRTUAL: /* 0x6e */ 14936/* File: mips/alt_stub.S */ 14937/* 14938 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14939 * any interesting requests and then jump to the real instruction 14940 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14941 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14942 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14943 * bail to the real handler if breakFlags==0. 14944 */ 14945 lbu a3, offThread_breakFlags(rSELF) 14946 la rBIX, dvmAsmInstructionStart + (110 * 128) 14947 lw rIBASE, offThread_curHandlerTable(rSELF) 14948 bnez a3, 1f 14949 jr rBIX # nothing to do - jump to real handler 149501: 14951 EXPORT_PC() 14952 move a0, rPC # arg0 14953 move a1, rFP # arg1 14954 move a2, rSELF # arg2 14955 JAL(dvmCheckBefore) 14956 jr rBIX 14957 14958/* ------------------------------ */ 14959 .balign 128 14960.L_ALT_OP_INVOKE_SUPER: /* 0x6f */ 14961/* File: mips/alt_stub.S */ 14962/* 14963 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14964 * any interesting requests and then jump to the real instruction 14965 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14966 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14967 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14968 * bail to the real handler if breakFlags==0. 14969 */ 14970 lbu a3, offThread_breakFlags(rSELF) 14971 la rBIX, dvmAsmInstructionStart + (111 * 128) 14972 lw rIBASE, offThread_curHandlerTable(rSELF) 14973 bnez a3, 1f 14974 jr rBIX # nothing to do - jump to real handler 149751: 14976 EXPORT_PC() 14977 move a0, rPC # arg0 14978 move a1, rFP # arg1 14979 move a2, rSELF # arg2 14980 JAL(dvmCheckBefore) 14981 jr rBIX 14982 14983/* ------------------------------ */ 14984 .balign 128 14985.L_ALT_OP_INVOKE_DIRECT: /* 0x70 */ 14986/* File: mips/alt_stub.S */ 14987/* 14988 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 14989 * any interesting requests and then jump to the real instruction 14990 * handler. Note that the call to dvmCheckBefore is done as a tail call. 14991 * rIBASE updates won't be seen until a refresh, and we can tell we have a 14992 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 14993 * bail to the real handler if breakFlags==0. 14994 */ 14995 lbu a3, offThread_breakFlags(rSELF) 14996 la rBIX, dvmAsmInstructionStart + (112 * 128) 14997 lw rIBASE, offThread_curHandlerTable(rSELF) 14998 bnez a3, 1f 14999 jr rBIX # nothing to do - jump to real handler 150001: 15001 EXPORT_PC() 15002 move a0, rPC # arg0 15003 move a1, rFP # arg1 15004 move a2, rSELF # arg2 15005 JAL(dvmCheckBefore) 15006 jr rBIX 15007 15008/* ------------------------------ */ 15009 .balign 128 15010.L_ALT_OP_INVOKE_STATIC: /* 0x71 */ 15011/* File: mips/alt_stub.S */ 15012/* 15013 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15014 * any interesting requests and then jump to the real instruction 15015 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15016 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15017 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15018 * bail to the real handler if breakFlags==0. 15019 */ 15020 lbu a3, offThread_breakFlags(rSELF) 15021 la rBIX, dvmAsmInstructionStart + (113 * 128) 15022 lw rIBASE, offThread_curHandlerTable(rSELF) 15023 bnez a3, 1f 15024 jr rBIX # nothing to do - jump to real handler 150251: 15026 EXPORT_PC() 15027 move a0, rPC # arg0 15028 move a1, rFP # arg1 15029 move a2, rSELF # arg2 15030 JAL(dvmCheckBefore) 15031 jr rBIX 15032 15033/* ------------------------------ */ 15034 .balign 128 15035.L_ALT_OP_INVOKE_INTERFACE: /* 0x72 */ 15036/* File: mips/alt_stub.S */ 15037/* 15038 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15039 * any interesting requests and then jump to the real instruction 15040 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15041 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15042 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15043 * bail to the real handler if breakFlags==0. 15044 */ 15045 lbu a3, offThread_breakFlags(rSELF) 15046 la rBIX, dvmAsmInstructionStart + (114 * 128) 15047 lw rIBASE, offThread_curHandlerTable(rSELF) 15048 bnez a3, 1f 15049 jr rBIX # nothing to do - jump to real handler 150501: 15051 EXPORT_PC() 15052 move a0, rPC # arg0 15053 move a1, rFP # arg1 15054 move a2, rSELF # arg2 15055 JAL(dvmCheckBefore) 15056 jr rBIX 15057 15058/* ------------------------------ */ 15059 .balign 128 15060.L_ALT_OP_UNUSED_73: /* 0x73 */ 15061/* File: mips/alt_stub.S */ 15062/* 15063 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15064 * any interesting requests and then jump to the real instruction 15065 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15066 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15067 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15068 * bail to the real handler if breakFlags==0. 15069 */ 15070 lbu a3, offThread_breakFlags(rSELF) 15071 la rBIX, dvmAsmInstructionStart + (115 * 128) 15072 lw rIBASE, offThread_curHandlerTable(rSELF) 15073 bnez a3, 1f 15074 jr rBIX # nothing to do - jump to real handler 150751: 15076 EXPORT_PC() 15077 move a0, rPC # arg0 15078 move a1, rFP # arg1 15079 move a2, rSELF # arg2 15080 JAL(dvmCheckBefore) 15081 jr rBIX 15082 15083/* ------------------------------ */ 15084 .balign 128 15085.L_ALT_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */ 15086/* File: mips/alt_stub.S */ 15087/* 15088 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15089 * any interesting requests and then jump to the real instruction 15090 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15091 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15092 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15093 * bail to the real handler if breakFlags==0. 15094 */ 15095 lbu a3, offThread_breakFlags(rSELF) 15096 la rBIX, dvmAsmInstructionStart + (116 * 128) 15097 lw rIBASE, offThread_curHandlerTable(rSELF) 15098 bnez a3, 1f 15099 jr rBIX # nothing to do - jump to real handler 151001: 15101 EXPORT_PC() 15102 move a0, rPC # arg0 15103 move a1, rFP # arg1 15104 move a2, rSELF # arg2 15105 JAL(dvmCheckBefore) 15106 jr rBIX 15107 15108/* ------------------------------ */ 15109 .balign 128 15110.L_ALT_OP_INVOKE_SUPER_RANGE: /* 0x75 */ 15111/* File: mips/alt_stub.S */ 15112/* 15113 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15114 * any interesting requests and then jump to the real instruction 15115 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15116 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15117 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15118 * bail to the real handler if breakFlags==0. 15119 */ 15120 lbu a3, offThread_breakFlags(rSELF) 15121 la rBIX, dvmAsmInstructionStart + (117 * 128) 15122 lw rIBASE, offThread_curHandlerTable(rSELF) 15123 bnez a3, 1f 15124 jr rBIX # nothing to do - jump to real handler 151251: 15126 EXPORT_PC() 15127 move a0, rPC # arg0 15128 move a1, rFP # arg1 15129 move a2, rSELF # arg2 15130 JAL(dvmCheckBefore) 15131 jr rBIX 15132 15133/* ------------------------------ */ 15134 .balign 128 15135.L_ALT_OP_INVOKE_DIRECT_RANGE: /* 0x76 */ 15136/* File: mips/alt_stub.S */ 15137/* 15138 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15139 * any interesting requests and then jump to the real instruction 15140 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15141 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15142 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15143 * bail to the real handler if breakFlags==0. 15144 */ 15145 lbu a3, offThread_breakFlags(rSELF) 15146 la rBIX, dvmAsmInstructionStart + (118 * 128) 15147 lw rIBASE, offThread_curHandlerTable(rSELF) 15148 bnez a3, 1f 15149 jr rBIX # nothing to do - jump to real handler 151501: 15151 EXPORT_PC() 15152 move a0, rPC # arg0 15153 move a1, rFP # arg1 15154 move a2, rSELF # arg2 15155 JAL(dvmCheckBefore) 15156 jr rBIX 15157 15158/* ------------------------------ */ 15159 .balign 128 15160.L_ALT_OP_INVOKE_STATIC_RANGE: /* 0x77 */ 15161/* File: mips/alt_stub.S */ 15162/* 15163 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15164 * any interesting requests and then jump to the real instruction 15165 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15166 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15167 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15168 * bail to the real handler if breakFlags==0. 15169 */ 15170 lbu a3, offThread_breakFlags(rSELF) 15171 la rBIX, dvmAsmInstructionStart + (119 * 128) 15172 lw rIBASE, offThread_curHandlerTable(rSELF) 15173 bnez a3, 1f 15174 jr rBIX # nothing to do - jump to real handler 151751: 15176 EXPORT_PC() 15177 move a0, rPC # arg0 15178 move a1, rFP # arg1 15179 move a2, rSELF # arg2 15180 JAL(dvmCheckBefore) 15181 jr rBIX 15182 15183/* ------------------------------ */ 15184 .balign 128 15185.L_ALT_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */ 15186/* File: mips/alt_stub.S */ 15187/* 15188 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15189 * any interesting requests and then jump to the real instruction 15190 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15191 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15192 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15193 * bail to the real handler if breakFlags==0. 15194 */ 15195 lbu a3, offThread_breakFlags(rSELF) 15196 la rBIX, dvmAsmInstructionStart + (120 * 128) 15197 lw rIBASE, offThread_curHandlerTable(rSELF) 15198 bnez a3, 1f 15199 jr rBIX # nothing to do - jump to real handler 152001: 15201 EXPORT_PC() 15202 move a0, rPC # arg0 15203 move a1, rFP # arg1 15204 move a2, rSELF # arg2 15205 JAL(dvmCheckBefore) 15206 jr rBIX 15207 15208/* ------------------------------ */ 15209 .balign 128 15210.L_ALT_OP_UNUSED_79: /* 0x79 */ 15211/* File: mips/alt_stub.S */ 15212/* 15213 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15214 * any interesting requests and then jump to the real instruction 15215 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15216 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15217 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15218 * bail to the real handler if breakFlags==0. 15219 */ 15220 lbu a3, offThread_breakFlags(rSELF) 15221 la rBIX, dvmAsmInstructionStart + (121 * 128) 15222 lw rIBASE, offThread_curHandlerTable(rSELF) 15223 bnez a3, 1f 15224 jr rBIX # nothing to do - jump to real handler 152251: 15226 EXPORT_PC() 15227 move a0, rPC # arg0 15228 move a1, rFP # arg1 15229 move a2, rSELF # arg2 15230 JAL(dvmCheckBefore) 15231 jr rBIX 15232 15233/* ------------------------------ */ 15234 .balign 128 15235.L_ALT_OP_UNUSED_7A: /* 0x7a */ 15236/* File: mips/alt_stub.S */ 15237/* 15238 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15239 * any interesting requests and then jump to the real instruction 15240 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15241 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15242 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15243 * bail to the real handler if breakFlags==0. 15244 */ 15245 lbu a3, offThread_breakFlags(rSELF) 15246 la rBIX, dvmAsmInstructionStart + (122 * 128) 15247 lw rIBASE, offThread_curHandlerTable(rSELF) 15248 bnez a3, 1f 15249 jr rBIX # nothing to do - jump to real handler 152501: 15251 EXPORT_PC() 15252 move a0, rPC # arg0 15253 move a1, rFP # arg1 15254 move a2, rSELF # arg2 15255 JAL(dvmCheckBefore) 15256 jr rBIX 15257 15258/* ------------------------------ */ 15259 .balign 128 15260.L_ALT_OP_NEG_INT: /* 0x7b */ 15261/* File: mips/alt_stub.S */ 15262/* 15263 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15264 * any interesting requests and then jump to the real instruction 15265 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15266 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15267 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15268 * bail to the real handler if breakFlags==0. 15269 */ 15270 lbu a3, offThread_breakFlags(rSELF) 15271 la rBIX, dvmAsmInstructionStart + (123 * 128) 15272 lw rIBASE, offThread_curHandlerTable(rSELF) 15273 bnez a3, 1f 15274 jr rBIX # nothing to do - jump to real handler 152751: 15276 EXPORT_PC() 15277 move a0, rPC # arg0 15278 move a1, rFP # arg1 15279 move a2, rSELF # arg2 15280 JAL(dvmCheckBefore) 15281 jr rBIX 15282 15283/* ------------------------------ */ 15284 .balign 128 15285.L_ALT_OP_NOT_INT: /* 0x7c */ 15286/* File: mips/alt_stub.S */ 15287/* 15288 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15289 * any interesting requests and then jump to the real instruction 15290 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15291 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15292 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15293 * bail to the real handler if breakFlags==0. 15294 */ 15295 lbu a3, offThread_breakFlags(rSELF) 15296 la rBIX, dvmAsmInstructionStart + (124 * 128) 15297 lw rIBASE, offThread_curHandlerTable(rSELF) 15298 bnez a3, 1f 15299 jr rBIX # nothing to do - jump to real handler 153001: 15301 EXPORT_PC() 15302 move a0, rPC # arg0 15303 move a1, rFP # arg1 15304 move a2, rSELF # arg2 15305 JAL(dvmCheckBefore) 15306 jr rBIX 15307 15308/* ------------------------------ */ 15309 .balign 128 15310.L_ALT_OP_NEG_LONG: /* 0x7d */ 15311/* File: mips/alt_stub.S */ 15312/* 15313 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15314 * any interesting requests and then jump to the real instruction 15315 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15316 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15317 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15318 * bail to the real handler if breakFlags==0. 15319 */ 15320 lbu a3, offThread_breakFlags(rSELF) 15321 la rBIX, dvmAsmInstructionStart + (125 * 128) 15322 lw rIBASE, offThread_curHandlerTable(rSELF) 15323 bnez a3, 1f 15324 jr rBIX # nothing to do - jump to real handler 153251: 15326 EXPORT_PC() 15327 move a0, rPC # arg0 15328 move a1, rFP # arg1 15329 move a2, rSELF # arg2 15330 JAL(dvmCheckBefore) 15331 jr rBIX 15332 15333/* ------------------------------ */ 15334 .balign 128 15335.L_ALT_OP_NOT_LONG: /* 0x7e */ 15336/* File: mips/alt_stub.S */ 15337/* 15338 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15339 * any interesting requests and then jump to the real instruction 15340 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15341 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15342 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15343 * bail to the real handler if breakFlags==0. 15344 */ 15345 lbu a3, offThread_breakFlags(rSELF) 15346 la rBIX, dvmAsmInstructionStart + (126 * 128) 15347 lw rIBASE, offThread_curHandlerTable(rSELF) 15348 bnez a3, 1f 15349 jr rBIX # nothing to do - jump to real handler 153501: 15351 EXPORT_PC() 15352 move a0, rPC # arg0 15353 move a1, rFP # arg1 15354 move a2, rSELF # arg2 15355 JAL(dvmCheckBefore) 15356 jr rBIX 15357 15358/* ------------------------------ */ 15359 .balign 128 15360.L_ALT_OP_NEG_FLOAT: /* 0x7f */ 15361/* File: mips/alt_stub.S */ 15362/* 15363 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15364 * any interesting requests and then jump to the real instruction 15365 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15366 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15367 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15368 * bail to the real handler if breakFlags==0. 15369 */ 15370 lbu a3, offThread_breakFlags(rSELF) 15371 la rBIX, dvmAsmInstructionStart + (127 * 128) 15372 lw rIBASE, offThread_curHandlerTable(rSELF) 15373 bnez a3, 1f 15374 jr rBIX # nothing to do - jump to real handler 153751: 15376 EXPORT_PC() 15377 move a0, rPC # arg0 15378 move a1, rFP # arg1 15379 move a2, rSELF # arg2 15380 JAL(dvmCheckBefore) 15381 jr rBIX 15382 15383/* ------------------------------ */ 15384 .balign 128 15385.L_ALT_OP_NEG_DOUBLE: /* 0x80 */ 15386/* File: mips/alt_stub.S */ 15387/* 15388 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15389 * any interesting requests and then jump to the real instruction 15390 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15391 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15392 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15393 * bail to the real handler if breakFlags==0. 15394 */ 15395 lbu a3, offThread_breakFlags(rSELF) 15396 la rBIX, dvmAsmInstructionStart + (128 * 128) 15397 lw rIBASE, offThread_curHandlerTable(rSELF) 15398 bnez a3, 1f 15399 jr rBIX # nothing to do - jump to real handler 154001: 15401 EXPORT_PC() 15402 move a0, rPC # arg0 15403 move a1, rFP # arg1 15404 move a2, rSELF # arg2 15405 JAL(dvmCheckBefore) 15406 jr rBIX 15407 15408/* ------------------------------ */ 15409 .balign 128 15410.L_ALT_OP_INT_TO_LONG: /* 0x81 */ 15411/* File: mips/alt_stub.S */ 15412/* 15413 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15414 * any interesting requests and then jump to the real instruction 15415 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15416 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15417 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15418 * bail to the real handler if breakFlags==0. 15419 */ 15420 lbu a3, offThread_breakFlags(rSELF) 15421 la rBIX, dvmAsmInstructionStart + (129 * 128) 15422 lw rIBASE, offThread_curHandlerTable(rSELF) 15423 bnez a3, 1f 15424 jr rBIX # nothing to do - jump to real handler 154251: 15426 EXPORT_PC() 15427 move a0, rPC # arg0 15428 move a1, rFP # arg1 15429 move a2, rSELF # arg2 15430 JAL(dvmCheckBefore) 15431 jr rBIX 15432 15433/* ------------------------------ */ 15434 .balign 128 15435.L_ALT_OP_INT_TO_FLOAT: /* 0x82 */ 15436/* File: mips/alt_stub.S */ 15437/* 15438 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15439 * any interesting requests and then jump to the real instruction 15440 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15441 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15442 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15443 * bail to the real handler if breakFlags==0. 15444 */ 15445 lbu a3, offThread_breakFlags(rSELF) 15446 la rBIX, dvmAsmInstructionStart + (130 * 128) 15447 lw rIBASE, offThread_curHandlerTable(rSELF) 15448 bnez a3, 1f 15449 jr rBIX # nothing to do - jump to real handler 154501: 15451 EXPORT_PC() 15452 move a0, rPC # arg0 15453 move a1, rFP # arg1 15454 move a2, rSELF # arg2 15455 JAL(dvmCheckBefore) 15456 jr rBIX 15457 15458/* ------------------------------ */ 15459 .balign 128 15460.L_ALT_OP_INT_TO_DOUBLE: /* 0x83 */ 15461/* File: mips/alt_stub.S */ 15462/* 15463 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15464 * any interesting requests and then jump to the real instruction 15465 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15466 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15467 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15468 * bail to the real handler if breakFlags==0. 15469 */ 15470 lbu a3, offThread_breakFlags(rSELF) 15471 la rBIX, dvmAsmInstructionStart + (131 * 128) 15472 lw rIBASE, offThread_curHandlerTable(rSELF) 15473 bnez a3, 1f 15474 jr rBIX # nothing to do - jump to real handler 154751: 15476 EXPORT_PC() 15477 move a0, rPC # arg0 15478 move a1, rFP # arg1 15479 move a2, rSELF # arg2 15480 JAL(dvmCheckBefore) 15481 jr rBIX 15482 15483/* ------------------------------ */ 15484 .balign 128 15485.L_ALT_OP_LONG_TO_INT: /* 0x84 */ 15486/* File: mips/alt_stub.S */ 15487/* 15488 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15489 * any interesting requests and then jump to the real instruction 15490 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15491 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15492 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15493 * bail to the real handler if breakFlags==0. 15494 */ 15495 lbu a3, offThread_breakFlags(rSELF) 15496 la rBIX, dvmAsmInstructionStart + (132 * 128) 15497 lw rIBASE, offThread_curHandlerTable(rSELF) 15498 bnez a3, 1f 15499 jr rBIX # nothing to do - jump to real handler 155001: 15501 EXPORT_PC() 15502 move a0, rPC # arg0 15503 move a1, rFP # arg1 15504 move a2, rSELF # arg2 15505 JAL(dvmCheckBefore) 15506 jr rBIX 15507 15508/* ------------------------------ */ 15509 .balign 128 15510.L_ALT_OP_LONG_TO_FLOAT: /* 0x85 */ 15511/* File: mips/alt_stub.S */ 15512/* 15513 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15514 * any interesting requests and then jump to the real instruction 15515 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15516 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15517 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15518 * bail to the real handler if breakFlags==0. 15519 */ 15520 lbu a3, offThread_breakFlags(rSELF) 15521 la rBIX, dvmAsmInstructionStart + (133 * 128) 15522 lw rIBASE, offThread_curHandlerTable(rSELF) 15523 bnez a3, 1f 15524 jr rBIX # nothing to do - jump to real handler 155251: 15526 EXPORT_PC() 15527 move a0, rPC # arg0 15528 move a1, rFP # arg1 15529 move a2, rSELF # arg2 15530 JAL(dvmCheckBefore) 15531 jr rBIX 15532 15533/* ------------------------------ */ 15534 .balign 128 15535.L_ALT_OP_LONG_TO_DOUBLE: /* 0x86 */ 15536/* File: mips/alt_stub.S */ 15537/* 15538 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15539 * any interesting requests and then jump to the real instruction 15540 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15541 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15542 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15543 * bail to the real handler if breakFlags==0. 15544 */ 15545 lbu a3, offThread_breakFlags(rSELF) 15546 la rBIX, dvmAsmInstructionStart + (134 * 128) 15547 lw rIBASE, offThread_curHandlerTable(rSELF) 15548 bnez a3, 1f 15549 jr rBIX # nothing to do - jump to real handler 155501: 15551 EXPORT_PC() 15552 move a0, rPC # arg0 15553 move a1, rFP # arg1 15554 move a2, rSELF # arg2 15555 JAL(dvmCheckBefore) 15556 jr rBIX 15557 15558/* ------------------------------ */ 15559 .balign 128 15560.L_ALT_OP_FLOAT_TO_INT: /* 0x87 */ 15561/* File: mips/alt_stub.S */ 15562/* 15563 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15564 * any interesting requests and then jump to the real instruction 15565 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15566 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15567 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15568 * bail to the real handler if breakFlags==0. 15569 */ 15570 lbu a3, offThread_breakFlags(rSELF) 15571 la rBIX, dvmAsmInstructionStart + (135 * 128) 15572 lw rIBASE, offThread_curHandlerTable(rSELF) 15573 bnez a3, 1f 15574 jr rBIX # nothing to do - jump to real handler 155751: 15576 EXPORT_PC() 15577 move a0, rPC # arg0 15578 move a1, rFP # arg1 15579 move a2, rSELF # arg2 15580 JAL(dvmCheckBefore) 15581 jr rBIX 15582 15583/* ------------------------------ */ 15584 .balign 128 15585.L_ALT_OP_FLOAT_TO_LONG: /* 0x88 */ 15586/* File: mips/alt_stub.S */ 15587/* 15588 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15589 * any interesting requests and then jump to the real instruction 15590 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15591 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15592 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15593 * bail to the real handler if breakFlags==0. 15594 */ 15595 lbu a3, offThread_breakFlags(rSELF) 15596 la rBIX, dvmAsmInstructionStart + (136 * 128) 15597 lw rIBASE, offThread_curHandlerTable(rSELF) 15598 bnez a3, 1f 15599 jr rBIX # nothing to do - jump to real handler 156001: 15601 EXPORT_PC() 15602 move a0, rPC # arg0 15603 move a1, rFP # arg1 15604 move a2, rSELF # arg2 15605 JAL(dvmCheckBefore) 15606 jr rBIX 15607 15608/* ------------------------------ */ 15609 .balign 128 15610.L_ALT_OP_FLOAT_TO_DOUBLE: /* 0x89 */ 15611/* File: mips/alt_stub.S */ 15612/* 15613 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15614 * any interesting requests and then jump to the real instruction 15615 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15616 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15617 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15618 * bail to the real handler if breakFlags==0. 15619 */ 15620 lbu a3, offThread_breakFlags(rSELF) 15621 la rBIX, dvmAsmInstructionStart + (137 * 128) 15622 lw rIBASE, offThread_curHandlerTable(rSELF) 15623 bnez a3, 1f 15624 jr rBIX # nothing to do - jump to real handler 156251: 15626 EXPORT_PC() 15627 move a0, rPC # arg0 15628 move a1, rFP # arg1 15629 move a2, rSELF # arg2 15630 JAL(dvmCheckBefore) 15631 jr rBIX 15632 15633/* ------------------------------ */ 15634 .balign 128 15635.L_ALT_OP_DOUBLE_TO_INT: /* 0x8a */ 15636/* File: mips/alt_stub.S */ 15637/* 15638 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15639 * any interesting requests and then jump to the real instruction 15640 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15641 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15642 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15643 * bail to the real handler if breakFlags==0. 15644 */ 15645 lbu a3, offThread_breakFlags(rSELF) 15646 la rBIX, dvmAsmInstructionStart + (138 * 128) 15647 lw rIBASE, offThread_curHandlerTable(rSELF) 15648 bnez a3, 1f 15649 jr rBIX # nothing to do - jump to real handler 156501: 15651 EXPORT_PC() 15652 move a0, rPC # arg0 15653 move a1, rFP # arg1 15654 move a2, rSELF # arg2 15655 JAL(dvmCheckBefore) 15656 jr rBIX 15657 15658/* ------------------------------ */ 15659 .balign 128 15660.L_ALT_OP_DOUBLE_TO_LONG: /* 0x8b */ 15661/* File: mips/alt_stub.S */ 15662/* 15663 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15664 * any interesting requests and then jump to the real instruction 15665 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15666 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15667 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15668 * bail to the real handler if breakFlags==0. 15669 */ 15670 lbu a3, offThread_breakFlags(rSELF) 15671 la rBIX, dvmAsmInstructionStart + (139 * 128) 15672 lw rIBASE, offThread_curHandlerTable(rSELF) 15673 bnez a3, 1f 15674 jr rBIX # nothing to do - jump to real handler 156751: 15676 EXPORT_PC() 15677 move a0, rPC # arg0 15678 move a1, rFP # arg1 15679 move a2, rSELF # arg2 15680 JAL(dvmCheckBefore) 15681 jr rBIX 15682 15683/* ------------------------------ */ 15684 .balign 128 15685.L_ALT_OP_DOUBLE_TO_FLOAT: /* 0x8c */ 15686/* File: mips/alt_stub.S */ 15687/* 15688 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15689 * any interesting requests and then jump to the real instruction 15690 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15691 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15692 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15693 * bail to the real handler if breakFlags==0. 15694 */ 15695 lbu a3, offThread_breakFlags(rSELF) 15696 la rBIX, dvmAsmInstructionStart + (140 * 128) 15697 lw rIBASE, offThread_curHandlerTable(rSELF) 15698 bnez a3, 1f 15699 jr rBIX # nothing to do - jump to real handler 157001: 15701 EXPORT_PC() 15702 move a0, rPC # arg0 15703 move a1, rFP # arg1 15704 move a2, rSELF # arg2 15705 JAL(dvmCheckBefore) 15706 jr rBIX 15707 15708/* ------------------------------ */ 15709 .balign 128 15710.L_ALT_OP_INT_TO_BYTE: /* 0x8d */ 15711/* File: mips/alt_stub.S */ 15712/* 15713 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15714 * any interesting requests and then jump to the real instruction 15715 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15716 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15717 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15718 * bail to the real handler if breakFlags==0. 15719 */ 15720 lbu a3, offThread_breakFlags(rSELF) 15721 la rBIX, dvmAsmInstructionStart + (141 * 128) 15722 lw rIBASE, offThread_curHandlerTable(rSELF) 15723 bnez a3, 1f 15724 jr rBIX # nothing to do - jump to real handler 157251: 15726 EXPORT_PC() 15727 move a0, rPC # arg0 15728 move a1, rFP # arg1 15729 move a2, rSELF # arg2 15730 JAL(dvmCheckBefore) 15731 jr rBIX 15732 15733/* ------------------------------ */ 15734 .balign 128 15735.L_ALT_OP_INT_TO_CHAR: /* 0x8e */ 15736/* File: mips/alt_stub.S */ 15737/* 15738 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15739 * any interesting requests and then jump to the real instruction 15740 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15741 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15742 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15743 * bail to the real handler if breakFlags==0. 15744 */ 15745 lbu a3, offThread_breakFlags(rSELF) 15746 la rBIX, dvmAsmInstructionStart + (142 * 128) 15747 lw rIBASE, offThread_curHandlerTable(rSELF) 15748 bnez a3, 1f 15749 jr rBIX # nothing to do - jump to real handler 157501: 15751 EXPORT_PC() 15752 move a0, rPC # arg0 15753 move a1, rFP # arg1 15754 move a2, rSELF # arg2 15755 JAL(dvmCheckBefore) 15756 jr rBIX 15757 15758/* ------------------------------ */ 15759 .balign 128 15760.L_ALT_OP_INT_TO_SHORT: /* 0x8f */ 15761/* File: mips/alt_stub.S */ 15762/* 15763 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15764 * any interesting requests and then jump to the real instruction 15765 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15766 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15767 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15768 * bail to the real handler if breakFlags==0. 15769 */ 15770 lbu a3, offThread_breakFlags(rSELF) 15771 la rBIX, dvmAsmInstructionStart + (143 * 128) 15772 lw rIBASE, offThread_curHandlerTable(rSELF) 15773 bnez a3, 1f 15774 jr rBIX # nothing to do - jump to real handler 157751: 15776 EXPORT_PC() 15777 move a0, rPC # arg0 15778 move a1, rFP # arg1 15779 move a2, rSELF # arg2 15780 JAL(dvmCheckBefore) 15781 jr rBIX 15782 15783/* ------------------------------ */ 15784 .balign 128 15785.L_ALT_OP_ADD_INT: /* 0x90 */ 15786/* File: mips/alt_stub.S */ 15787/* 15788 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15789 * any interesting requests and then jump to the real instruction 15790 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15791 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15792 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15793 * bail to the real handler if breakFlags==0. 15794 */ 15795 lbu a3, offThread_breakFlags(rSELF) 15796 la rBIX, dvmAsmInstructionStart + (144 * 128) 15797 lw rIBASE, offThread_curHandlerTable(rSELF) 15798 bnez a3, 1f 15799 jr rBIX # nothing to do - jump to real handler 158001: 15801 EXPORT_PC() 15802 move a0, rPC # arg0 15803 move a1, rFP # arg1 15804 move a2, rSELF # arg2 15805 JAL(dvmCheckBefore) 15806 jr rBIX 15807 15808/* ------------------------------ */ 15809 .balign 128 15810.L_ALT_OP_SUB_INT: /* 0x91 */ 15811/* File: mips/alt_stub.S */ 15812/* 15813 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15814 * any interesting requests and then jump to the real instruction 15815 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15816 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15817 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15818 * bail to the real handler if breakFlags==0. 15819 */ 15820 lbu a3, offThread_breakFlags(rSELF) 15821 la rBIX, dvmAsmInstructionStart + (145 * 128) 15822 lw rIBASE, offThread_curHandlerTable(rSELF) 15823 bnez a3, 1f 15824 jr rBIX # nothing to do - jump to real handler 158251: 15826 EXPORT_PC() 15827 move a0, rPC # arg0 15828 move a1, rFP # arg1 15829 move a2, rSELF # arg2 15830 JAL(dvmCheckBefore) 15831 jr rBIX 15832 15833/* ------------------------------ */ 15834 .balign 128 15835.L_ALT_OP_MUL_INT: /* 0x92 */ 15836/* File: mips/alt_stub.S */ 15837/* 15838 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15839 * any interesting requests and then jump to the real instruction 15840 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15841 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15842 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15843 * bail to the real handler if breakFlags==0. 15844 */ 15845 lbu a3, offThread_breakFlags(rSELF) 15846 la rBIX, dvmAsmInstructionStart + (146 * 128) 15847 lw rIBASE, offThread_curHandlerTable(rSELF) 15848 bnez a3, 1f 15849 jr rBIX # nothing to do - jump to real handler 158501: 15851 EXPORT_PC() 15852 move a0, rPC # arg0 15853 move a1, rFP # arg1 15854 move a2, rSELF # arg2 15855 JAL(dvmCheckBefore) 15856 jr rBIX 15857 15858/* ------------------------------ */ 15859 .balign 128 15860.L_ALT_OP_DIV_INT: /* 0x93 */ 15861/* File: mips/alt_stub.S */ 15862/* 15863 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15864 * any interesting requests and then jump to the real instruction 15865 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15866 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15867 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15868 * bail to the real handler if breakFlags==0. 15869 */ 15870 lbu a3, offThread_breakFlags(rSELF) 15871 la rBIX, dvmAsmInstructionStart + (147 * 128) 15872 lw rIBASE, offThread_curHandlerTable(rSELF) 15873 bnez a3, 1f 15874 jr rBIX # nothing to do - jump to real handler 158751: 15876 EXPORT_PC() 15877 move a0, rPC # arg0 15878 move a1, rFP # arg1 15879 move a2, rSELF # arg2 15880 JAL(dvmCheckBefore) 15881 jr rBIX 15882 15883/* ------------------------------ */ 15884 .balign 128 15885.L_ALT_OP_REM_INT: /* 0x94 */ 15886/* File: mips/alt_stub.S */ 15887/* 15888 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15889 * any interesting requests and then jump to the real instruction 15890 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15891 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15892 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15893 * bail to the real handler if breakFlags==0. 15894 */ 15895 lbu a3, offThread_breakFlags(rSELF) 15896 la rBIX, dvmAsmInstructionStart + (148 * 128) 15897 lw rIBASE, offThread_curHandlerTable(rSELF) 15898 bnez a3, 1f 15899 jr rBIX # nothing to do - jump to real handler 159001: 15901 EXPORT_PC() 15902 move a0, rPC # arg0 15903 move a1, rFP # arg1 15904 move a2, rSELF # arg2 15905 JAL(dvmCheckBefore) 15906 jr rBIX 15907 15908/* ------------------------------ */ 15909 .balign 128 15910.L_ALT_OP_AND_INT: /* 0x95 */ 15911/* File: mips/alt_stub.S */ 15912/* 15913 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15914 * any interesting requests and then jump to the real instruction 15915 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15916 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15917 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15918 * bail to the real handler if breakFlags==0. 15919 */ 15920 lbu a3, offThread_breakFlags(rSELF) 15921 la rBIX, dvmAsmInstructionStart + (149 * 128) 15922 lw rIBASE, offThread_curHandlerTable(rSELF) 15923 bnez a3, 1f 15924 jr rBIX # nothing to do - jump to real handler 159251: 15926 EXPORT_PC() 15927 move a0, rPC # arg0 15928 move a1, rFP # arg1 15929 move a2, rSELF # arg2 15930 JAL(dvmCheckBefore) 15931 jr rBIX 15932 15933/* ------------------------------ */ 15934 .balign 128 15935.L_ALT_OP_OR_INT: /* 0x96 */ 15936/* File: mips/alt_stub.S */ 15937/* 15938 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15939 * any interesting requests and then jump to the real instruction 15940 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15941 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15942 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15943 * bail to the real handler if breakFlags==0. 15944 */ 15945 lbu a3, offThread_breakFlags(rSELF) 15946 la rBIX, dvmAsmInstructionStart + (150 * 128) 15947 lw rIBASE, offThread_curHandlerTable(rSELF) 15948 bnez a3, 1f 15949 jr rBIX # nothing to do - jump to real handler 159501: 15951 EXPORT_PC() 15952 move a0, rPC # arg0 15953 move a1, rFP # arg1 15954 move a2, rSELF # arg2 15955 JAL(dvmCheckBefore) 15956 jr rBIX 15957 15958/* ------------------------------ */ 15959 .balign 128 15960.L_ALT_OP_XOR_INT: /* 0x97 */ 15961/* File: mips/alt_stub.S */ 15962/* 15963 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15964 * any interesting requests and then jump to the real instruction 15965 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15966 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15967 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15968 * bail to the real handler if breakFlags==0. 15969 */ 15970 lbu a3, offThread_breakFlags(rSELF) 15971 la rBIX, dvmAsmInstructionStart + (151 * 128) 15972 lw rIBASE, offThread_curHandlerTable(rSELF) 15973 bnez a3, 1f 15974 jr rBIX # nothing to do - jump to real handler 159751: 15976 EXPORT_PC() 15977 move a0, rPC # arg0 15978 move a1, rFP # arg1 15979 move a2, rSELF # arg2 15980 JAL(dvmCheckBefore) 15981 jr rBIX 15982 15983/* ------------------------------ */ 15984 .balign 128 15985.L_ALT_OP_SHL_INT: /* 0x98 */ 15986/* File: mips/alt_stub.S */ 15987/* 15988 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 15989 * any interesting requests and then jump to the real instruction 15990 * handler. Note that the call to dvmCheckBefore is done as a tail call. 15991 * rIBASE updates won't be seen until a refresh, and we can tell we have a 15992 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 15993 * bail to the real handler if breakFlags==0. 15994 */ 15995 lbu a3, offThread_breakFlags(rSELF) 15996 la rBIX, dvmAsmInstructionStart + (152 * 128) 15997 lw rIBASE, offThread_curHandlerTable(rSELF) 15998 bnez a3, 1f 15999 jr rBIX # nothing to do - jump to real handler 160001: 16001 EXPORT_PC() 16002 move a0, rPC # arg0 16003 move a1, rFP # arg1 16004 move a2, rSELF # arg2 16005 JAL(dvmCheckBefore) 16006 jr rBIX 16007 16008/* ------------------------------ */ 16009 .balign 128 16010.L_ALT_OP_SHR_INT: /* 0x99 */ 16011/* File: mips/alt_stub.S */ 16012/* 16013 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16014 * any interesting requests and then jump to the real instruction 16015 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16016 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16017 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16018 * bail to the real handler if breakFlags==0. 16019 */ 16020 lbu a3, offThread_breakFlags(rSELF) 16021 la rBIX, dvmAsmInstructionStart + (153 * 128) 16022 lw rIBASE, offThread_curHandlerTable(rSELF) 16023 bnez a3, 1f 16024 jr rBIX # nothing to do - jump to real handler 160251: 16026 EXPORT_PC() 16027 move a0, rPC # arg0 16028 move a1, rFP # arg1 16029 move a2, rSELF # arg2 16030 JAL(dvmCheckBefore) 16031 jr rBIX 16032 16033/* ------------------------------ */ 16034 .balign 128 16035.L_ALT_OP_USHR_INT: /* 0x9a */ 16036/* File: mips/alt_stub.S */ 16037/* 16038 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16039 * any interesting requests and then jump to the real instruction 16040 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16041 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16042 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16043 * bail to the real handler if breakFlags==0. 16044 */ 16045 lbu a3, offThread_breakFlags(rSELF) 16046 la rBIX, dvmAsmInstructionStart + (154 * 128) 16047 lw rIBASE, offThread_curHandlerTable(rSELF) 16048 bnez a3, 1f 16049 jr rBIX # nothing to do - jump to real handler 160501: 16051 EXPORT_PC() 16052 move a0, rPC # arg0 16053 move a1, rFP # arg1 16054 move a2, rSELF # arg2 16055 JAL(dvmCheckBefore) 16056 jr rBIX 16057 16058/* ------------------------------ */ 16059 .balign 128 16060.L_ALT_OP_ADD_LONG: /* 0x9b */ 16061/* File: mips/alt_stub.S */ 16062/* 16063 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16064 * any interesting requests and then jump to the real instruction 16065 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16066 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16067 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16068 * bail to the real handler if breakFlags==0. 16069 */ 16070 lbu a3, offThread_breakFlags(rSELF) 16071 la rBIX, dvmAsmInstructionStart + (155 * 128) 16072 lw rIBASE, offThread_curHandlerTable(rSELF) 16073 bnez a3, 1f 16074 jr rBIX # nothing to do - jump to real handler 160751: 16076 EXPORT_PC() 16077 move a0, rPC # arg0 16078 move a1, rFP # arg1 16079 move a2, rSELF # arg2 16080 JAL(dvmCheckBefore) 16081 jr rBIX 16082 16083/* ------------------------------ */ 16084 .balign 128 16085.L_ALT_OP_SUB_LONG: /* 0x9c */ 16086/* File: mips/alt_stub.S */ 16087/* 16088 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16089 * any interesting requests and then jump to the real instruction 16090 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16091 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16092 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16093 * bail to the real handler if breakFlags==0. 16094 */ 16095 lbu a3, offThread_breakFlags(rSELF) 16096 la rBIX, dvmAsmInstructionStart + (156 * 128) 16097 lw rIBASE, offThread_curHandlerTable(rSELF) 16098 bnez a3, 1f 16099 jr rBIX # nothing to do - jump to real handler 161001: 16101 EXPORT_PC() 16102 move a0, rPC # arg0 16103 move a1, rFP # arg1 16104 move a2, rSELF # arg2 16105 JAL(dvmCheckBefore) 16106 jr rBIX 16107 16108/* ------------------------------ */ 16109 .balign 128 16110.L_ALT_OP_MUL_LONG: /* 0x9d */ 16111/* File: mips/alt_stub.S */ 16112/* 16113 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16114 * any interesting requests and then jump to the real instruction 16115 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16116 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16117 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16118 * bail to the real handler if breakFlags==0. 16119 */ 16120 lbu a3, offThread_breakFlags(rSELF) 16121 la rBIX, dvmAsmInstructionStart + (157 * 128) 16122 lw rIBASE, offThread_curHandlerTable(rSELF) 16123 bnez a3, 1f 16124 jr rBIX # nothing to do - jump to real handler 161251: 16126 EXPORT_PC() 16127 move a0, rPC # arg0 16128 move a1, rFP # arg1 16129 move a2, rSELF # arg2 16130 JAL(dvmCheckBefore) 16131 jr rBIX 16132 16133/* ------------------------------ */ 16134 .balign 128 16135.L_ALT_OP_DIV_LONG: /* 0x9e */ 16136/* File: mips/alt_stub.S */ 16137/* 16138 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16139 * any interesting requests and then jump to the real instruction 16140 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16141 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16142 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16143 * bail to the real handler if breakFlags==0. 16144 */ 16145 lbu a3, offThread_breakFlags(rSELF) 16146 la rBIX, dvmAsmInstructionStart + (158 * 128) 16147 lw rIBASE, offThread_curHandlerTable(rSELF) 16148 bnez a3, 1f 16149 jr rBIX # nothing to do - jump to real handler 161501: 16151 EXPORT_PC() 16152 move a0, rPC # arg0 16153 move a1, rFP # arg1 16154 move a2, rSELF # arg2 16155 JAL(dvmCheckBefore) 16156 jr rBIX 16157 16158/* ------------------------------ */ 16159 .balign 128 16160.L_ALT_OP_REM_LONG: /* 0x9f */ 16161/* File: mips/alt_stub.S */ 16162/* 16163 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16164 * any interesting requests and then jump to the real instruction 16165 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16166 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16167 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16168 * bail to the real handler if breakFlags==0. 16169 */ 16170 lbu a3, offThread_breakFlags(rSELF) 16171 la rBIX, dvmAsmInstructionStart + (159 * 128) 16172 lw rIBASE, offThread_curHandlerTable(rSELF) 16173 bnez a3, 1f 16174 jr rBIX # nothing to do - jump to real handler 161751: 16176 EXPORT_PC() 16177 move a0, rPC # arg0 16178 move a1, rFP # arg1 16179 move a2, rSELF # arg2 16180 JAL(dvmCheckBefore) 16181 jr rBIX 16182 16183/* ------------------------------ */ 16184 .balign 128 16185.L_ALT_OP_AND_LONG: /* 0xa0 */ 16186/* File: mips/alt_stub.S */ 16187/* 16188 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16189 * any interesting requests and then jump to the real instruction 16190 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16191 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16192 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16193 * bail to the real handler if breakFlags==0. 16194 */ 16195 lbu a3, offThread_breakFlags(rSELF) 16196 la rBIX, dvmAsmInstructionStart + (160 * 128) 16197 lw rIBASE, offThread_curHandlerTable(rSELF) 16198 bnez a3, 1f 16199 jr rBIX # nothing to do - jump to real handler 162001: 16201 EXPORT_PC() 16202 move a0, rPC # arg0 16203 move a1, rFP # arg1 16204 move a2, rSELF # arg2 16205 JAL(dvmCheckBefore) 16206 jr rBIX 16207 16208/* ------------------------------ */ 16209 .balign 128 16210.L_ALT_OP_OR_LONG: /* 0xa1 */ 16211/* File: mips/alt_stub.S */ 16212/* 16213 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16214 * any interesting requests and then jump to the real instruction 16215 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16216 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16217 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16218 * bail to the real handler if breakFlags==0. 16219 */ 16220 lbu a3, offThread_breakFlags(rSELF) 16221 la rBIX, dvmAsmInstructionStart + (161 * 128) 16222 lw rIBASE, offThread_curHandlerTable(rSELF) 16223 bnez a3, 1f 16224 jr rBIX # nothing to do - jump to real handler 162251: 16226 EXPORT_PC() 16227 move a0, rPC # arg0 16228 move a1, rFP # arg1 16229 move a2, rSELF # arg2 16230 JAL(dvmCheckBefore) 16231 jr rBIX 16232 16233/* ------------------------------ */ 16234 .balign 128 16235.L_ALT_OP_XOR_LONG: /* 0xa2 */ 16236/* File: mips/alt_stub.S */ 16237/* 16238 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16239 * any interesting requests and then jump to the real instruction 16240 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16241 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16242 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16243 * bail to the real handler if breakFlags==0. 16244 */ 16245 lbu a3, offThread_breakFlags(rSELF) 16246 la rBIX, dvmAsmInstructionStart + (162 * 128) 16247 lw rIBASE, offThread_curHandlerTable(rSELF) 16248 bnez a3, 1f 16249 jr rBIX # nothing to do - jump to real handler 162501: 16251 EXPORT_PC() 16252 move a0, rPC # arg0 16253 move a1, rFP # arg1 16254 move a2, rSELF # arg2 16255 JAL(dvmCheckBefore) 16256 jr rBIX 16257 16258/* ------------------------------ */ 16259 .balign 128 16260.L_ALT_OP_SHL_LONG: /* 0xa3 */ 16261/* File: mips/alt_stub.S */ 16262/* 16263 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16264 * any interesting requests and then jump to the real instruction 16265 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16266 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16267 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16268 * bail to the real handler if breakFlags==0. 16269 */ 16270 lbu a3, offThread_breakFlags(rSELF) 16271 la rBIX, dvmAsmInstructionStart + (163 * 128) 16272 lw rIBASE, offThread_curHandlerTable(rSELF) 16273 bnez a3, 1f 16274 jr rBIX # nothing to do - jump to real handler 162751: 16276 EXPORT_PC() 16277 move a0, rPC # arg0 16278 move a1, rFP # arg1 16279 move a2, rSELF # arg2 16280 JAL(dvmCheckBefore) 16281 jr rBIX 16282 16283/* ------------------------------ */ 16284 .balign 128 16285.L_ALT_OP_SHR_LONG: /* 0xa4 */ 16286/* File: mips/alt_stub.S */ 16287/* 16288 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16289 * any interesting requests and then jump to the real instruction 16290 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16291 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16292 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16293 * bail to the real handler if breakFlags==0. 16294 */ 16295 lbu a3, offThread_breakFlags(rSELF) 16296 la rBIX, dvmAsmInstructionStart + (164 * 128) 16297 lw rIBASE, offThread_curHandlerTable(rSELF) 16298 bnez a3, 1f 16299 jr rBIX # nothing to do - jump to real handler 163001: 16301 EXPORT_PC() 16302 move a0, rPC # arg0 16303 move a1, rFP # arg1 16304 move a2, rSELF # arg2 16305 JAL(dvmCheckBefore) 16306 jr rBIX 16307 16308/* ------------------------------ */ 16309 .balign 128 16310.L_ALT_OP_USHR_LONG: /* 0xa5 */ 16311/* File: mips/alt_stub.S */ 16312/* 16313 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16314 * any interesting requests and then jump to the real instruction 16315 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16316 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16317 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16318 * bail to the real handler if breakFlags==0. 16319 */ 16320 lbu a3, offThread_breakFlags(rSELF) 16321 la rBIX, dvmAsmInstructionStart + (165 * 128) 16322 lw rIBASE, offThread_curHandlerTable(rSELF) 16323 bnez a3, 1f 16324 jr rBIX # nothing to do - jump to real handler 163251: 16326 EXPORT_PC() 16327 move a0, rPC # arg0 16328 move a1, rFP # arg1 16329 move a2, rSELF # arg2 16330 JAL(dvmCheckBefore) 16331 jr rBIX 16332 16333/* ------------------------------ */ 16334 .balign 128 16335.L_ALT_OP_ADD_FLOAT: /* 0xa6 */ 16336/* File: mips/alt_stub.S */ 16337/* 16338 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16339 * any interesting requests and then jump to the real instruction 16340 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16341 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16342 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16343 * bail to the real handler if breakFlags==0. 16344 */ 16345 lbu a3, offThread_breakFlags(rSELF) 16346 la rBIX, dvmAsmInstructionStart + (166 * 128) 16347 lw rIBASE, offThread_curHandlerTable(rSELF) 16348 bnez a3, 1f 16349 jr rBIX # nothing to do - jump to real handler 163501: 16351 EXPORT_PC() 16352 move a0, rPC # arg0 16353 move a1, rFP # arg1 16354 move a2, rSELF # arg2 16355 JAL(dvmCheckBefore) 16356 jr rBIX 16357 16358/* ------------------------------ */ 16359 .balign 128 16360.L_ALT_OP_SUB_FLOAT: /* 0xa7 */ 16361/* File: mips/alt_stub.S */ 16362/* 16363 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16364 * any interesting requests and then jump to the real instruction 16365 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16366 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16367 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16368 * bail to the real handler if breakFlags==0. 16369 */ 16370 lbu a3, offThread_breakFlags(rSELF) 16371 la rBIX, dvmAsmInstructionStart + (167 * 128) 16372 lw rIBASE, offThread_curHandlerTable(rSELF) 16373 bnez a3, 1f 16374 jr rBIX # nothing to do - jump to real handler 163751: 16376 EXPORT_PC() 16377 move a0, rPC # arg0 16378 move a1, rFP # arg1 16379 move a2, rSELF # arg2 16380 JAL(dvmCheckBefore) 16381 jr rBIX 16382 16383/* ------------------------------ */ 16384 .balign 128 16385.L_ALT_OP_MUL_FLOAT: /* 0xa8 */ 16386/* File: mips/alt_stub.S */ 16387/* 16388 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16389 * any interesting requests and then jump to the real instruction 16390 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16391 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16392 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16393 * bail to the real handler if breakFlags==0. 16394 */ 16395 lbu a3, offThread_breakFlags(rSELF) 16396 la rBIX, dvmAsmInstructionStart + (168 * 128) 16397 lw rIBASE, offThread_curHandlerTable(rSELF) 16398 bnez a3, 1f 16399 jr rBIX # nothing to do - jump to real handler 164001: 16401 EXPORT_PC() 16402 move a0, rPC # arg0 16403 move a1, rFP # arg1 16404 move a2, rSELF # arg2 16405 JAL(dvmCheckBefore) 16406 jr rBIX 16407 16408/* ------------------------------ */ 16409 .balign 128 16410.L_ALT_OP_DIV_FLOAT: /* 0xa9 */ 16411/* File: mips/alt_stub.S */ 16412/* 16413 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16414 * any interesting requests and then jump to the real instruction 16415 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16416 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16417 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16418 * bail to the real handler if breakFlags==0. 16419 */ 16420 lbu a3, offThread_breakFlags(rSELF) 16421 la rBIX, dvmAsmInstructionStart + (169 * 128) 16422 lw rIBASE, offThread_curHandlerTable(rSELF) 16423 bnez a3, 1f 16424 jr rBIX # nothing to do - jump to real handler 164251: 16426 EXPORT_PC() 16427 move a0, rPC # arg0 16428 move a1, rFP # arg1 16429 move a2, rSELF # arg2 16430 JAL(dvmCheckBefore) 16431 jr rBIX 16432 16433/* ------------------------------ */ 16434 .balign 128 16435.L_ALT_OP_REM_FLOAT: /* 0xaa */ 16436/* File: mips/alt_stub.S */ 16437/* 16438 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16439 * any interesting requests and then jump to the real instruction 16440 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16441 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16442 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16443 * bail to the real handler if breakFlags==0. 16444 */ 16445 lbu a3, offThread_breakFlags(rSELF) 16446 la rBIX, dvmAsmInstructionStart + (170 * 128) 16447 lw rIBASE, offThread_curHandlerTable(rSELF) 16448 bnez a3, 1f 16449 jr rBIX # nothing to do - jump to real handler 164501: 16451 EXPORT_PC() 16452 move a0, rPC # arg0 16453 move a1, rFP # arg1 16454 move a2, rSELF # arg2 16455 JAL(dvmCheckBefore) 16456 jr rBIX 16457 16458/* ------------------------------ */ 16459 .balign 128 16460.L_ALT_OP_ADD_DOUBLE: /* 0xab */ 16461/* File: mips/alt_stub.S */ 16462/* 16463 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16464 * any interesting requests and then jump to the real instruction 16465 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16466 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16467 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16468 * bail to the real handler if breakFlags==0. 16469 */ 16470 lbu a3, offThread_breakFlags(rSELF) 16471 la rBIX, dvmAsmInstructionStart + (171 * 128) 16472 lw rIBASE, offThread_curHandlerTable(rSELF) 16473 bnez a3, 1f 16474 jr rBIX # nothing to do - jump to real handler 164751: 16476 EXPORT_PC() 16477 move a0, rPC # arg0 16478 move a1, rFP # arg1 16479 move a2, rSELF # arg2 16480 JAL(dvmCheckBefore) 16481 jr rBIX 16482 16483/* ------------------------------ */ 16484 .balign 128 16485.L_ALT_OP_SUB_DOUBLE: /* 0xac */ 16486/* File: mips/alt_stub.S */ 16487/* 16488 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16489 * any interesting requests and then jump to the real instruction 16490 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16491 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16492 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16493 * bail to the real handler if breakFlags==0. 16494 */ 16495 lbu a3, offThread_breakFlags(rSELF) 16496 la rBIX, dvmAsmInstructionStart + (172 * 128) 16497 lw rIBASE, offThread_curHandlerTable(rSELF) 16498 bnez a3, 1f 16499 jr rBIX # nothing to do - jump to real handler 165001: 16501 EXPORT_PC() 16502 move a0, rPC # arg0 16503 move a1, rFP # arg1 16504 move a2, rSELF # arg2 16505 JAL(dvmCheckBefore) 16506 jr rBIX 16507 16508/* ------------------------------ */ 16509 .balign 128 16510.L_ALT_OP_MUL_DOUBLE: /* 0xad */ 16511/* File: mips/alt_stub.S */ 16512/* 16513 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16514 * any interesting requests and then jump to the real instruction 16515 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16516 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16517 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16518 * bail to the real handler if breakFlags==0. 16519 */ 16520 lbu a3, offThread_breakFlags(rSELF) 16521 la rBIX, dvmAsmInstructionStart + (173 * 128) 16522 lw rIBASE, offThread_curHandlerTable(rSELF) 16523 bnez a3, 1f 16524 jr rBIX # nothing to do - jump to real handler 165251: 16526 EXPORT_PC() 16527 move a0, rPC # arg0 16528 move a1, rFP # arg1 16529 move a2, rSELF # arg2 16530 JAL(dvmCheckBefore) 16531 jr rBIX 16532 16533/* ------------------------------ */ 16534 .balign 128 16535.L_ALT_OP_DIV_DOUBLE: /* 0xae */ 16536/* File: mips/alt_stub.S */ 16537/* 16538 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16539 * any interesting requests and then jump to the real instruction 16540 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16541 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16542 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16543 * bail to the real handler if breakFlags==0. 16544 */ 16545 lbu a3, offThread_breakFlags(rSELF) 16546 la rBIX, dvmAsmInstructionStart + (174 * 128) 16547 lw rIBASE, offThread_curHandlerTable(rSELF) 16548 bnez a3, 1f 16549 jr rBIX # nothing to do - jump to real handler 165501: 16551 EXPORT_PC() 16552 move a0, rPC # arg0 16553 move a1, rFP # arg1 16554 move a2, rSELF # arg2 16555 JAL(dvmCheckBefore) 16556 jr rBIX 16557 16558/* ------------------------------ */ 16559 .balign 128 16560.L_ALT_OP_REM_DOUBLE: /* 0xaf */ 16561/* File: mips/alt_stub.S */ 16562/* 16563 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16564 * any interesting requests and then jump to the real instruction 16565 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16566 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16567 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16568 * bail to the real handler if breakFlags==0. 16569 */ 16570 lbu a3, offThread_breakFlags(rSELF) 16571 la rBIX, dvmAsmInstructionStart + (175 * 128) 16572 lw rIBASE, offThread_curHandlerTable(rSELF) 16573 bnez a3, 1f 16574 jr rBIX # nothing to do - jump to real handler 165751: 16576 EXPORT_PC() 16577 move a0, rPC # arg0 16578 move a1, rFP # arg1 16579 move a2, rSELF # arg2 16580 JAL(dvmCheckBefore) 16581 jr rBIX 16582 16583/* ------------------------------ */ 16584 .balign 128 16585.L_ALT_OP_ADD_INT_2ADDR: /* 0xb0 */ 16586/* File: mips/alt_stub.S */ 16587/* 16588 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16589 * any interesting requests and then jump to the real instruction 16590 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16591 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16592 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16593 * bail to the real handler if breakFlags==0. 16594 */ 16595 lbu a3, offThread_breakFlags(rSELF) 16596 la rBIX, dvmAsmInstructionStart + (176 * 128) 16597 lw rIBASE, offThread_curHandlerTable(rSELF) 16598 bnez a3, 1f 16599 jr rBIX # nothing to do - jump to real handler 166001: 16601 EXPORT_PC() 16602 move a0, rPC # arg0 16603 move a1, rFP # arg1 16604 move a2, rSELF # arg2 16605 JAL(dvmCheckBefore) 16606 jr rBIX 16607 16608/* ------------------------------ */ 16609 .balign 128 16610.L_ALT_OP_SUB_INT_2ADDR: /* 0xb1 */ 16611/* File: mips/alt_stub.S */ 16612/* 16613 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16614 * any interesting requests and then jump to the real instruction 16615 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16616 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16617 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16618 * bail to the real handler if breakFlags==0. 16619 */ 16620 lbu a3, offThread_breakFlags(rSELF) 16621 la rBIX, dvmAsmInstructionStart + (177 * 128) 16622 lw rIBASE, offThread_curHandlerTable(rSELF) 16623 bnez a3, 1f 16624 jr rBIX # nothing to do - jump to real handler 166251: 16626 EXPORT_PC() 16627 move a0, rPC # arg0 16628 move a1, rFP # arg1 16629 move a2, rSELF # arg2 16630 JAL(dvmCheckBefore) 16631 jr rBIX 16632 16633/* ------------------------------ */ 16634 .balign 128 16635.L_ALT_OP_MUL_INT_2ADDR: /* 0xb2 */ 16636/* File: mips/alt_stub.S */ 16637/* 16638 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16639 * any interesting requests and then jump to the real instruction 16640 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16641 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16642 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16643 * bail to the real handler if breakFlags==0. 16644 */ 16645 lbu a3, offThread_breakFlags(rSELF) 16646 la rBIX, dvmAsmInstructionStart + (178 * 128) 16647 lw rIBASE, offThread_curHandlerTable(rSELF) 16648 bnez a3, 1f 16649 jr rBIX # nothing to do - jump to real handler 166501: 16651 EXPORT_PC() 16652 move a0, rPC # arg0 16653 move a1, rFP # arg1 16654 move a2, rSELF # arg2 16655 JAL(dvmCheckBefore) 16656 jr rBIX 16657 16658/* ------------------------------ */ 16659 .balign 128 16660.L_ALT_OP_DIV_INT_2ADDR: /* 0xb3 */ 16661/* File: mips/alt_stub.S */ 16662/* 16663 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16664 * any interesting requests and then jump to the real instruction 16665 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16666 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16667 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16668 * bail to the real handler if breakFlags==0. 16669 */ 16670 lbu a3, offThread_breakFlags(rSELF) 16671 la rBIX, dvmAsmInstructionStart + (179 * 128) 16672 lw rIBASE, offThread_curHandlerTable(rSELF) 16673 bnez a3, 1f 16674 jr rBIX # nothing to do - jump to real handler 166751: 16676 EXPORT_PC() 16677 move a0, rPC # arg0 16678 move a1, rFP # arg1 16679 move a2, rSELF # arg2 16680 JAL(dvmCheckBefore) 16681 jr rBIX 16682 16683/* ------------------------------ */ 16684 .balign 128 16685.L_ALT_OP_REM_INT_2ADDR: /* 0xb4 */ 16686/* File: mips/alt_stub.S */ 16687/* 16688 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16689 * any interesting requests and then jump to the real instruction 16690 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16691 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16692 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16693 * bail to the real handler if breakFlags==0. 16694 */ 16695 lbu a3, offThread_breakFlags(rSELF) 16696 la rBIX, dvmAsmInstructionStart + (180 * 128) 16697 lw rIBASE, offThread_curHandlerTable(rSELF) 16698 bnez a3, 1f 16699 jr rBIX # nothing to do - jump to real handler 167001: 16701 EXPORT_PC() 16702 move a0, rPC # arg0 16703 move a1, rFP # arg1 16704 move a2, rSELF # arg2 16705 JAL(dvmCheckBefore) 16706 jr rBIX 16707 16708/* ------------------------------ */ 16709 .balign 128 16710.L_ALT_OP_AND_INT_2ADDR: /* 0xb5 */ 16711/* File: mips/alt_stub.S */ 16712/* 16713 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16714 * any interesting requests and then jump to the real instruction 16715 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16716 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16717 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16718 * bail to the real handler if breakFlags==0. 16719 */ 16720 lbu a3, offThread_breakFlags(rSELF) 16721 la rBIX, dvmAsmInstructionStart + (181 * 128) 16722 lw rIBASE, offThread_curHandlerTable(rSELF) 16723 bnez a3, 1f 16724 jr rBIX # nothing to do - jump to real handler 167251: 16726 EXPORT_PC() 16727 move a0, rPC # arg0 16728 move a1, rFP # arg1 16729 move a2, rSELF # arg2 16730 JAL(dvmCheckBefore) 16731 jr rBIX 16732 16733/* ------------------------------ */ 16734 .balign 128 16735.L_ALT_OP_OR_INT_2ADDR: /* 0xb6 */ 16736/* File: mips/alt_stub.S */ 16737/* 16738 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16739 * any interesting requests and then jump to the real instruction 16740 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16741 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16742 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16743 * bail to the real handler if breakFlags==0. 16744 */ 16745 lbu a3, offThread_breakFlags(rSELF) 16746 la rBIX, dvmAsmInstructionStart + (182 * 128) 16747 lw rIBASE, offThread_curHandlerTable(rSELF) 16748 bnez a3, 1f 16749 jr rBIX # nothing to do - jump to real handler 167501: 16751 EXPORT_PC() 16752 move a0, rPC # arg0 16753 move a1, rFP # arg1 16754 move a2, rSELF # arg2 16755 JAL(dvmCheckBefore) 16756 jr rBIX 16757 16758/* ------------------------------ */ 16759 .balign 128 16760.L_ALT_OP_XOR_INT_2ADDR: /* 0xb7 */ 16761/* File: mips/alt_stub.S */ 16762/* 16763 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16764 * any interesting requests and then jump to the real instruction 16765 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16766 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16767 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16768 * bail to the real handler if breakFlags==0. 16769 */ 16770 lbu a3, offThread_breakFlags(rSELF) 16771 la rBIX, dvmAsmInstructionStart + (183 * 128) 16772 lw rIBASE, offThread_curHandlerTable(rSELF) 16773 bnez a3, 1f 16774 jr rBIX # nothing to do - jump to real handler 167751: 16776 EXPORT_PC() 16777 move a0, rPC # arg0 16778 move a1, rFP # arg1 16779 move a2, rSELF # arg2 16780 JAL(dvmCheckBefore) 16781 jr rBIX 16782 16783/* ------------------------------ */ 16784 .balign 128 16785.L_ALT_OP_SHL_INT_2ADDR: /* 0xb8 */ 16786/* File: mips/alt_stub.S */ 16787/* 16788 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16789 * any interesting requests and then jump to the real instruction 16790 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16791 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16792 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16793 * bail to the real handler if breakFlags==0. 16794 */ 16795 lbu a3, offThread_breakFlags(rSELF) 16796 la rBIX, dvmAsmInstructionStart + (184 * 128) 16797 lw rIBASE, offThread_curHandlerTable(rSELF) 16798 bnez a3, 1f 16799 jr rBIX # nothing to do - jump to real handler 168001: 16801 EXPORT_PC() 16802 move a0, rPC # arg0 16803 move a1, rFP # arg1 16804 move a2, rSELF # arg2 16805 JAL(dvmCheckBefore) 16806 jr rBIX 16807 16808/* ------------------------------ */ 16809 .balign 128 16810.L_ALT_OP_SHR_INT_2ADDR: /* 0xb9 */ 16811/* File: mips/alt_stub.S */ 16812/* 16813 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16814 * any interesting requests and then jump to the real instruction 16815 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16816 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16817 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16818 * bail to the real handler if breakFlags==0. 16819 */ 16820 lbu a3, offThread_breakFlags(rSELF) 16821 la rBIX, dvmAsmInstructionStart + (185 * 128) 16822 lw rIBASE, offThread_curHandlerTable(rSELF) 16823 bnez a3, 1f 16824 jr rBIX # nothing to do - jump to real handler 168251: 16826 EXPORT_PC() 16827 move a0, rPC # arg0 16828 move a1, rFP # arg1 16829 move a2, rSELF # arg2 16830 JAL(dvmCheckBefore) 16831 jr rBIX 16832 16833/* ------------------------------ */ 16834 .balign 128 16835.L_ALT_OP_USHR_INT_2ADDR: /* 0xba */ 16836/* File: mips/alt_stub.S */ 16837/* 16838 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16839 * any interesting requests and then jump to the real instruction 16840 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16841 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16842 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16843 * bail to the real handler if breakFlags==0. 16844 */ 16845 lbu a3, offThread_breakFlags(rSELF) 16846 la rBIX, dvmAsmInstructionStart + (186 * 128) 16847 lw rIBASE, offThread_curHandlerTable(rSELF) 16848 bnez a3, 1f 16849 jr rBIX # nothing to do - jump to real handler 168501: 16851 EXPORT_PC() 16852 move a0, rPC # arg0 16853 move a1, rFP # arg1 16854 move a2, rSELF # arg2 16855 JAL(dvmCheckBefore) 16856 jr rBIX 16857 16858/* ------------------------------ */ 16859 .balign 128 16860.L_ALT_OP_ADD_LONG_2ADDR: /* 0xbb */ 16861/* File: mips/alt_stub.S */ 16862/* 16863 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16864 * any interesting requests and then jump to the real instruction 16865 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16866 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16867 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16868 * bail to the real handler if breakFlags==0. 16869 */ 16870 lbu a3, offThread_breakFlags(rSELF) 16871 la rBIX, dvmAsmInstructionStart + (187 * 128) 16872 lw rIBASE, offThread_curHandlerTable(rSELF) 16873 bnez a3, 1f 16874 jr rBIX # nothing to do - jump to real handler 168751: 16876 EXPORT_PC() 16877 move a0, rPC # arg0 16878 move a1, rFP # arg1 16879 move a2, rSELF # arg2 16880 JAL(dvmCheckBefore) 16881 jr rBIX 16882 16883/* ------------------------------ */ 16884 .balign 128 16885.L_ALT_OP_SUB_LONG_2ADDR: /* 0xbc */ 16886/* File: mips/alt_stub.S */ 16887/* 16888 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16889 * any interesting requests and then jump to the real instruction 16890 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16891 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16892 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16893 * bail to the real handler if breakFlags==0. 16894 */ 16895 lbu a3, offThread_breakFlags(rSELF) 16896 la rBIX, dvmAsmInstructionStart + (188 * 128) 16897 lw rIBASE, offThread_curHandlerTable(rSELF) 16898 bnez a3, 1f 16899 jr rBIX # nothing to do - jump to real handler 169001: 16901 EXPORT_PC() 16902 move a0, rPC # arg0 16903 move a1, rFP # arg1 16904 move a2, rSELF # arg2 16905 JAL(dvmCheckBefore) 16906 jr rBIX 16907 16908/* ------------------------------ */ 16909 .balign 128 16910.L_ALT_OP_MUL_LONG_2ADDR: /* 0xbd */ 16911/* File: mips/alt_stub.S */ 16912/* 16913 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16914 * any interesting requests and then jump to the real instruction 16915 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16916 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16917 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16918 * bail to the real handler if breakFlags==0. 16919 */ 16920 lbu a3, offThread_breakFlags(rSELF) 16921 la rBIX, dvmAsmInstructionStart + (189 * 128) 16922 lw rIBASE, offThread_curHandlerTable(rSELF) 16923 bnez a3, 1f 16924 jr rBIX # nothing to do - jump to real handler 169251: 16926 EXPORT_PC() 16927 move a0, rPC # arg0 16928 move a1, rFP # arg1 16929 move a2, rSELF # arg2 16930 JAL(dvmCheckBefore) 16931 jr rBIX 16932 16933/* ------------------------------ */ 16934 .balign 128 16935.L_ALT_OP_DIV_LONG_2ADDR: /* 0xbe */ 16936/* File: mips/alt_stub.S */ 16937/* 16938 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16939 * any interesting requests and then jump to the real instruction 16940 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16941 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16942 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16943 * bail to the real handler if breakFlags==0. 16944 */ 16945 lbu a3, offThread_breakFlags(rSELF) 16946 la rBIX, dvmAsmInstructionStart + (190 * 128) 16947 lw rIBASE, offThread_curHandlerTable(rSELF) 16948 bnez a3, 1f 16949 jr rBIX # nothing to do - jump to real handler 169501: 16951 EXPORT_PC() 16952 move a0, rPC # arg0 16953 move a1, rFP # arg1 16954 move a2, rSELF # arg2 16955 JAL(dvmCheckBefore) 16956 jr rBIX 16957 16958/* ------------------------------ */ 16959 .balign 128 16960.L_ALT_OP_REM_LONG_2ADDR: /* 0xbf */ 16961/* File: mips/alt_stub.S */ 16962/* 16963 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16964 * any interesting requests and then jump to the real instruction 16965 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16966 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16967 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16968 * bail to the real handler if breakFlags==0. 16969 */ 16970 lbu a3, offThread_breakFlags(rSELF) 16971 la rBIX, dvmAsmInstructionStart + (191 * 128) 16972 lw rIBASE, offThread_curHandlerTable(rSELF) 16973 bnez a3, 1f 16974 jr rBIX # nothing to do - jump to real handler 169751: 16976 EXPORT_PC() 16977 move a0, rPC # arg0 16978 move a1, rFP # arg1 16979 move a2, rSELF # arg2 16980 JAL(dvmCheckBefore) 16981 jr rBIX 16982 16983/* ------------------------------ */ 16984 .balign 128 16985.L_ALT_OP_AND_LONG_2ADDR: /* 0xc0 */ 16986/* File: mips/alt_stub.S */ 16987/* 16988 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 16989 * any interesting requests and then jump to the real instruction 16990 * handler. Note that the call to dvmCheckBefore is done as a tail call. 16991 * rIBASE updates won't be seen until a refresh, and we can tell we have a 16992 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 16993 * bail to the real handler if breakFlags==0. 16994 */ 16995 lbu a3, offThread_breakFlags(rSELF) 16996 la rBIX, dvmAsmInstructionStart + (192 * 128) 16997 lw rIBASE, offThread_curHandlerTable(rSELF) 16998 bnez a3, 1f 16999 jr rBIX # nothing to do - jump to real handler 170001: 17001 EXPORT_PC() 17002 move a0, rPC # arg0 17003 move a1, rFP # arg1 17004 move a2, rSELF # arg2 17005 JAL(dvmCheckBefore) 17006 jr rBIX 17007 17008/* ------------------------------ */ 17009 .balign 128 17010.L_ALT_OP_OR_LONG_2ADDR: /* 0xc1 */ 17011/* File: mips/alt_stub.S */ 17012/* 17013 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17014 * any interesting requests and then jump to the real instruction 17015 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17016 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17017 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17018 * bail to the real handler if breakFlags==0. 17019 */ 17020 lbu a3, offThread_breakFlags(rSELF) 17021 la rBIX, dvmAsmInstructionStart + (193 * 128) 17022 lw rIBASE, offThread_curHandlerTable(rSELF) 17023 bnez a3, 1f 17024 jr rBIX # nothing to do - jump to real handler 170251: 17026 EXPORT_PC() 17027 move a0, rPC # arg0 17028 move a1, rFP # arg1 17029 move a2, rSELF # arg2 17030 JAL(dvmCheckBefore) 17031 jr rBIX 17032 17033/* ------------------------------ */ 17034 .balign 128 17035.L_ALT_OP_XOR_LONG_2ADDR: /* 0xc2 */ 17036/* File: mips/alt_stub.S */ 17037/* 17038 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17039 * any interesting requests and then jump to the real instruction 17040 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17041 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17042 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17043 * bail to the real handler if breakFlags==0. 17044 */ 17045 lbu a3, offThread_breakFlags(rSELF) 17046 la rBIX, dvmAsmInstructionStart + (194 * 128) 17047 lw rIBASE, offThread_curHandlerTable(rSELF) 17048 bnez a3, 1f 17049 jr rBIX # nothing to do - jump to real handler 170501: 17051 EXPORT_PC() 17052 move a0, rPC # arg0 17053 move a1, rFP # arg1 17054 move a2, rSELF # arg2 17055 JAL(dvmCheckBefore) 17056 jr rBIX 17057 17058/* ------------------------------ */ 17059 .balign 128 17060.L_ALT_OP_SHL_LONG_2ADDR: /* 0xc3 */ 17061/* File: mips/alt_stub.S */ 17062/* 17063 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17064 * any interesting requests and then jump to the real instruction 17065 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17066 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17067 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17068 * bail to the real handler if breakFlags==0. 17069 */ 17070 lbu a3, offThread_breakFlags(rSELF) 17071 la rBIX, dvmAsmInstructionStart + (195 * 128) 17072 lw rIBASE, offThread_curHandlerTable(rSELF) 17073 bnez a3, 1f 17074 jr rBIX # nothing to do - jump to real handler 170751: 17076 EXPORT_PC() 17077 move a0, rPC # arg0 17078 move a1, rFP # arg1 17079 move a2, rSELF # arg2 17080 JAL(dvmCheckBefore) 17081 jr rBIX 17082 17083/* ------------------------------ */ 17084 .balign 128 17085.L_ALT_OP_SHR_LONG_2ADDR: /* 0xc4 */ 17086/* File: mips/alt_stub.S */ 17087/* 17088 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17089 * any interesting requests and then jump to the real instruction 17090 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17091 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17092 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17093 * bail to the real handler if breakFlags==0. 17094 */ 17095 lbu a3, offThread_breakFlags(rSELF) 17096 la rBIX, dvmAsmInstructionStart + (196 * 128) 17097 lw rIBASE, offThread_curHandlerTable(rSELF) 17098 bnez a3, 1f 17099 jr rBIX # nothing to do - jump to real handler 171001: 17101 EXPORT_PC() 17102 move a0, rPC # arg0 17103 move a1, rFP # arg1 17104 move a2, rSELF # arg2 17105 JAL(dvmCheckBefore) 17106 jr rBIX 17107 17108/* ------------------------------ */ 17109 .balign 128 17110.L_ALT_OP_USHR_LONG_2ADDR: /* 0xc5 */ 17111/* File: mips/alt_stub.S */ 17112/* 17113 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17114 * any interesting requests and then jump to the real instruction 17115 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17116 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17117 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17118 * bail to the real handler if breakFlags==0. 17119 */ 17120 lbu a3, offThread_breakFlags(rSELF) 17121 la rBIX, dvmAsmInstructionStart + (197 * 128) 17122 lw rIBASE, offThread_curHandlerTable(rSELF) 17123 bnez a3, 1f 17124 jr rBIX # nothing to do - jump to real handler 171251: 17126 EXPORT_PC() 17127 move a0, rPC # arg0 17128 move a1, rFP # arg1 17129 move a2, rSELF # arg2 17130 JAL(dvmCheckBefore) 17131 jr rBIX 17132 17133/* ------------------------------ */ 17134 .balign 128 17135.L_ALT_OP_ADD_FLOAT_2ADDR: /* 0xc6 */ 17136/* File: mips/alt_stub.S */ 17137/* 17138 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17139 * any interesting requests and then jump to the real instruction 17140 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17141 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17142 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17143 * bail to the real handler if breakFlags==0. 17144 */ 17145 lbu a3, offThread_breakFlags(rSELF) 17146 la rBIX, dvmAsmInstructionStart + (198 * 128) 17147 lw rIBASE, offThread_curHandlerTable(rSELF) 17148 bnez a3, 1f 17149 jr rBIX # nothing to do - jump to real handler 171501: 17151 EXPORT_PC() 17152 move a0, rPC # arg0 17153 move a1, rFP # arg1 17154 move a2, rSELF # arg2 17155 JAL(dvmCheckBefore) 17156 jr rBIX 17157 17158/* ------------------------------ */ 17159 .balign 128 17160.L_ALT_OP_SUB_FLOAT_2ADDR: /* 0xc7 */ 17161/* File: mips/alt_stub.S */ 17162/* 17163 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17164 * any interesting requests and then jump to the real instruction 17165 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17166 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17167 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17168 * bail to the real handler if breakFlags==0. 17169 */ 17170 lbu a3, offThread_breakFlags(rSELF) 17171 la rBIX, dvmAsmInstructionStart + (199 * 128) 17172 lw rIBASE, offThread_curHandlerTable(rSELF) 17173 bnez a3, 1f 17174 jr rBIX # nothing to do - jump to real handler 171751: 17176 EXPORT_PC() 17177 move a0, rPC # arg0 17178 move a1, rFP # arg1 17179 move a2, rSELF # arg2 17180 JAL(dvmCheckBefore) 17181 jr rBIX 17182 17183/* ------------------------------ */ 17184 .balign 128 17185.L_ALT_OP_MUL_FLOAT_2ADDR: /* 0xc8 */ 17186/* File: mips/alt_stub.S */ 17187/* 17188 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17189 * any interesting requests and then jump to the real instruction 17190 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17191 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17192 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17193 * bail to the real handler if breakFlags==0. 17194 */ 17195 lbu a3, offThread_breakFlags(rSELF) 17196 la rBIX, dvmAsmInstructionStart + (200 * 128) 17197 lw rIBASE, offThread_curHandlerTable(rSELF) 17198 bnez a3, 1f 17199 jr rBIX # nothing to do - jump to real handler 172001: 17201 EXPORT_PC() 17202 move a0, rPC # arg0 17203 move a1, rFP # arg1 17204 move a2, rSELF # arg2 17205 JAL(dvmCheckBefore) 17206 jr rBIX 17207 17208/* ------------------------------ */ 17209 .balign 128 17210.L_ALT_OP_DIV_FLOAT_2ADDR: /* 0xc9 */ 17211/* File: mips/alt_stub.S */ 17212/* 17213 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17214 * any interesting requests and then jump to the real instruction 17215 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17216 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17217 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17218 * bail to the real handler if breakFlags==0. 17219 */ 17220 lbu a3, offThread_breakFlags(rSELF) 17221 la rBIX, dvmAsmInstructionStart + (201 * 128) 17222 lw rIBASE, offThread_curHandlerTable(rSELF) 17223 bnez a3, 1f 17224 jr rBIX # nothing to do - jump to real handler 172251: 17226 EXPORT_PC() 17227 move a0, rPC # arg0 17228 move a1, rFP # arg1 17229 move a2, rSELF # arg2 17230 JAL(dvmCheckBefore) 17231 jr rBIX 17232 17233/* ------------------------------ */ 17234 .balign 128 17235.L_ALT_OP_REM_FLOAT_2ADDR: /* 0xca */ 17236/* File: mips/alt_stub.S */ 17237/* 17238 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17239 * any interesting requests and then jump to the real instruction 17240 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17241 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17242 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17243 * bail to the real handler if breakFlags==0. 17244 */ 17245 lbu a3, offThread_breakFlags(rSELF) 17246 la rBIX, dvmAsmInstructionStart + (202 * 128) 17247 lw rIBASE, offThread_curHandlerTable(rSELF) 17248 bnez a3, 1f 17249 jr rBIX # nothing to do - jump to real handler 172501: 17251 EXPORT_PC() 17252 move a0, rPC # arg0 17253 move a1, rFP # arg1 17254 move a2, rSELF # arg2 17255 JAL(dvmCheckBefore) 17256 jr rBIX 17257 17258/* ------------------------------ */ 17259 .balign 128 17260.L_ALT_OP_ADD_DOUBLE_2ADDR: /* 0xcb */ 17261/* File: mips/alt_stub.S */ 17262/* 17263 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17264 * any interesting requests and then jump to the real instruction 17265 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17266 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17267 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17268 * bail to the real handler if breakFlags==0. 17269 */ 17270 lbu a3, offThread_breakFlags(rSELF) 17271 la rBIX, dvmAsmInstructionStart + (203 * 128) 17272 lw rIBASE, offThread_curHandlerTable(rSELF) 17273 bnez a3, 1f 17274 jr rBIX # nothing to do - jump to real handler 172751: 17276 EXPORT_PC() 17277 move a0, rPC # arg0 17278 move a1, rFP # arg1 17279 move a2, rSELF # arg2 17280 JAL(dvmCheckBefore) 17281 jr rBIX 17282 17283/* ------------------------------ */ 17284 .balign 128 17285.L_ALT_OP_SUB_DOUBLE_2ADDR: /* 0xcc */ 17286/* File: mips/alt_stub.S */ 17287/* 17288 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17289 * any interesting requests and then jump to the real instruction 17290 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17291 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17292 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17293 * bail to the real handler if breakFlags==0. 17294 */ 17295 lbu a3, offThread_breakFlags(rSELF) 17296 la rBIX, dvmAsmInstructionStart + (204 * 128) 17297 lw rIBASE, offThread_curHandlerTable(rSELF) 17298 bnez a3, 1f 17299 jr rBIX # nothing to do - jump to real handler 173001: 17301 EXPORT_PC() 17302 move a0, rPC # arg0 17303 move a1, rFP # arg1 17304 move a2, rSELF # arg2 17305 JAL(dvmCheckBefore) 17306 jr rBIX 17307 17308/* ------------------------------ */ 17309 .balign 128 17310.L_ALT_OP_MUL_DOUBLE_2ADDR: /* 0xcd */ 17311/* File: mips/alt_stub.S */ 17312/* 17313 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17314 * any interesting requests and then jump to the real instruction 17315 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17316 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17317 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17318 * bail to the real handler if breakFlags==0. 17319 */ 17320 lbu a3, offThread_breakFlags(rSELF) 17321 la rBIX, dvmAsmInstructionStart + (205 * 128) 17322 lw rIBASE, offThread_curHandlerTable(rSELF) 17323 bnez a3, 1f 17324 jr rBIX # nothing to do - jump to real handler 173251: 17326 EXPORT_PC() 17327 move a0, rPC # arg0 17328 move a1, rFP # arg1 17329 move a2, rSELF # arg2 17330 JAL(dvmCheckBefore) 17331 jr rBIX 17332 17333/* ------------------------------ */ 17334 .balign 128 17335.L_ALT_OP_DIV_DOUBLE_2ADDR: /* 0xce */ 17336/* File: mips/alt_stub.S */ 17337/* 17338 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17339 * any interesting requests and then jump to the real instruction 17340 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17341 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17342 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17343 * bail to the real handler if breakFlags==0. 17344 */ 17345 lbu a3, offThread_breakFlags(rSELF) 17346 la rBIX, dvmAsmInstructionStart + (206 * 128) 17347 lw rIBASE, offThread_curHandlerTable(rSELF) 17348 bnez a3, 1f 17349 jr rBIX # nothing to do - jump to real handler 173501: 17351 EXPORT_PC() 17352 move a0, rPC # arg0 17353 move a1, rFP # arg1 17354 move a2, rSELF # arg2 17355 JAL(dvmCheckBefore) 17356 jr rBIX 17357 17358/* ------------------------------ */ 17359 .balign 128 17360.L_ALT_OP_REM_DOUBLE_2ADDR: /* 0xcf */ 17361/* File: mips/alt_stub.S */ 17362/* 17363 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17364 * any interesting requests and then jump to the real instruction 17365 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17366 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17367 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17368 * bail to the real handler if breakFlags==0. 17369 */ 17370 lbu a3, offThread_breakFlags(rSELF) 17371 la rBIX, dvmAsmInstructionStart + (207 * 128) 17372 lw rIBASE, offThread_curHandlerTable(rSELF) 17373 bnez a3, 1f 17374 jr rBIX # nothing to do - jump to real handler 173751: 17376 EXPORT_PC() 17377 move a0, rPC # arg0 17378 move a1, rFP # arg1 17379 move a2, rSELF # arg2 17380 JAL(dvmCheckBefore) 17381 jr rBIX 17382 17383/* ------------------------------ */ 17384 .balign 128 17385.L_ALT_OP_ADD_INT_LIT16: /* 0xd0 */ 17386/* File: mips/alt_stub.S */ 17387/* 17388 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17389 * any interesting requests and then jump to the real instruction 17390 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17391 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17392 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17393 * bail to the real handler if breakFlags==0. 17394 */ 17395 lbu a3, offThread_breakFlags(rSELF) 17396 la rBIX, dvmAsmInstructionStart + (208 * 128) 17397 lw rIBASE, offThread_curHandlerTable(rSELF) 17398 bnez a3, 1f 17399 jr rBIX # nothing to do - jump to real handler 174001: 17401 EXPORT_PC() 17402 move a0, rPC # arg0 17403 move a1, rFP # arg1 17404 move a2, rSELF # arg2 17405 JAL(dvmCheckBefore) 17406 jr rBIX 17407 17408/* ------------------------------ */ 17409 .balign 128 17410.L_ALT_OP_RSUB_INT: /* 0xd1 */ 17411/* File: mips/alt_stub.S */ 17412/* 17413 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17414 * any interesting requests and then jump to the real instruction 17415 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17416 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17417 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17418 * bail to the real handler if breakFlags==0. 17419 */ 17420 lbu a3, offThread_breakFlags(rSELF) 17421 la rBIX, dvmAsmInstructionStart + (209 * 128) 17422 lw rIBASE, offThread_curHandlerTable(rSELF) 17423 bnez a3, 1f 17424 jr rBIX # nothing to do - jump to real handler 174251: 17426 EXPORT_PC() 17427 move a0, rPC # arg0 17428 move a1, rFP # arg1 17429 move a2, rSELF # arg2 17430 JAL(dvmCheckBefore) 17431 jr rBIX 17432 17433/* ------------------------------ */ 17434 .balign 128 17435.L_ALT_OP_MUL_INT_LIT16: /* 0xd2 */ 17436/* File: mips/alt_stub.S */ 17437/* 17438 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17439 * any interesting requests and then jump to the real instruction 17440 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17441 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17442 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17443 * bail to the real handler if breakFlags==0. 17444 */ 17445 lbu a3, offThread_breakFlags(rSELF) 17446 la rBIX, dvmAsmInstructionStart + (210 * 128) 17447 lw rIBASE, offThread_curHandlerTable(rSELF) 17448 bnez a3, 1f 17449 jr rBIX # nothing to do - jump to real handler 174501: 17451 EXPORT_PC() 17452 move a0, rPC # arg0 17453 move a1, rFP # arg1 17454 move a2, rSELF # arg2 17455 JAL(dvmCheckBefore) 17456 jr rBIX 17457 17458/* ------------------------------ */ 17459 .balign 128 17460.L_ALT_OP_DIV_INT_LIT16: /* 0xd3 */ 17461/* File: mips/alt_stub.S */ 17462/* 17463 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17464 * any interesting requests and then jump to the real instruction 17465 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17466 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17467 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17468 * bail to the real handler if breakFlags==0. 17469 */ 17470 lbu a3, offThread_breakFlags(rSELF) 17471 la rBIX, dvmAsmInstructionStart + (211 * 128) 17472 lw rIBASE, offThread_curHandlerTable(rSELF) 17473 bnez a3, 1f 17474 jr rBIX # nothing to do - jump to real handler 174751: 17476 EXPORT_PC() 17477 move a0, rPC # arg0 17478 move a1, rFP # arg1 17479 move a2, rSELF # arg2 17480 JAL(dvmCheckBefore) 17481 jr rBIX 17482 17483/* ------------------------------ */ 17484 .balign 128 17485.L_ALT_OP_REM_INT_LIT16: /* 0xd4 */ 17486/* File: mips/alt_stub.S */ 17487/* 17488 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17489 * any interesting requests and then jump to the real instruction 17490 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17491 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17492 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17493 * bail to the real handler if breakFlags==0. 17494 */ 17495 lbu a3, offThread_breakFlags(rSELF) 17496 la rBIX, dvmAsmInstructionStart + (212 * 128) 17497 lw rIBASE, offThread_curHandlerTable(rSELF) 17498 bnez a3, 1f 17499 jr rBIX # nothing to do - jump to real handler 175001: 17501 EXPORT_PC() 17502 move a0, rPC # arg0 17503 move a1, rFP # arg1 17504 move a2, rSELF # arg2 17505 JAL(dvmCheckBefore) 17506 jr rBIX 17507 17508/* ------------------------------ */ 17509 .balign 128 17510.L_ALT_OP_AND_INT_LIT16: /* 0xd5 */ 17511/* File: mips/alt_stub.S */ 17512/* 17513 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17514 * any interesting requests and then jump to the real instruction 17515 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17516 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17517 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17518 * bail to the real handler if breakFlags==0. 17519 */ 17520 lbu a3, offThread_breakFlags(rSELF) 17521 la rBIX, dvmAsmInstructionStart + (213 * 128) 17522 lw rIBASE, offThread_curHandlerTable(rSELF) 17523 bnez a3, 1f 17524 jr rBIX # nothing to do - jump to real handler 175251: 17526 EXPORT_PC() 17527 move a0, rPC # arg0 17528 move a1, rFP # arg1 17529 move a2, rSELF # arg2 17530 JAL(dvmCheckBefore) 17531 jr rBIX 17532 17533/* ------------------------------ */ 17534 .balign 128 17535.L_ALT_OP_OR_INT_LIT16: /* 0xd6 */ 17536/* File: mips/alt_stub.S */ 17537/* 17538 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17539 * any interesting requests and then jump to the real instruction 17540 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17541 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17542 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17543 * bail to the real handler if breakFlags==0. 17544 */ 17545 lbu a3, offThread_breakFlags(rSELF) 17546 la rBIX, dvmAsmInstructionStart + (214 * 128) 17547 lw rIBASE, offThread_curHandlerTable(rSELF) 17548 bnez a3, 1f 17549 jr rBIX # nothing to do - jump to real handler 175501: 17551 EXPORT_PC() 17552 move a0, rPC # arg0 17553 move a1, rFP # arg1 17554 move a2, rSELF # arg2 17555 JAL(dvmCheckBefore) 17556 jr rBIX 17557 17558/* ------------------------------ */ 17559 .balign 128 17560.L_ALT_OP_XOR_INT_LIT16: /* 0xd7 */ 17561/* File: mips/alt_stub.S */ 17562/* 17563 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17564 * any interesting requests and then jump to the real instruction 17565 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17566 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17567 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17568 * bail to the real handler if breakFlags==0. 17569 */ 17570 lbu a3, offThread_breakFlags(rSELF) 17571 la rBIX, dvmAsmInstructionStart + (215 * 128) 17572 lw rIBASE, offThread_curHandlerTable(rSELF) 17573 bnez a3, 1f 17574 jr rBIX # nothing to do - jump to real handler 175751: 17576 EXPORT_PC() 17577 move a0, rPC # arg0 17578 move a1, rFP # arg1 17579 move a2, rSELF # arg2 17580 JAL(dvmCheckBefore) 17581 jr rBIX 17582 17583/* ------------------------------ */ 17584 .balign 128 17585.L_ALT_OP_ADD_INT_LIT8: /* 0xd8 */ 17586/* File: mips/alt_stub.S */ 17587/* 17588 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17589 * any interesting requests and then jump to the real instruction 17590 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17591 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17592 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17593 * bail to the real handler if breakFlags==0. 17594 */ 17595 lbu a3, offThread_breakFlags(rSELF) 17596 la rBIX, dvmAsmInstructionStart + (216 * 128) 17597 lw rIBASE, offThread_curHandlerTable(rSELF) 17598 bnez a3, 1f 17599 jr rBIX # nothing to do - jump to real handler 176001: 17601 EXPORT_PC() 17602 move a0, rPC # arg0 17603 move a1, rFP # arg1 17604 move a2, rSELF # arg2 17605 JAL(dvmCheckBefore) 17606 jr rBIX 17607 17608/* ------------------------------ */ 17609 .balign 128 17610.L_ALT_OP_RSUB_INT_LIT8: /* 0xd9 */ 17611/* File: mips/alt_stub.S */ 17612/* 17613 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17614 * any interesting requests and then jump to the real instruction 17615 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17616 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17617 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17618 * bail to the real handler if breakFlags==0. 17619 */ 17620 lbu a3, offThread_breakFlags(rSELF) 17621 la rBIX, dvmAsmInstructionStart + (217 * 128) 17622 lw rIBASE, offThread_curHandlerTable(rSELF) 17623 bnez a3, 1f 17624 jr rBIX # nothing to do - jump to real handler 176251: 17626 EXPORT_PC() 17627 move a0, rPC # arg0 17628 move a1, rFP # arg1 17629 move a2, rSELF # arg2 17630 JAL(dvmCheckBefore) 17631 jr rBIX 17632 17633/* ------------------------------ */ 17634 .balign 128 17635.L_ALT_OP_MUL_INT_LIT8: /* 0xda */ 17636/* File: mips/alt_stub.S */ 17637/* 17638 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17639 * any interesting requests and then jump to the real instruction 17640 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17641 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17642 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17643 * bail to the real handler if breakFlags==0. 17644 */ 17645 lbu a3, offThread_breakFlags(rSELF) 17646 la rBIX, dvmAsmInstructionStart + (218 * 128) 17647 lw rIBASE, offThread_curHandlerTable(rSELF) 17648 bnez a3, 1f 17649 jr rBIX # nothing to do - jump to real handler 176501: 17651 EXPORT_PC() 17652 move a0, rPC # arg0 17653 move a1, rFP # arg1 17654 move a2, rSELF # arg2 17655 JAL(dvmCheckBefore) 17656 jr rBIX 17657 17658/* ------------------------------ */ 17659 .balign 128 17660.L_ALT_OP_DIV_INT_LIT8: /* 0xdb */ 17661/* File: mips/alt_stub.S */ 17662/* 17663 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17664 * any interesting requests and then jump to the real instruction 17665 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17666 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17667 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17668 * bail to the real handler if breakFlags==0. 17669 */ 17670 lbu a3, offThread_breakFlags(rSELF) 17671 la rBIX, dvmAsmInstructionStart + (219 * 128) 17672 lw rIBASE, offThread_curHandlerTable(rSELF) 17673 bnez a3, 1f 17674 jr rBIX # nothing to do - jump to real handler 176751: 17676 EXPORT_PC() 17677 move a0, rPC # arg0 17678 move a1, rFP # arg1 17679 move a2, rSELF # arg2 17680 JAL(dvmCheckBefore) 17681 jr rBIX 17682 17683/* ------------------------------ */ 17684 .balign 128 17685.L_ALT_OP_REM_INT_LIT8: /* 0xdc */ 17686/* File: mips/alt_stub.S */ 17687/* 17688 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17689 * any interesting requests and then jump to the real instruction 17690 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17691 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17692 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17693 * bail to the real handler if breakFlags==0. 17694 */ 17695 lbu a3, offThread_breakFlags(rSELF) 17696 la rBIX, dvmAsmInstructionStart + (220 * 128) 17697 lw rIBASE, offThread_curHandlerTable(rSELF) 17698 bnez a3, 1f 17699 jr rBIX # nothing to do - jump to real handler 177001: 17701 EXPORT_PC() 17702 move a0, rPC # arg0 17703 move a1, rFP # arg1 17704 move a2, rSELF # arg2 17705 JAL(dvmCheckBefore) 17706 jr rBIX 17707 17708/* ------------------------------ */ 17709 .balign 128 17710.L_ALT_OP_AND_INT_LIT8: /* 0xdd */ 17711/* File: mips/alt_stub.S */ 17712/* 17713 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17714 * any interesting requests and then jump to the real instruction 17715 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17716 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17717 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17718 * bail to the real handler if breakFlags==0. 17719 */ 17720 lbu a3, offThread_breakFlags(rSELF) 17721 la rBIX, dvmAsmInstructionStart + (221 * 128) 17722 lw rIBASE, offThread_curHandlerTable(rSELF) 17723 bnez a3, 1f 17724 jr rBIX # nothing to do - jump to real handler 177251: 17726 EXPORT_PC() 17727 move a0, rPC # arg0 17728 move a1, rFP # arg1 17729 move a2, rSELF # arg2 17730 JAL(dvmCheckBefore) 17731 jr rBIX 17732 17733/* ------------------------------ */ 17734 .balign 128 17735.L_ALT_OP_OR_INT_LIT8: /* 0xde */ 17736/* File: mips/alt_stub.S */ 17737/* 17738 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17739 * any interesting requests and then jump to the real instruction 17740 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17741 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17742 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17743 * bail to the real handler if breakFlags==0. 17744 */ 17745 lbu a3, offThread_breakFlags(rSELF) 17746 la rBIX, dvmAsmInstructionStart + (222 * 128) 17747 lw rIBASE, offThread_curHandlerTable(rSELF) 17748 bnez a3, 1f 17749 jr rBIX # nothing to do - jump to real handler 177501: 17751 EXPORT_PC() 17752 move a0, rPC # arg0 17753 move a1, rFP # arg1 17754 move a2, rSELF # arg2 17755 JAL(dvmCheckBefore) 17756 jr rBIX 17757 17758/* ------------------------------ */ 17759 .balign 128 17760.L_ALT_OP_XOR_INT_LIT8: /* 0xdf */ 17761/* File: mips/alt_stub.S */ 17762/* 17763 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17764 * any interesting requests and then jump to the real instruction 17765 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17766 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17767 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17768 * bail to the real handler if breakFlags==0. 17769 */ 17770 lbu a3, offThread_breakFlags(rSELF) 17771 la rBIX, dvmAsmInstructionStart + (223 * 128) 17772 lw rIBASE, offThread_curHandlerTable(rSELF) 17773 bnez a3, 1f 17774 jr rBIX # nothing to do - jump to real handler 177751: 17776 EXPORT_PC() 17777 move a0, rPC # arg0 17778 move a1, rFP # arg1 17779 move a2, rSELF # arg2 17780 JAL(dvmCheckBefore) 17781 jr rBIX 17782 17783/* ------------------------------ */ 17784 .balign 128 17785.L_ALT_OP_SHL_INT_LIT8: /* 0xe0 */ 17786/* File: mips/alt_stub.S */ 17787/* 17788 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17789 * any interesting requests and then jump to the real instruction 17790 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17791 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17792 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17793 * bail to the real handler if breakFlags==0. 17794 */ 17795 lbu a3, offThread_breakFlags(rSELF) 17796 la rBIX, dvmAsmInstructionStart + (224 * 128) 17797 lw rIBASE, offThread_curHandlerTable(rSELF) 17798 bnez a3, 1f 17799 jr rBIX # nothing to do - jump to real handler 178001: 17801 EXPORT_PC() 17802 move a0, rPC # arg0 17803 move a1, rFP # arg1 17804 move a2, rSELF # arg2 17805 JAL(dvmCheckBefore) 17806 jr rBIX 17807 17808/* ------------------------------ */ 17809 .balign 128 17810.L_ALT_OP_SHR_INT_LIT8: /* 0xe1 */ 17811/* File: mips/alt_stub.S */ 17812/* 17813 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17814 * any interesting requests and then jump to the real instruction 17815 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17816 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17817 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17818 * bail to the real handler if breakFlags==0. 17819 */ 17820 lbu a3, offThread_breakFlags(rSELF) 17821 la rBIX, dvmAsmInstructionStart + (225 * 128) 17822 lw rIBASE, offThread_curHandlerTable(rSELF) 17823 bnez a3, 1f 17824 jr rBIX # nothing to do - jump to real handler 178251: 17826 EXPORT_PC() 17827 move a0, rPC # arg0 17828 move a1, rFP # arg1 17829 move a2, rSELF # arg2 17830 JAL(dvmCheckBefore) 17831 jr rBIX 17832 17833/* ------------------------------ */ 17834 .balign 128 17835.L_ALT_OP_USHR_INT_LIT8: /* 0xe2 */ 17836/* File: mips/alt_stub.S */ 17837/* 17838 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17839 * any interesting requests and then jump to the real instruction 17840 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17841 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17842 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17843 * bail to the real handler if breakFlags==0. 17844 */ 17845 lbu a3, offThread_breakFlags(rSELF) 17846 la rBIX, dvmAsmInstructionStart + (226 * 128) 17847 lw rIBASE, offThread_curHandlerTable(rSELF) 17848 bnez a3, 1f 17849 jr rBIX # nothing to do - jump to real handler 178501: 17851 EXPORT_PC() 17852 move a0, rPC # arg0 17853 move a1, rFP # arg1 17854 move a2, rSELF # arg2 17855 JAL(dvmCheckBefore) 17856 jr rBIX 17857 17858/* ------------------------------ */ 17859 .balign 128 17860.L_ALT_OP_IGET_VOLATILE: /* 0xe3 */ 17861/* File: mips/alt_stub.S */ 17862/* 17863 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17864 * any interesting requests and then jump to the real instruction 17865 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17866 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17867 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17868 * bail to the real handler if breakFlags==0. 17869 */ 17870 lbu a3, offThread_breakFlags(rSELF) 17871 la rBIX, dvmAsmInstructionStart + (227 * 128) 17872 lw rIBASE, offThread_curHandlerTable(rSELF) 17873 bnez a3, 1f 17874 jr rBIX # nothing to do - jump to real handler 178751: 17876 EXPORT_PC() 17877 move a0, rPC # arg0 17878 move a1, rFP # arg1 17879 move a2, rSELF # arg2 17880 JAL(dvmCheckBefore) 17881 jr rBIX 17882 17883/* ------------------------------ */ 17884 .balign 128 17885.L_ALT_OP_IPUT_VOLATILE: /* 0xe4 */ 17886/* File: mips/alt_stub.S */ 17887/* 17888 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17889 * any interesting requests and then jump to the real instruction 17890 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17891 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17892 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17893 * bail to the real handler if breakFlags==0. 17894 */ 17895 lbu a3, offThread_breakFlags(rSELF) 17896 la rBIX, dvmAsmInstructionStart + (228 * 128) 17897 lw rIBASE, offThread_curHandlerTable(rSELF) 17898 bnez a3, 1f 17899 jr rBIX # nothing to do - jump to real handler 179001: 17901 EXPORT_PC() 17902 move a0, rPC # arg0 17903 move a1, rFP # arg1 17904 move a2, rSELF # arg2 17905 JAL(dvmCheckBefore) 17906 jr rBIX 17907 17908/* ------------------------------ */ 17909 .balign 128 17910.L_ALT_OP_SGET_VOLATILE: /* 0xe5 */ 17911/* File: mips/alt_stub.S */ 17912/* 17913 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17914 * any interesting requests and then jump to the real instruction 17915 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17916 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17917 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17918 * bail to the real handler if breakFlags==0. 17919 */ 17920 lbu a3, offThread_breakFlags(rSELF) 17921 la rBIX, dvmAsmInstructionStart + (229 * 128) 17922 lw rIBASE, offThread_curHandlerTable(rSELF) 17923 bnez a3, 1f 17924 jr rBIX # nothing to do - jump to real handler 179251: 17926 EXPORT_PC() 17927 move a0, rPC # arg0 17928 move a1, rFP # arg1 17929 move a2, rSELF # arg2 17930 JAL(dvmCheckBefore) 17931 jr rBIX 17932 17933/* ------------------------------ */ 17934 .balign 128 17935.L_ALT_OP_SPUT_VOLATILE: /* 0xe6 */ 17936/* File: mips/alt_stub.S */ 17937/* 17938 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17939 * any interesting requests and then jump to the real instruction 17940 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17941 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17942 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17943 * bail to the real handler if breakFlags==0. 17944 */ 17945 lbu a3, offThread_breakFlags(rSELF) 17946 la rBIX, dvmAsmInstructionStart + (230 * 128) 17947 lw rIBASE, offThread_curHandlerTable(rSELF) 17948 bnez a3, 1f 17949 jr rBIX # nothing to do - jump to real handler 179501: 17951 EXPORT_PC() 17952 move a0, rPC # arg0 17953 move a1, rFP # arg1 17954 move a2, rSELF # arg2 17955 JAL(dvmCheckBefore) 17956 jr rBIX 17957 17958/* ------------------------------ */ 17959 .balign 128 17960.L_ALT_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */ 17961/* File: mips/alt_stub.S */ 17962/* 17963 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17964 * any interesting requests and then jump to the real instruction 17965 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17966 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17967 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17968 * bail to the real handler if breakFlags==0. 17969 */ 17970 lbu a3, offThread_breakFlags(rSELF) 17971 la rBIX, dvmAsmInstructionStart + (231 * 128) 17972 lw rIBASE, offThread_curHandlerTable(rSELF) 17973 bnez a3, 1f 17974 jr rBIX # nothing to do - jump to real handler 179751: 17976 EXPORT_PC() 17977 move a0, rPC # arg0 17978 move a1, rFP # arg1 17979 move a2, rSELF # arg2 17980 JAL(dvmCheckBefore) 17981 jr rBIX 17982 17983/* ------------------------------ */ 17984 .balign 128 17985.L_ALT_OP_IGET_WIDE_VOLATILE: /* 0xe8 */ 17986/* File: mips/alt_stub.S */ 17987/* 17988 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 17989 * any interesting requests and then jump to the real instruction 17990 * handler. Note that the call to dvmCheckBefore is done as a tail call. 17991 * rIBASE updates won't be seen until a refresh, and we can tell we have a 17992 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 17993 * bail to the real handler if breakFlags==0. 17994 */ 17995 lbu a3, offThread_breakFlags(rSELF) 17996 la rBIX, dvmAsmInstructionStart + (232 * 128) 17997 lw rIBASE, offThread_curHandlerTable(rSELF) 17998 bnez a3, 1f 17999 jr rBIX # nothing to do - jump to real handler 180001: 18001 EXPORT_PC() 18002 move a0, rPC # arg0 18003 move a1, rFP # arg1 18004 move a2, rSELF # arg2 18005 JAL(dvmCheckBefore) 18006 jr rBIX 18007 18008/* ------------------------------ */ 18009 .balign 128 18010.L_ALT_OP_IPUT_WIDE_VOLATILE: /* 0xe9 */ 18011/* File: mips/alt_stub.S */ 18012/* 18013 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18014 * any interesting requests and then jump to the real instruction 18015 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18016 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18017 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18018 * bail to the real handler if breakFlags==0. 18019 */ 18020 lbu a3, offThread_breakFlags(rSELF) 18021 la rBIX, dvmAsmInstructionStart + (233 * 128) 18022 lw rIBASE, offThread_curHandlerTable(rSELF) 18023 bnez a3, 1f 18024 jr rBIX # nothing to do - jump to real handler 180251: 18026 EXPORT_PC() 18027 move a0, rPC # arg0 18028 move a1, rFP # arg1 18029 move a2, rSELF # arg2 18030 JAL(dvmCheckBefore) 18031 jr rBIX 18032 18033/* ------------------------------ */ 18034 .balign 128 18035.L_ALT_OP_SGET_WIDE_VOLATILE: /* 0xea */ 18036/* File: mips/alt_stub.S */ 18037/* 18038 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18039 * any interesting requests and then jump to the real instruction 18040 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18041 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18042 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18043 * bail to the real handler if breakFlags==0. 18044 */ 18045 lbu a3, offThread_breakFlags(rSELF) 18046 la rBIX, dvmAsmInstructionStart + (234 * 128) 18047 lw rIBASE, offThread_curHandlerTable(rSELF) 18048 bnez a3, 1f 18049 jr rBIX # nothing to do - jump to real handler 180501: 18051 EXPORT_PC() 18052 move a0, rPC # arg0 18053 move a1, rFP # arg1 18054 move a2, rSELF # arg2 18055 JAL(dvmCheckBefore) 18056 jr rBIX 18057 18058/* ------------------------------ */ 18059 .balign 128 18060.L_ALT_OP_SPUT_WIDE_VOLATILE: /* 0xeb */ 18061/* File: mips/alt_stub.S */ 18062/* 18063 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18064 * any interesting requests and then jump to the real instruction 18065 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18066 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18067 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18068 * bail to the real handler if breakFlags==0. 18069 */ 18070 lbu a3, offThread_breakFlags(rSELF) 18071 la rBIX, dvmAsmInstructionStart + (235 * 128) 18072 lw rIBASE, offThread_curHandlerTable(rSELF) 18073 bnez a3, 1f 18074 jr rBIX # nothing to do - jump to real handler 180751: 18076 EXPORT_PC() 18077 move a0, rPC # arg0 18078 move a1, rFP # arg1 18079 move a2, rSELF # arg2 18080 JAL(dvmCheckBefore) 18081 jr rBIX 18082 18083/* ------------------------------ */ 18084 .balign 128 18085.L_ALT_OP_BREAKPOINT: /* 0xec */ 18086/* File: mips/alt_stub.S */ 18087/* 18088 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18089 * any interesting requests and then jump to the real instruction 18090 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18091 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18092 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18093 * bail to the real handler if breakFlags==0. 18094 */ 18095 lbu a3, offThread_breakFlags(rSELF) 18096 la rBIX, dvmAsmInstructionStart + (236 * 128) 18097 lw rIBASE, offThread_curHandlerTable(rSELF) 18098 bnez a3, 1f 18099 jr rBIX # nothing to do - jump to real handler 181001: 18101 EXPORT_PC() 18102 move a0, rPC # arg0 18103 move a1, rFP # arg1 18104 move a2, rSELF # arg2 18105 JAL(dvmCheckBefore) 18106 jr rBIX 18107 18108/* ------------------------------ */ 18109 .balign 128 18110.L_ALT_OP_THROW_VERIFICATION_ERROR: /* 0xed */ 18111/* File: mips/alt_stub.S */ 18112/* 18113 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18114 * any interesting requests and then jump to the real instruction 18115 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18116 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18117 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18118 * bail to the real handler if breakFlags==0. 18119 */ 18120 lbu a3, offThread_breakFlags(rSELF) 18121 la rBIX, dvmAsmInstructionStart + (237 * 128) 18122 lw rIBASE, offThread_curHandlerTable(rSELF) 18123 bnez a3, 1f 18124 jr rBIX # nothing to do - jump to real handler 181251: 18126 EXPORT_PC() 18127 move a0, rPC # arg0 18128 move a1, rFP # arg1 18129 move a2, rSELF # arg2 18130 JAL(dvmCheckBefore) 18131 jr rBIX 18132 18133/* ------------------------------ */ 18134 .balign 128 18135.L_ALT_OP_EXECUTE_INLINE: /* 0xee */ 18136/* File: mips/alt_stub.S */ 18137/* 18138 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18139 * any interesting requests and then jump to the real instruction 18140 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18141 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18142 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18143 * bail to the real handler if breakFlags==0. 18144 */ 18145 lbu a3, offThread_breakFlags(rSELF) 18146 la rBIX, dvmAsmInstructionStart + (238 * 128) 18147 lw rIBASE, offThread_curHandlerTable(rSELF) 18148 bnez a3, 1f 18149 jr rBIX # nothing to do - jump to real handler 181501: 18151 EXPORT_PC() 18152 move a0, rPC # arg0 18153 move a1, rFP # arg1 18154 move a2, rSELF # arg2 18155 JAL(dvmCheckBefore) 18156 jr rBIX 18157 18158/* ------------------------------ */ 18159 .balign 128 18160.L_ALT_OP_EXECUTE_INLINE_RANGE: /* 0xef */ 18161/* File: mips/alt_stub.S */ 18162/* 18163 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18164 * any interesting requests and then jump to the real instruction 18165 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18166 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18167 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18168 * bail to the real handler if breakFlags==0. 18169 */ 18170 lbu a3, offThread_breakFlags(rSELF) 18171 la rBIX, dvmAsmInstructionStart + (239 * 128) 18172 lw rIBASE, offThread_curHandlerTable(rSELF) 18173 bnez a3, 1f 18174 jr rBIX # nothing to do - jump to real handler 181751: 18176 EXPORT_PC() 18177 move a0, rPC # arg0 18178 move a1, rFP # arg1 18179 move a2, rSELF # arg2 18180 JAL(dvmCheckBefore) 18181 jr rBIX 18182 18183/* ------------------------------ */ 18184 .balign 128 18185.L_ALT_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */ 18186/* File: mips/alt_stub.S */ 18187/* 18188 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18189 * any interesting requests and then jump to the real instruction 18190 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18191 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18192 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18193 * bail to the real handler if breakFlags==0. 18194 */ 18195 lbu a3, offThread_breakFlags(rSELF) 18196 la rBIX, dvmAsmInstructionStart + (240 * 128) 18197 lw rIBASE, offThread_curHandlerTable(rSELF) 18198 bnez a3, 1f 18199 jr rBIX # nothing to do - jump to real handler 182001: 18201 EXPORT_PC() 18202 move a0, rPC # arg0 18203 move a1, rFP # arg1 18204 move a2, rSELF # arg2 18205 JAL(dvmCheckBefore) 18206 jr rBIX 18207 18208/* ------------------------------ */ 18209 .balign 128 18210.L_ALT_OP_RETURN_VOID_BARRIER: /* 0xf1 */ 18211/* File: mips/alt_stub.S */ 18212/* 18213 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18214 * any interesting requests and then jump to the real instruction 18215 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18216 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18217 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18218 * bail to the real handler if breakFlags==0. 18219 */ 18220 lbu a3, offThread_breakFlags(rSELF) 18221 la rBIX, dvmAsmInstructionStart + (241 * 128) 18222 lw rIBASE, offThread_curHandlerTable(rSELF) 18223 bnez a3, 1f 18224 jr rBIX # nothing to do - jump to real handler 182251: 18226 EXPORT_PC() 18227 move a0, rPC # arg0 18228 move a1, rFP # arg1 18229 move a2, rSELF # arg2 18230 JAL(dvmCheckBefore) 18231 jr rBIX 18232 18233/* ------------------------------ */ 18234 .balign 128 18235.L_ALT_OP_IGET_QUICK: /* 0xf2 */ 18236/* File: mips/alt_stub.S */ 18237/* 18238 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18239 * any interesting requests and then jump to the real instruction 18240 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18241 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18242 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18243 * bail to the real handler if breakFlags==0. 18244 */ 18245 lbu a3, offThread_breakFlags(rSELF) 18246 la rBIX, dvmAsmInstructionStart + (242 * 128) 18247 lw rIBASE, offThread_curHandlerTable(rSELF) 18248 bnez a3, 1f 18249 jr rBIX # nothing to do - jump to real handler 182501: 18251 EXPORT_PC() 18252 move a0, rPC # arg0 18253 move a1, rFP # arg1 18254 move a2, rSELF # arg2 18255 JAL(dvmCheckBefore) 18256 jr rBIX 18257 18258/* ------------------------------ */ 18259 .balign 128 18260.L_ALT_OP_IGET_WIDE_QUICK: /* 0xf3 */ 18261/* File: mips/alt_stub.S */ 18262/* 18263 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18264 * any interesting requests and then jump to the real instruction 18265 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18266 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18267 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18268 * bail to the real handler if breakFlags==0. 18269 */ 18270 lbu a3, offThread_breakFlags(rSELF) 18271 la rBIX, dvmAsmInstructionStart + (243 * 128) 18272 lw rIBASE, offThread_curHandlerTable(rSELF) 18273 bnez a3, 1f 18274 jr rBIX # nothing to do - jump to real handler 182751: 18276 EXPORT_PC() 18277 move a0, rPC # arg0 18278 move a1, rFP # arg1 18279 move a2, rSELF # arg2 18280 JAL(dvmCheckBefore) 18281 jr rBIX 18282 18283/* ------------------------------ */ 18284 .balign 128 18285.L_ALT_OP_IGET_OBJECT_QUICK: /* 0xf4 */ 18286/* File: mips/alt_stub.S */ 18287/* 18288 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18289 * any interesting requests and then jump to the real instruction 18290 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18291 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18292 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18293 * bail to the real handler if breakFlags==0. 18294 */ 18295 lbu a3, offThread_breakFlags(rSELF) 18296 la rBIX, dvmAsmInstructionStart + (244 * 128) 18297 lw rIBASE, offThread_curHandlerTable(rSELF) 18298 bnez a3, 1f 18299 jr rBIX # nothing to do - jump to real handler 183001: 18301 EXPORT_PC() 18302 move a0, rPC # arg0 18303 move a1, rFP # arg1 18304 move a2, rSELF # arg2 18305 JAL(dvmCheckBefore) 18306 jr rBIX 18307 18308/* ------------------------------ */ 18309 .balign 128 18310.L_ALT_OP_IPUT_QUICK: /* 0xf5 */ 18311/* File: mips/alt_stub.S */ 18312/* 18313 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18314 * any interesting requests and then jump to the real instruction 18315 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18316 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18317 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18318 * bail to the real handler if breakFlags==0. 18319 */ 18320 lbu a3, offThread_breakFlags(rSELF) 18321 la rBIX, dvmAsmInstructionStart + (245 * 128) 18322 lw rIBASE, offThread_curHandlerTable(rSELF) 18323 bnez a3, 1f 18324 jr rBIX # nothing to do - jump to real handler 183251: 18326 EXPORT_PC() 18327 move a0, rPC # arg0 18328 move a1, rFP # arg1 18329 move a2, rSELF # arg2 18330 JAL(dvmCheckBefore) 18331 jr rBIX 18332 18333/* ------------------------------ */ 18334 .balign 128 18335.L_ALT_OP_IPUT_WIDE_QUICK: /* 0xf6 */ 18336/* File: mips/alt_stub.S */ 18337/* 18338 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18339 * any interesting requests and then jump to the real instruction 18340 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18341 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18342 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18343 * bail to the real handler if breakFlags==0. 18344 */ 18345 lbu a3, offThread_breakFlags(rSELF) 18346 la rBIX, dvmAsmInstructionStart + (246 * 128) 18347 lw rIBASE, offThread_curHandlerTable(rSELF) 18348 bnez a3, 1f 18349 jr rBIX # nothing to do - jump to real handler 183501: 18351 EXPORT_PC() 18352 move a0, rPC # arg0 18353 move a1, rFP # arg1 18354 move a2, rSELF # arg2 18355 JAL(dvmCheckBefore) 18356 jr rBIX 18357 18358/* ------------------------------ */ 18359 .balign 128 18360.L_ALT_OP_IPUT_OBJECT_QUICK: /* 0xf7 */ 18361/* File: mips/alt_stub.S */ 18362/* 18363 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18364 * any interesting requests and then jump to the real instruction 18365 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18366 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18367 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18368 * bail to the real handler if breakFlags==0. 18369 */ 18370 lbu a3, offThread_breakFlags(rSELF) 18371 la rBIX, dvmAsmInstructionStart + (247 * 128) 18372 lw rIBASE, offThread_curHandlerTable(rSELF) 18373 bnez a3, 1f 18374 jr rBIX # nothing to do - jump to real handler 183751: 18376 EXPORT_PC() 18377 move a0, rPC # arg0 18378 move a1, rFP # arg1 18379 move a2, rSELF # arg2 18380 JAL(dvmCheckBefore) 18381 jr rBIX 18382 18383/* ------------------------------ */ 18384 .balign 128 18385.L_ALT_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */ 18386/* File: mips/alt_stub.S */ 18387/* 18388 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18389 * any interesting requests and then jump to the real instruction 18390 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18391 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18392 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18393 * bail to the real handler if breakFlags==0. 18394 */ 18395 lbu a3, offThread_breakFlags(rSELF) 18396 la rBIX, dvmAsmInstructionStart + (248 * 128) 18397 lw rIBASE, offThread_curHandlerTable(rSELF) 18398 bnez a3, 1f 18399 jr rBIX # nothing to do - jump to real handler 184001: 18401 EXPORT_PC() 18402 move a0, rPC # arg0 18403 move a1, rFP # arg1 18404 move a2, rSELF # arg2 18405 JAL(dvmCheckBefore) 18406 jr rBIX 18407 18408/* ------------------------------ */ 18409 .balign 128 18410.L_ALT_OP_INVOKE_VIRTUAL_QUICK_RANGE: /* 0xf9 */ 18411/* File: mips/alt_stub.S */ 18412/* 18413 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18414 * any interesting requests and then jump to the real instruction 18415 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18416 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18417 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18418 * bail to the real handler if breakFlags==0. 18419 */ 18420 lbu a3, offThread_breakFlags(rSELF) 18421 la rBIX, dvmAsmInstructionStart + (249 * 128) 18422 lw rIBASE, offThread_curHandlerTable(rSELF) 18423 bnez a3, 1f 18424 jr rBIX # nothing to do - jump to real handler 184251: 18426 EXPORT_PC() 18427 move a0, rPC # arg0 18428 move a1, rFP # arg1 18429 move a2, rSELF # arg2 18430 JAL(dvmCheckBefore) 18431 jr rBIX 18432 18433/* ------------------------------ */ 18434 .balign 128 18435.L_ALT_OP_INVOKE_SUPER_QUICK: /* 0xfa */ 18436/* File: mips/alt_stub.S */ 18437/* 18438 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18439 * any interesting requests and then jump to the real instruction 18440 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18441 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18442 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18443 * bail to the real handler if breakFlags==0. 18444 */ 18445 lbu a3, offThread_breakFlags(rSELF) 18446 la rBIX, dvmAsmInstructionStart + (250 * 128) 18447 lw rIBASE, offThread_curHandlerTable(rSELF) 18448 bnez a3, 1f 18449 jr rBIX # nothing to do - jump to real handler 184501: 18451 EXPORT_PC() 18452 move a0, rPC # arg0 18453 move a1, rFP # arg1 18454 move a2, rSELF # arg2 18455 JAL(dvmCheckBefore) 18456 jr rBIX 18457 18458/* ------------------------------ */ 18459 .balign 128 18460.L_ALT_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */ 18461/* File: mips/alt_stub.S */ 18462/* 18463 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18464 * any interesting requests and then jump to the real instruction 18465 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18466 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18467 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18468 * bail to the real handler if breakFlags==0. 18469 */ 18470 lbu a3, offThread_breakFlags(rSELF) 18471 la rBIX, dvmAsmInstructionStart + (251 * 128) 18472 lw rIBASE, offThread_curHandlerTable(rSELF) 18473 bnez a3, 1f 18474 jr rBIX # nothing to do - jump to real handler 184751: 18476 EXPORT_PC() 18477 move a0, rPC # arg0 18478 move a1, rFP # arg1 18479 move a2, rSELF # arg2 18480 JAL(dvmCheckBefore) 18481 jr rBIX 18482 18483/* ------------------------------ */ 18484 .balign 128 18485.L_ALT_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */ 18486/* File: mips/alt_stub.S */ 18487/* 18488 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18489 * any interesting requests and then jump to the real instruction 18490 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18491 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18492 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18493 * bail to the real handler if breakFlags==0. 18494 */ 18495 lbu a3, offThread_breakFlags(rSELF) 18496 la rBIX, dvmAsmInstructionStart + (252 * 128) 18497 lw rIBASE, offThread_curHandlerTable(rSELF) 18498 bnez a3, 1f 18499 jr rBIX # nothing to do - jump to real handler 185001: 18501 EXPORT_PC() 18502 move a0, rPC # arg0 18503 move a1, rFP # arg1 18504 move a2, rSELF # arg2 18505 JAL(dvmCheckBefore) 18506 jr rBIX 18507 18508/* ------------------------------ */ 18509 .balign 128 18510.L_ALT_OP_SGET_OBJECT_VOLATILE: /* 0xfd */ 18511/* File: mips/alt_stub.S */ 18512/* 18513 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18514 * any interesting requests and then jump to the real instruction 18515 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18516 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18517 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18518 * bail to the real handler if breakFlags==0. 18519 */ 18520 lbu a3, offThread_breakFlags(rSELF) 18521 la rBIX, dvmAsmInstructionStart + (253 * 128) 18522 lw rIBASE, offThread_curHandlerTable(rSELF) 18523 bnez a3, 1f 18524 jr rBIX # nothing to do - jump to real handler 185251: 18526 EXPORT_PC() 18527 move a0, rPC # arg0 18528 move a1, rFP # arg1 18529 move a2, rSELF # arg2 18530 JAL(dvmCheckBefore) 18531 jr rBIX 18532 18533/* ------------------------------ */ 18534 .balign 128 18535.L_ALT_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */ 18536/* File: mips/alt_stub.S */ 18537/* 18538 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18539 * any interesting requests and then jump to the real instruction 18540 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18541 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18542 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18543 * bail to the real handler if breakFlags==0. 18544 */ 18545 lbu a3, offThread_breakFlags(rSELF) 18546 la rBIX, dvmAsmInstructionStart + (254 * 128) 18547 lw rIBASE, offThread_curHandlerTable(rSELF) 18548 bnez a3, 1f 18549 jr rBIX # nothing to do - jump to real handler 185501: 18551 EXPORT_PC() 18552 move a0, rPC # arg0 18553 move a1, rFP # arg1 18554 move a2, rSELF # arg2 18555 JAL(dvmCheckBefore) 18556 jr rBIX 18557 18558/* ------------------------------ */ 18559 .balign 128 18560.L_ALT_OP_UNUSED_FF: /* 0xff */ 18561/* File: mips/alt_stub.S */ 18562/* 18563 * Inter-instruction transfer stub. Call out to dvmCheckBefore to handle 18564 * any interesting requests and then jump to the real instruction 18565 * handler. Note that the call to dvmCheckBefore is done as a tail call. 18566 * rIBASE updates won't be seen until a refresh, and we can tell we have a 18567 * stale rIBASE if breakFlags==0. Always refresh rIBASE here, and then 18568 * bail to the real handler if breakFlags==0. 18569 */ 18570 lbu a3, offThread_breakFlags(rSELF) 18571 la rBIX, dvmAsmInstructionStart + (255 * 128) 18572 lw rIBASE, offThread_curHandlerTable(rSELF) 18573 bnez a3, 1f 18574 jr rBIX # nothing to do - jump to real handler 185751: 18576 EXPORT_PC() 18577 move a0, rPC # arg0 18578 move a1, rFP # arg1 18579 move a2, rSELF # arg2 18580 JAL(dvmCheckBefore) 18581 jr rBIX 18582 18583 .balign 128 18584 .size dvmAsmAltInstructionStart, .-dvmAsmAltInstructionStart 18585 .global dvmAsmAltInstructionEnd 18586dvmAsmAltInstructionEnd: 18587