+ if (*d)
+ {
+ /* Offset in bits of the first thing beyond each index byte.
+ Element 0 is for operand A and element 1 is for operand B. */
+ int index_offset[2];
+
+ /* 0 for operand A, 1 for operand B, greater for other args. */
+ int whicharg = 0;
+
+ (*dis_info->fprintf_func)(dis_info->stream, "\t");
+
+ maxarg = 0;
+
+ /* First we have to find and keep track of the index bytes,
+ if we are using scaled indexed addressing mode, since the index
+ bytes occur right after the basic instruction, not as part
+ of the addressing extension. */
+ index_offset[0] = -1;
+ index_offset[1] = -1;
+ if (Is_gen (d[1]))
+ {
+ int bitoff = d[1] == 'f' ? 10 : 5;
+ int addr_mode = bit_extract (buffer, ioffset - bitoff, 5);
+
+ if (Adrmod_is_index (addr_mode))
+ {
+ aoffset += 8;
+ index_offset[0] = aoffset;
+ }
+ }
+
+ if (d[2] && Is_gen (d[3]))
+ {
+ int addr_mode = bit_extract (buffer, ioffset - 10, 5);
+
+ if (Adrmod_is_index (addr_mode))
+ {
+ aoffset += 8;
+ index_offset[1] = aoffset;
+ }
+ }
+
+ while (*d)
+ {
+ argnum = *d - '1';
+ if (argnum >= MAX_ARGS)
+ abort ();
+ d++;
+ if (argnum > maxarg)
+ maxarg = argnum;
+ ioffset = print_insn_arg (*d, ioffset, &aoffset, buffer,
+ memaddr, arg_bufs[argnum],
+ whicharg > 1 ? -1 : index_offset[whicharg]);
+ d++;
+ whicharg++;
+ }
+
+ for (argnum = 0; argnum <= maxarg; argnum++)
+ {
+ bfd_vma addr;
+ char *ch;
+
+ for (ch = arg_bufs[argnum]; *ch;)
+ {
+ if (*ch == NEXT_IS_ADDR)
+ {
+ ++ch;
+ addr = bfd_scan_vma (ch, NULL, 16);
+ (*dis_info->print_address_func) (addr, dis_info);
+ while (*ch && *ch != NEXT_IS_ADDR)
+ ++ch;
+ if (*ch)
+ ++ch;
+ }
+ else
+ (*dis_info->fprintf_func)(dis_info->stream, "%c", *ch++);
+ }
+ if (argnum < maxarg)
+ (*dis_info->fprintf_func)(dis_info->stream, ", ");
+ }
+ }
+ return aoffset / 8;