}
}
-static char *
+#define SVP64_SEP '/'
+
+static void
svp64_decode (char *str, struct svp64_ctx *svp64)
{
+ char *opc;
+
str += (sizeof ("sv.") - 1);
- svp64->desc = (const struct svp64_desc *) str_hash_find (svp64_hash, str);
- if (!svp64->desc)
+ if (! ISALPHA (*str))
svp64_raise (_("unrecognized opcode: `%s'"), str);
- return str;
+ opc = str;
+ for (; ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0'; ++str)
+ ;
+ if (*str != '\0')
+ *str++ = '\0';
+
+ svp64->desc = (const struct svp64_desc *) str_hash_find (svp64_hash, opc);
+ if (!svp64->desc)
+ svp64_raise (_("unrecognized opcode: `%s'"), str);
}
static void