|
@@ -232,9 +232,16 @@ static int mov__parse(struct ins_operands *ops)
|
|
|
return -1;
|
|
|
|
|
|
target = ++s;
|
|
|
+ comment = strchr(s, '#');
|
|
|
|
|
|
- while (s[0] != '\0' && !isspace(s[0]))
|
|
|
- ++s;
|
|
|
+ if (comment != NULL)
|
|
|
+ s = comment - 1;
|
|
|
+ else
|
|
|
+ s = strchr(s, '\0') - 1;
|
|
|
+
|
|
|
+ while (s > target && isspace(s[0]))
|
|
|
+ --s;
|
|
|
+ s++;
|
|
|
prev = *s;
|
|
|
*s = '\0';
|
|
|
|
|
@@ -244,7 +251,6 @@ static int mov__parse(struct ins_operands *ops)
|
|
|
if (ops->target.raw == NULL)
|
|
|
goto out_free_source;
|
|
|
|
|
|
- comment = strchr(s, '#');
|
|
|
if (comment == NULL)
|
|
|
return 0;
|
|
|
|