exceptions, this is done by the stub itself. Stubs are called now.
* src/vm/jit/m68k/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/s390/codegen.c: Likewise.
* src/vm/jit/sparc64/codegen.c: Likewise.
--HG--
branch : michi
REPLACEMENT_POINT_FORGC_BUILTIN_RETURN(cd, iptr);
disp = (s4) (cd->mcodeptr - cd->mcodebase);
M_LDA(REG_PV, REG_RA, -disp);
-
- emit_exception_check(cd, iptr);
break;
case ICMD_INVOKESPECIAL:
/* arguments in place now */
switch(iptr->opc) {
- case ICMD_BUILTIN:
- disp = (ptrint) bte->fp;
+ case ICMD_BUILTIN:
+ if (bte->stub == NULL)
+ disp = (ptrint) bte->fp;
+ else
+ disp = (ptrint) bte->stub;
d = md->returntype.type;
M_JSR_IMM(disp);
REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
- emit_exception_check(cd, iptr);
break;
case ICMD_INVOKESPECIAL:
switch (iptr->opc) {
case ICMD_BUILTIN:
- disp = dseg_add_functionptr(cd, bte->fp);
+ if (bte->stub == NULL)
+ disp = dseg_add_functionptr(cd, bte->fp);
+ else
+ disp = dseg_add_functionptr(cd, bte->stub);
M_ALD(REG_ITMP3, REG_PV, disp); /* built-in-function pointer */
REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
disp = (s4) (cd->mcodeptr - cd->mcodebase);
M_LDA(REG_PV, REG_RA, -disp);
-
- emit_exception_check(cd, iptr);
break;
case ICMD_INVOKESPECIAL:
switch (iptr->opc) {
case ICMD_BUILTIN:
- disp = dseg_add_functionptr(cd, bte->fp);
- M_ALD(REG_PV, REG_PV, disp);
- M_ALD(REG_PV, REG_PV, 0); /* TOC */
+ if (bte->stub == NULL) {
+ disp = dseg_add_functionptr(cd, bte->fp);
+ M_ALD(REG_PV, REG_PV, disp);
+ M_ALD(REG_PV, REG_PV, 0); /* TOC */
+ }
+ else {
+ disp = dseg_add_functionptr(cd, bte->stub);
+ M_ALD(REG_PV, REG_PV, disp);
+ }
/* generate the actual call */
- REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
M_MTCTR(REG_PV);
M_JSR;
REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
disp = (s4) (cd->mcodeptr - cd->mcodebase);
M_MFLR(REG_ITMP1);
M_LDA(REG_PV, REG_ITMP1, -disp);
-
- emit_exception_check(cd, iptr);
break;
switch (iptr->opc) {
case ICMD_BUILTIN:
- disp = dseg_add_functionptr(cd, bte->fp);
+ if (bte->stub == NULL)
+ disp = dseg_add_functionptr(cd, bte->fp);
+ else
+ disp = dseg_add_functionptr(cd, bte->stub);
M_ASUB_IMM(96, REG_SP); /* register save area as required by C abi */
if (N_VALID_DSEG_DISP(disp)) {
switch (iptr->opc) {
case ICMD_BUILTIN:
M_AADD_IMM(96, REG_SP); /* remove C abi register save area */
- emit_exception_check(cd, iptr); /* check for exception */
break;
}
/* REG_RA holds the value of the jmp instruction, therefore +8 */
M_LDA(REG_ZERO, REG_RA_CALLER, -disp + 8);
- emit_exception_check(cd, iptr);
if (md->returntype.type == TYPE_FLT) {
/* special handling for float return value in %f0 */
M_FMOV_INTERN(0,1);