X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=vm%2Fmterp%2Fout%2FInterpC-x86-atom.c;fp=vm%2Fmterp%2Fout%2FInterpC-x86-atom.c;h=53a8b2acc43fc152c0cdc582a19c6878f8be1163;hb=7895f56f3345597453b57ce68fd99d79357da25f;hp=587dcd50154bb89b5cd2dabaf7fe35bf679e84ab;hpb=a028d87fb310eae8cac821183aa91567ec8cb0f9;p=android-x86%2Fdalvik.git diff --git a/vm/mterp/out/InterpC-x86-atom.c b/vm/mterp/out/InterpC-x86-atom.c index 587dcd501..53a8b2acc 100644 --- a/vm/mterp/out/InterpC-x86-atom.c +++ b/vm/mterp/out/InterpC-x86-atom.c @@ -1242,6 +1242,82 @@ HANDLE_OPCODE(OP_RETURN_VOID_BARRIER /**/) GOTO_returnFromMethod(); OP_END +/* File: c/OP_BREAKPOINT.c */ +HANDLE_OPCODE(OP_BREAKPOINT) +#if (INTERP_TYPE == INTERP_DBG) + { + /* + * Restart this instruction with the original opcode. We do + * this by simply jumping to the handler. + * + * It's probably not necessary to update "inst", but we do it + * for the sake of anything that needs to do disambiguation in a + * common handler with INST_INST. + * + * The breakpoint itself is handled over in updateDebugger(), + * because we need to detect other events (method entry, single + * step) and report them in the same event packet, and we're not + * yet handling those through breakpoint instructions. By the + * time we get here, the breakpoint has already been handled and + * the thread resumed. + */ + u1 originalOpCode = dvmGetOriginalOpCode(pc); + LOGV("+++ break 0x%02x (0x%04x -> 0x%04x)\n", originalOpCode, inst, + INST_REPLACE_OP(inst, originalOpCode)); + inst = INST_REPLACE_OP(inst, originalOpCode); + FINISH_BKPT(originalOpCode); + } +#else + LOGE("Breakpoint hit in non-debug interpreter\n"); + dvmAbort(); +#endif +OP_END + +/* File: c/OP_EXECUTE_INLINE_RANGE.c */ +HANDLE_OPCODE(OP_EXECUTE_INLINE_RANGE /*{vCCCC..v(CCCC+AA-1)}, inline@BBBB*/) + { + u4 arg0, arg1, arg2, arg3; + arg0 = arg1 = arg2 = arg3 = 0; /* placate gcc */ + + EXPORT_PC(); + + vsrc1 = INST_AA(inst); /* #of args */ + ref = FETCH(1); /* inline call "ref" */ + vdst = FETCH(2); /* range base */ + ILOGV("|execute-inline-range args=%d @%d {regs=v%d-v%d}", + vsrc1, ref, vdst, vdst+vsrc1-1); + + assert((vdst >> 16) == 0); // 16-bit type -or- high 16 bits clear + assert(vsrc1 <= 4); + + switch (vsrc1) { + case 4: + arg3 = GET_REGISTER(vdst+3); + /* fall through */ + case 3: + arg2 = GET_REGISTER(vdst+2); + /* fall through */ + case 2: + arg1 = GET_REGISTER(vdst+1); + /* fall through */ + case 1: + arg0 = GET_REGISTER(vdst+0); + /* fall through */ + default: // case 0 + ; + } + +#if INTERP_TYPE == INTERP_DBG + if (!dvmPerformInlineOp4Dbg(arg0, arg1, arg2, arg3, &retval, ref)) + GOTO_exceptionThrown(); +#else + if (!dvmPerformInlineOp4Std(arg0, arg1, arg2, arg3, &retval, ref)) + GOTO_exceptionThrown(); +#endif + } + FINISH(3); +OP_END + /* File: c/OP_IPUT_OBJECT_VOLATILE.c */ HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE, "-object-volatile", ObjectVolatile, _AS_OBJECT) OP_END