Message-ID: <36A06C1E.C5DE5F2D@gmx.net> Date: Sat, 16 Jan 1999 09:38:22 -0100 From: Robert Hoehne Organization: none provided X-Mailer: Mozilla 4.07 [de] (Win95; I) MIME-Version: 1.0 To: djgpp-workers Subject: Patch for debug.c Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Reply-To: djgpp-workers AT delorie DOT com After starting the discussion about the possible problems with edebug32 and FPU-less systems, I found, that also edebug32 had code to save/restore to FPU state. So to use the patch I sent some time ago about the FPU saving for dbgcom.c, the related code in edebug32 needs to be removed. Here is now the pathch for it. --- src/debug/edebug/debug.c~ Mon Sep 7 18:01:28 1998 +++ src/debug/edebug/debug.c Sat Jan 16 09:32:20 1999 @@ -24,59 +24,11 @@ #include "unassmbl.h" #include -typedef struct { - word16 sig0; - word16 sig1; - word16 sig2; - word16 sig3; - word16 exponent:15; - word16 sign:1; -} NPXREG; - -typedef struct { - word32 control; - word32 status; - word32 tag; - word32 eip; - word32 cs; - word32 dataptr; - word32 datasel; - NPXREG reg[8]; -} NPX; - static char char32spc[] = "xxxúxxxúxxxúxxxùxxxúxxxúxxxúxxx "; static char flset[] = "VMRF NT OFDNIETFMIZR AC PE CY"; static char floff[] = " UPID PLNZ PO NC"; static char fluse[] = {1,1,0,1,0,0,1,1,1,1,1,1,0,1,0,1,0,1}; -static NPX npx; - -static void save_npx(void) -{ -asm( "\n\ - inb $0xa0,%al \n\ - testb $0x20,%al \n\ - jz 1f \n\ - xorl %eax,%eax \n\ - outb %al,$0xf0 \n\ - movb $0x20,%al \n\ - outb %al,$0xa0 \n\ - outb %al,$0x20 \n\ -1: \n\ - movl $_npx, %eax \n\ - fnsave (%eax) \n\ - fwait " -); -} - -static void load_npx(void) -{ -asm( "\n\ - movl $_npx, %eax \n\ - movb $0,4(%eax) \n\ - frstor (%eax) " -); -} static void tssprint(TSS *t) {