The order between updating and using arg_num in
PseudoInst::pseudoInst() is currently undefined. This changeset
explicitly updates arg_num after it has been used to extract an
argument.
--HG--
extra : rebase_source :
67c46dc3333d16ce56687ee8aea41ce6c6d133bb
// used the Argument class, but due to the possible side effects
// from getArgument, it'd most likely break.
int arg_num(0);
- for (int i = 0; i < sizeof(args) / sizeof(*args); ++i)
- args[arg_num++] = getArgument(tc, arg_num, sizeof(uint64_t), false);
+ for (int i = 0; i < sizeof(args) / sizeof(*args); ++i) {
+ args[arg_num] = getArgument(tc, arg_num, sizeof(uint64_t), false);
+ ++arg_num;
+ }
switch (func) {
case 0x00: // arm_func