Mail Archives: djgpp-workers/2003/06/19/18:56:57
According to Esa A E Peuha:
> There are two bugs in unassmbl.c (both edebug and fsdb versions): arpl
> has wrong second operand, and frstor is in wrong place. Are these OK to
> commit?
>
> Index: src/debug/edebug/unassmbl.c
> ===================================================================
> RCS file: /cvs/djgpp/djgpp/src/debug/edebug/unassmbl.c,v
> retrieving revision 1.5
> diff -u -r1.5 unassmbl.c
> --- src/debug/edebug/unassmbl.c 1 Jun 2002 09:27:41 -0000 1.5
> +++ src/debug/edebug/unassmbl.c 17 Jun 2003 11:49:20 -0000
> @@ -107,7 +107,7 @@
> "pop %eax", "pop %ecx", "pop %edx", "pop %ebx",
> "pop %esp", "pop %ebp", "pop %esi", "pop %edi",
> /* 6 */
> - "pusha", "popa", "bound %Gv,%Ma", "arpl %Ew,%Rw",
> + "pusha", "popa", "bound %Gv,%Ma", "arpl %Ew,%Gw",
> "%pf", "%pg", "%so", "%sa",
> "push %I-vv", "imul %Gv=%Ev*%I-vv", "push %I-vb", "imul %Gv=%Ev*%I-vb",
> "insb %Yb,dx", "ins%ew %Yv,dx", "outsb dx,%Xb", "outs%ew dx,%Xv",
This seems to do the right thing. I tried it and ``asm (".byte 0x63\n\t
.byte 0");'' went from "arpl [eax], [eax]" (which can't be true) to
"arpl [eax], ax" (which is correct AFAICT).
> @@ -281,11 +281,11 @@
> /*16*/ "fiadd", "fimul", "ficomw", "ficompw",
> "fisub", "fisubr", "fidiv", "fidivr",
> /*24*/ "fild", 0, "fist", "fistp",
> - "frstor", "fldt", 0, "fstpt",
> + 0, "fldt", 0, "fstpt",
> /*32*/ "faddq", "fmulq", "fcomq", "fcompq",
> "fsubq", "fsubrq", "fdivq", "fdivrq",
> /*40*/ "fldq", 0, "fstq", "fstpq",
> - 0, 0, "fsave", "fstsww",
> + "frstor", 0, "fsave", "fstsww",
> /*48*/ "fiaddw", "fimulw", "ficomw", "ficompw",
> "fisubw", "fisubrw", "fidivw", "fidivr",
> /*56*/ "fildw", 0, "fistw", "fistpw",
This seems right too (after the patch i. e.), according to the Intel
manual, although it's confusing with 16, 24, 32... matching 0x8a,
0x8b, 0x8c.
(Perhaps "00... 08... 16..." should be changed to "00, opcodes
0x88... 08, opcodes 0x89... 16, opcodes 0x8a..."?)
Right,
MartinS
- Raw text -