+/* start-sanitize-h8s */
+ /* Gross. Gross. ldm and stm have a format not easily handled
+ by get_operand. We deal with it explicitly here. */
+ if (src[0] == 'e' && src[1] == 'r' && isdigit(src[2])
+ && src[3] == '-' && src[4] == 'e' && src[5] == 'r' && isdigit(src[6]))
+ {
+ int low, high;
+
+ low = src[2] - '0';
+ high = src[6] - '0';
+
+ if (high < low)
+ as_bad ("Invalid register list for ldm/stm\n");
+
+ if (low % 2)
+ as_bad ("Invalid register list for ldm/stm\n");
+
+ if (high - low > 4)
+ as_bad ("Invalid register list for ldm/stm\n");
+
+ if (high - low != 2
+ && low % 4)
+ as_bad ("Invalid register list for ldm/stm\n");
+
+ /* Even sicker. We encode two registers into op->reg. One
+ for the low register to save, the other for the high
+ register to save; we also set the high bit in op->reg
+ so we know this is "very special". */
+ op->reg = 0x80000000 | (high << 8) | low;
+ op->mode = REG;
+ *ptr = src + 7;
+ return;
+ }
+/* end-sanitize-h8s */
+