Reputation: 369
I'm having trouble understanding the structure of invoke-kind/range opcode,
Syntax
invoke-kind/range {vCCCC .. vNNNN}, meth@BBBB
Arguments
A: argument word count (8 bits)
B: method reference index (16 bits)
C:first argument register (16 bits)
N = A + C - 1
As you can see B and C are mentioned in the bytecode syntax but A is not mentioned, Where is the A argument located and what it means exactly?
Thanks.
Upvotes: 4
Views: 582
Reputation: 20282
A contains the number of registers that is being passed to the method.
So if you have invoke-static/range {v0 .. v7}, method
, then A will be 8, and C is 0. You can see from the formula at the bottom that N, the last register being passed, is calculated as N = A + C - 1
, so N = 0 + 8 - 1 = 7
Upvotes: 2