Skip to contentSkip to conversation

Fix gcc4 patch

PATCH New Gwenole Beauchesne 1 participant 1 message Jun 2, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix gcc4 patch

Hi,

I got a "No return instruction found in op_lmsw_T0" when building qemu with the gcc4 patch + gcc3.3. push imm8 was misdecoded. Also fixed the imul case at the same time.

Tested with gcc 3.3.4 (hammer-branch), 3.4.3, 4.0.1 (4.0-branch).

2005-06-02 Gwenole Beauchesne <[email protected]>

* dyngen.c (trace_i386_insn): Fix push/imul case with 8-bit immediate.

dyngen.c renamed from dyngen.c.orig +7 -2
@@ -1672,14 +1672,19 @@
                 is_prefix = 1;
                 break;
             case 8: /* push immediate */
-            case 10: /* pop immediate */
                 immed = op_size;
                 modrm = 0;
                 break;
+            case 10: /* push 8-bit immediate */
+                immed = 1;
+                modrm = 0;
+                break;
             case 9: /* imul immediate */
-            case 11: /* imul immediate */
                 immed = op_size;
                 break;
+            case 11: /* imul 8-bit immediate */
+                immed = 1;
+                break;
             case 12: /* insb */
             case 13: /* insw */
             case 14: /* outsb */