1f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectHANDLE_OPCODE(OP_EXECUTE_INLINE /*vB, {vD, vE, vF, vG}, inline@CCCC*/) 2f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project { 3f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project /* 4f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * This has the same form as other method calls, but we ignore 5f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * the 5th argument (vA). This is chiefly because the first four 6f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * arguments to a function on ARM are in registers. 7f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * 8f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * We only set the arguments that are actually used, leaving 9f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * the rest uninitialized. We're assuming that, if the method 10f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * needs them, they'll be specified in the call. 11f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * 127bbb9ceaeeb18e34341ad7cc488f8f81c9997f36Carl Shapiro * However, this annoys gcc when optimizations are enabled, 137bbb9ceaeeb18e34341ad7cc488f8f81c9997f36Carl Shapiro * causing a "may be used uninitialized" warning. Quieting 147bbb9ceaeeb18e34341ad7cc488f8f81c9997f36Carl Shapiro * the warnings incurs a slight penalty (5%: 373ns vs. 393ns 157bbb9ceaeeb18e34341ad7cc488f8f81c9997f36Carl Shapiro * on empty method). Note that valgrind is perfectly happy 167bbb9ceaeeb18e34341ad7cc488f8f81c9997f36Carl Shapiro * either way as the uninitialiezd values are never actually 177bbb9ceaeeb18e34341ad7cc488f8f81c9997f36Carl Shapiro * used. 18f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */ 19f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project u4 arg0, arg1, arg2, arg3; 207bbb9ceaeeb18e34341ad7cc488f8f81c9997f36Carl Shapiro arg0 = arg1 = arg2 = arg3 = 0; 21f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 22f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project EXPORT_PC(); 23f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 24f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project vsrc1 = INST_B(inst); /* #of args */ 25f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project ref = FETCH(1); /* inline call "ref" */ 26f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project vdst = FETCH(2); /* 0-4 register indices */ 27f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project ILOGV("|execute-inline args=%d @%d {regs=0x%04x}", 28f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project vsrc1, ref, vdst); 29f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 30f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project assert((vdst >> 16) == 0); // 16-bit type -or- high 16 bits clear 31f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project assert(vsrc1 <= 4); 32f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 33f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project switch (vsrc1) { 34f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project case 4: 35f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project arg3 = GET_REGISTER(vdst >> 12); 36f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project /* fall through */ 37f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project case 3: 38f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project arg2 = GET_REGISTER((vdst & 0x0f00) >> 8); 39f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project /* fall through */ 40f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project case 2: 41f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project arg1 = GET_REGISTER((vdst & 0x00f0) >> 4); 42f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project /* fall through */ 43f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project case 1: 44f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project arg0 = GET_REGISTER(vdst & 0x0f); 45f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project /* fall through */ 46f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project default: // case 0 47f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project ; 48f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project } 49f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 500c2dc522d0e120f346cf0a40c8cf0c93346131c2Dong-Yuan Chen if (self->interpBreak.ctl.subMode & kSubModeDebugProfile) { 519a3147c7412f4794434b4c2604aa2ba784867774buzbee if (!dvmPerformInlineOp4Dbg(arg0, arg1, arg2, arg3, &retval, ref)) 529a3147c7412f4794434b4c2604aa2ba784867774buzbee GOTO_exceptionThrown(); 539a3147c7412f4794434b4c2604aa2ba784867774buzbee } else { 549a3147c7412f4794434b4c2604aa2ba784867774buzbee if (!dvmPerformInlineOp4Std(arg0, arg1, arg2, arg3, &retval, ref)) 559a3147c7412f4794434b4c2604aa2ba784867774buzbee GOTO_exceptionThrown(); 569a3147c7412f4794434b4c2604aa2ba784867774buzbee } 57f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project } 58f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project FINISH(3); 59f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectOP_END 60