androidreverse-engineeringdalviksmali

Confused about the `move-result-wide` smali instruction


The following smali codes, trying to move a 64-bit result to the register v4. But the size of the v4 is 32-bit. So how does the v4 store the value?

invoke-virtual {v0}, Landroid/location/Location;->getTime()J
move-result-wide v4

Solution

  • The move-result-wide vx instruction will move the long/double result value of the previous method invocation into vx,vx+1.

    See Dalvik opcodes.