- /* generate NegativeArraySizeException stubs */
-
- xcodeptr = NULL;
-
- for (bref = cd->xcheckarefs; bref != NULL; bref = bref->next) {
- if ((cd->exceptiontablelength == 0) && (xcodeptr != NULL)) {
- gen_resolvebranch((u1 *) cd->mcodebase + bref->branchpos,
- bref->branchpos,
- (u1 *) xcodeptr - (u1 *) cd->mcodebase - 4);
- continue;
- }
-
- gen_resolvebranch((u1 *) cd->mcodebase + bref->branchpos,
- bref->branchpos,
- (u1 *) mcodeptr - cd->mcodebase);
-
- MCODECHECK(16);
-
- M_LDA(REG_ITMP2_XPC, REG_PV, bref->branchpos - 4);
-
- if (xcodeptr != NULL) {
- M_BR(xcodeptr - mcodeptr - 1);
-
- } else {
- xcodeptr = mcodeptr;
-
- M_MOV(REG_PV, rd->argintregs[0]);
- M_MOV(REG_SP, rd->argintregs[1]);
- M_ALD(rd->argintregs[2],
- REG_SP, parentargs_base * 8 - SIZEOF_VOID_P);
- M_MOV(REG_ITMP2_XPC, rd->argintregs[3]);
-
- M_LDA(REG_SP, REG_SP, -2 * 8);
- M_AST(REG_ITMP2_XPC, REG_SP, 0 * 8);
-
- disp = dseg_addaddress(cd, stacktrace_inline_negativearraysizeexception);
- M_ALD(REG_PV, REG_PV, disp);
- M_JSR(REG_RA, REG_PV);
- disp = (s4) ((u1 *) mcodeptr - cd->mcodebase);
- M_LDA(REG_PV, REG_RA, -disp);
-
- M_MOV(REG_RESULT, REG_ITMP1_XPTR);
-
- M_ALD(REG_ITMP2_XPC, REG_SP, 0 * 8);
- M_LDA(REG_SP, REG_SP, 2 * 8);
-
- disp = dseg_addaddress(cd, asm_handle_exception);
- M_ALD(REG_ITMP3, REG_PV, disp);
- M_JMP(REG_ZERO, REG_ITMP3);
- }
- }
-