This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: i386-rtems setjmp.h patch


Joel Sherrill wrote:
"J. Johnston" wrote:

Joel Sherrill wrote:

I don't claim to fully understand why the i386 has such a complicated
path to figuring out _JBLEN but it didn't work for rtems.  Honestly I
am not sure if using setjmp-dj.h gets everything defined for targets
that
use that either.
It does.  You'll see that the jmp_buf is defined already and so we
don't redefine it.  The problem is when we fall into the last part
which is enabled for CYGWIN and __rtems__ that needs the _JBLEN macro
to be set.

That sounds like what we were seeing since it actually a sigsetjmpbuf
problem.


It looks like _JBLEN of 9 is what that structure is

accomplishing.  Anyway i386-rtems targets need this one.  Please
commit it.

Do you mean 9 ints or do you mean 36 ints?  Because _JBTYPE is undefined,
it will declare _JBLEN ints.

The assembly only saves 9 registers so we mean 9 ints.  We are using
the machine/i386/setjmp.S.

Patch checked in with 9 instead of 36.  Thanks.

-- Jeff J.


2002-12-06    Joel Sherrill <joel@OARcorp.com>

     * libc/include/machine/setjmp.h: Make sure _JBLEN is defined
     for i386-rtems targets.

diff -uNr
/usr1/rtems/work-tools/original/newlib-1.10.0/newlib/libc/include/machine/setjmp.h
newlib-1.10.0/newlib/libc/include/machine/setjmp.h
---
/usr1/rtems/work-tools/original/newlib-1.10.0/newlib/libc/include/machine/setjmp.h
Fri Feb  1 17:27:10 2002
+++ newlib-1.10.0/newlib/libc/include/machine/setjmp.h  Wed Nov 27
07:55:10 2002
@@ -41,8 +41,8 @@
#if defined(__CYGWIN__) && !defined (_JBLEN)
#define _JBLEN (13 * 4)
#elif defined (__i386__)
-#ifdef __unix__
-# define _JBLEN        36
+#if defined(__unix__) || defined(__rtems__)
+# define _JBLEN        (9 * 4)
#else
#include "setjmp-dj.h"
#endif





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]