mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00

Fix some bugs of softx86, see CORE-7250 for more information. All diffs from the original softx86 code should also be put in softx86_ros.diff. svn path=/branches/ntvdm/; revision=59248
64 lines
1.9 KiB
Diff
64 lines
1.9 KiB
Diff
Index: softx86/optable.c
|
|
===================================================================
|
|
--- softx86/optable.c (révision 59247)
|
|
+++ softx86/optable.c (copie de travail)
|
|
@@ -217,9 +217,9 @@
|
|
{Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x66 */
|
|
{Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x67 */
|
|
|
|
- {Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x68 */
|
|
+ {Sfx86OpcodeExec_push, Sfx86OpcodeDec_push}, /* 0x68 */
|
|
{Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x69 */
|
|
- {Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x6A */
|
|
+ {Sfx86OpcodeExec_push, Sfx86OpcodeDec_push}, /* 0x6A */
|
|
{Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x6B */
|
|
{Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x6C */
|
|
{Sfx86OpcodeExec_default, Sfx86OpcodeDec_default}, /* 0x6D */
|
|
Index: softx86/pushpop.c
|
|
===================================================================
|
|
--- softx86/pushpop.c (révision 59247)
|
|
+++ softx86/pushpop.c (copie de travail)
|
|
@@ -167,6 +167,21 @@
|
|
return 1;
|
|
}
|
|
|
|
+ if (opcode == 0x6A) // PUSH imm8
|
|
+ {
|
|
+ sx86_ubyte b = softx86_fetch_exec_byte(ctx);
|
|
+ softx86_stack_pushw(ctx, (sx86_uword)b);
|
|
+ return 1;
|
|
+ }
|
|
+
|
|
+ if (opcode == 0x68) // PUSH imm16
|
|
+ {
|
|
+ sx86_uword w = softx86_fetch_exec_byte(ctx);
|
|
+ w |= softx86_fetch_exec_byte(ctx) << 8;
|
|
+ softx86_stack_pushw(ctx, w);
|
|
+ return 1;
|
|
+ }
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
@@ -202,6 +217,21 @@
|
|
return 1;
|
|
}
|
|
|
|
+ if (opcode == 0x6A && ctx->__private->level >= SX86_CPULEVEL_80186) // PUSH imm8
|
|
+ {
|
|
+ sx86_ubyte b = softx86_fetch_exec_byte(ctx);
|
|
+ sprintf(buf, "PUSH %02Xh", b);
|
|
+ return 1;
|
|
+ }
|
|
+
|
|
+ if (opcode == 0x68 && ctx->__private->level >= SX86_CPULEVEL_80186) // PUSH imm16
|
|
+ {
|
|
+ sx86_uword w = softx86_fetch_exec_byte(ctx);
|
|
+ w |= softx86_fetch_exec_byte(ctx) << 8;
|
|
+ sprintf(buf, "PUSH %04Xh", w);
|
|
+ return 1;
|
|
+ }
|
|
+
|
|
return 0;
|
|
}
|
|
|