mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 03:41:10 +08:00
Debugger disassembler: erase repe/repne prefix if SSE instruction
This commit is contained in:
parent
7480a1bf4b
commit
2b2c2bc582
@ -632,6 +632,21 @@ static void uputchar(char c)
|
||||
*ubufp = 0;
|
||||
}
|
||||
|
||||
static void ua_backspace_repe(void) {
|
||||
char *s = ubufp - 1;
|
||||
|
||||
while (s >= ubufs && (*s == ' ')) s--;
|
||||
while (s >= ubufs && (*s != ' ')) s--;
|
||||
s++;
|
||||
|
||||
if (s < ubufs) return;
|
||||
|
||||
if (!strncmp(s,"repe ",5) || !strncmp(s,"repne ",6)) {
|
||||
/* set write pointer here, to overwrite it */
|
||||
*s = 0; ubufp = s;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
static int bytes(char c)
|
||||
@ -1093,6 +1108,8 @@ static void percent(char type, char subtype)
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
/* problem: for SSE opcodes with REPE/REPNE mandatory prefix this code will have already written repne/repe so that needs to be wiped out of the buffer */
|
||||
if (last_prefix == MP_F2 || last_prefix == MP_F3) ua_backspace_repe();
|
||||
ua_str(mpgroups[subtype-'0'][last_c][last_prefix]);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user