From mboxrd@z Thu Jan 1 00:00:00 1970 From: nsd@cygnus.com To: john@feith.com Cc: cgf@cygnus.com, eliz@delorie.com, gdb-patches@sourceware.cygnus.com, jimb@cygnus.com, msnyder@cygnus.com Subject: Re: GDB 4.17 Patch for stack aligned i386 code Date: Fri, 24 Mar 2000 16:08:00 -0000 Message-id: <200003250007.AAA07650@nog.bosbc.com> References: <200003242355.SAA14221@jwlab.FEITH.COM> X-SW-Source: 2000-03/msg00572.html >Are you handling non-leaf functions even when the stack pointer is changing? Yes. It works by emulating instructions to figure out the stack pointer on entry to or exit from the function. The opcodes library, with a few minor changes, provides the instruction information in an architecture-independent format. >Does your patch handle functions where the prologue uses "andl" to align >the frame? I don't know. Do you happen to have an example of how to generate such code? I'd be interested in trying it. Nick >From geoffk@cygnus.com Fri Mar 24 16:08:00 2000 From: Geoff Keating To: gdb-patches@sourceware.cygnus.com Subject: patch to psim for denormal values Date: Fri, 24 Mar 2000 16:08:00 -0000 Message-id: <200003250008.QAA31192@localhost.cygnus.com> X-SW-Source: 2000-03/msg00573.html Content-length: 1148 gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c was sending the sim into a very long (perhaps infinite) loop, because of this typo. My copy of the ppc 601 user's manual correctly uses '+' here (on page F-2). OK to commit? -- - Geoffrey Keating ===File ~/patches/cygnus/sim-ppc-denormal.patch============= 2000-03-23 Geoff Keating * ppc-instructions (Disabled_Exponent_Underflow): Increment the exponent when denormalizing. Index: ppc-instructions =================================================================== RCS file: /cvs/cvsfiles/devo/sim/ppc/ppc-instructions,v retrieving revision 1.46 diff -p -u -u -p -r1.46 ppc-instructions --- ppc-instructions 2000/03/02 09:24:10 1.46 +++ ppc-instructions 2000/03/24 01:53:30 @@ -4282,7 +4282,7 @@ void::function::invalid_zero_divide_oper } /* G|R|X == zero from above */ while (exp < -126) { - exp = exp - 1; + exp = exp + 1; frac_grx = (INSERTED64(EXTRACTED64(frac_grx, 0, 54), 1, 55) | MASKED64(frac_grx, 55, 55)); } ============================================================ >From john@feith.com Fri Mar 24 16:30:00 2000 From: John Wehle To: nsd@bosbc.com Cc: cgf@cygnus.com, eliz@delorie.com, gdb-patches@sourceware.cygnus.com, jimb@cygnus.com, msnyder@cygnus.com Subject: Re: GDB 4.17 Patch for stack aligned i386 code Date: Fri, 24 Mar 2000 16:30:00 -0000 Message-id: <200003250030.TAA14328@jwlab.FEITH.COM> X-SW-Source: 2000-03/msg00574.html Content-length: 1281 >>Are you handling non-leaf functions even when the stack pointer is changing? > > Yes. It works by emulating instructions to figure out the stack pointer > on entry to or exit from the function. The opcodes library, with a few > minor changes, provides the instruction information in an > architecture-independent format. Cool. >>Does your patch handle functions where the prologue uses "andl" to align >>the frame? > > I don't know. Do you happen to have an example of how to generate such > code? I'd be interested in trying it. I'm not sure what I still have laying around other than a very old patch for GCC. The idea is to handle a prologue which looks like: func: pushl %ebp movl %esp,%ebp andl $-15,%esp subl $32,%esp function arguments are relative to %ebp and local variables are relative to %esp. Extra alignment has been applied to the stack pointer in order to ensure that local variables don't cross a cache boundary. -- John ------------------------------------------------------------------------- | Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com | | John Wehle | Fax: 1-215-540-5495 | | -------------------------------------------------------------------------