opcode - How are variable length arguments parsed while parsing dalvik instructions? -
opcode - How are variable length arguments parsed while parsing dalvik instructions? -
both move va, vb
, move-wide va, vb
involve same operations , same operands. except opcodes same. in situation need print operands used instructions in application. when see instruction move va, vb
should print move va(*contents of va*), vb(*contents of vb*)
. this works fine in case of 4-byte registers. when encounter move-wide
instructions, should print contents of va , contents of next virtual register., contents of vb , contents of next virtual register. standard way of parsing these?
since both dalvik , dx open source, best way reply questions involving dex files inspect source. dx parses instructions in decodedinstruction.java. decodes opcode first, , uses opcode inform decoding rest of instruction.
public static decodedinstruction decode(codeinput in) throws eofexception { int opcodeunit = in.read(); int opcode = opcodes.extractopcodefromunit(opcodeunit); instructioncodec format = opcodeinfo.getformat(opcode); homecoming format.decode(opcodeunit, in); }
dalvik opcode instructions
Comments
Post a Comment