* Have a boehm-gc patch for gcj/rtems
@ 2011-06-04 11:57 Jie Liu
2011-06-12 16:27 ` Jie Liu
0 siblings, 1 reply; 3+ messages in thread
From: Jie Liu @ 2011-06-04 11:57 UTC (permalink / raw)
To: java-patches, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
Hi,
I am working on porting gcj to rtems now, it's a project of GSoC2011.[1]
And now, the first step: boehm-gc have been ported, so I want to get
this patch reviewed and merged.
And I have filed the FSF Paperwork, the patch has been attached.
Thank you for your time.
Best Regards,
Jie
[1]http://socghop.appspot.com/gsoc/org/google/gsoc2011/rtems
[-- Attachment #2: boehm-gc.diff --]
[-- Type: application/octet-stream, Size: 3226 bytes --]
Index: boehm-gc/mach_dep.c
===================================================================
--- boehm-gc/mach_dep.c (revision 172224)
+++ boehm-gc/mach_dep.c (working copy)
@@ -411,7 +411,8 @@
word dummy;
# if defined(USE_GENERIC_PUSH_REGS)
-# ifdef HAVE_BUILTIN_UNWIND_INIT
+# if defined(HAVE_BUILTIN_UNWIND_INIT)\
+ &&!(defined(I386) && defined(RTEMS))
/* This was suggested by Richard Henderson as the way to */
/* force callee-save registers and register windows onto */
/* the stack. */
@@ -437,8 +438,8 @@
for (; (char *)i < lim; i++) {
*i = 0;
}
-# if defined(MSWIN32) || defined(MSWINCE) \
- || defined(UTS4) || defined(LINUX) || defined(EWS4800)
+# if defined(MSWIN32) || defined(MSWINCE) || defined(UTS4) \
+ || defined(LINUX) || defined(EWS4800) || defined(RTEMS)
(void) setjmp(regs);
# else
(void) _setjmp(regs);
Index: boehm-gc/include/private/gcconfig.h
===================================================================
--- boehm-gc/include/private/gcconfig.h (revision 172224)
+++ boehm-gc/include/private/gcconfig.h (working copy)
@@ -315,6 +315,11 @@
# define mach_type_known
# endif
# endif
+# if defined(__rtems__) && (defined(i386) || defined(__i386__))
+# define I386
+# define RTEMS
+# define mach_type_known
+# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
# define NEXT
@@ -1297,6 +1302,16 @@
# define STACKBOTTOM ((ptr_t)0xc0000000)
# define DATAEND /* not needed */
# endif
+# ifdef RTEMS
+# define OS_TYPE "RTEMS"
+# include <sys/unistd.h>
+ extern int etext[];
+ extern int end[];
+ extern void *InitStackBottom;
+# define DATASTART ((ptr_t)etext)
+# define DATAEND ((ptr_t)end)
+# define STACKBOTTOM ((ptr_t)InitStackBottom)
+# endif
# ifdef DOS4GW
# define OS_TYPE "DOS4GW"
extern long __nullarea;
@@ -2370,7 +2385,8 @@
# else
# if defined(NEXT) || defined(DOS4GW) || \
(defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
- (defined(SUNOS5) && !defined(USE_MMAP))
+ (defined(SUNOS5) && !defined(USE_MMAP)) || \
+ defined(RTEMS)
# define GET_MEM(bytes) HBLKPTR((size_t) \
calloc(1, (size_t)bytes + GC_page_size) \
+ GC_page_size-1)
Index: boehm-gc/configure
===================================================================
--- boehm-gc/configure (revision 172224)
+++ boehm-gc/configure (working copy)
@@ -14867,6 +14869,8 @@
$as_echo "#define _REENTRANT 1" >>confdefs.h
;;
+ rtems)
+ ;;
decosf1 | irix | mach | os2 | dce | vxworks)
as_fn_error "thread package $THREADS not yet supported" "$LINENO" 5
;;
Index: boehm-gc/os_dep.c
===================================================================
--- boehm-gc/os_dep.c (revision 172224)
+++ boehm-gc/os_dep.c (working copy)
@@ -1507,7 +1507,7 @@
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \
&& !defined(MSWIN32) && !defined(MSWINCE) \
- && !defined(MACOS) && !defined(DOS4GW)
+ && !defined(MACOS) && !defined(DOS4GW) && !defined(RTEMS)
# ifdef SUNOS4
extern caddr_t sbrk();
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Have a boehm-gc patch for gcj/rtems
2011-06-04 11:57 Have a boehm-gc patch for gcj/rtems Jie Liu
@ 2011-06-12 16:27 ` Jie Liu
2011-06-13 9:41 ` Fwd: " Andrew Haley
0 siblings, 1 reply; 3+ messages in thread
From: Jie Liu @ 2011-06-12 16:27 UTC (permalink / raw)
To: java-patches, gcc-patches; +Cc: Joel Sherrill
Hi,
Java HelloWorld compiled by cross gcj for RTEMS can run without
problem now, I think it's time for get the boehm-gc patch reviewed and
merged. :) Here is the patch:
Index: mach_dep.c
===================================================================
--- mach_dep.c (revision 172224)
+++ mach_dep.c (working copy)
@@ -411,7 +411,8 @@
word dummy;
# if defined(USE_GENERIC_PUSH_REGS)
-# ifdef HAVE_BUILTIN_UNWIND_INIT
+# if defined(HAVE_BUILTIN_UNWIND_INIT)\
+ &&!(defined(I386) && defined(RTEMS))
/* This was suggested by Richard Henderson as the way to */
/* force callee-save registers and register windows onto */
/* the stack. */
@@ -437,8 +438,8 @@
for (; (char *)i < lim; i++) {
*i = 0;
}
-# if defined(MSWIN32) || defined(MSWINCE) \
- || defined(UTS4) || defined(LINUX) || defined(EWS4800)
+# if defined(MSWIN32) || defined(MSWINCE) || defined(UTS4) \
+ || defined(LINUX) || defined(EWS4800) || defined(RTEMS)
(void) setjmp(regs);
# else
(void) _setjmp(regs);
Index: include/private/gcconfig.h
===================================================================
--- include/private/gcconfig.h (revision 172224)
+++ include/private/gcconfig.h (working copy)
@@ -315,6 +315,11 @@
# define mach_type_known
# endif
# endif
+# if defined(__rtems__) && (defined(i386) || defined(__i386__))
+# define I386
+# define RTEMS
+# define mach_type_known
+# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
# define NEXT
@@ -1297,6 +1302,17 @@
# define STACKBOTTOM ((ptr_t)0xc0000000)
# define DATAEND /* not needed */
# endif
+# ifdef RTEMS
+# define OS_TYPE "RTEMS"
+# include <sys/unistd.h>
+ extern int etext[];
+ extern int end[];
+ void *rtems_get_stack_bottom();
+# define InitStackBottom rtems_get_stack_bottom()
+# define DATASTART ((ptr_t)etext)
+# define DATAEND ((ptr_t)end)
+# define STACKBOTTOM ((ptr_t)InitStackBottom)
+# endif
# ifdef DOS4GW
# define OS_TYPE "DOS4GW"
extern long __nullarea;
@@ -2370,7 +2386,8 @@
# else
# if defined(NEXT) || defined(DOS4GW) || \
(defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
- (defined(SUNOS5) && !defined(USE_MMAP))
+ (defined(SUNOS5) && !defined(USE_MMAP)) || \
+ defined(RTEMS)
# define GET_MEM(bytes) HBLKPTR((size_t) \
calloc(1, (size_t)bytes
+ GC_page_size) \
+ GC_page_size-1)
Index: configure
===================================================================
--- configure (revision 172224)
+++ configure (working copy)
@@ -14867,6 +14867,8 @@
$as_echo "#define _REENTRANT 1" >>confdefs.h
;;
+ rtems)
+ ;;
decosf1 | irix | mach | os2 | dce | vxworks)
as_fn_error "thread package $THREADS not yet supported" "$LINENO" 5
;;
Index: os_dep.c
===================================================================
--- os_dep.c (revision 172224)
+++ os_dep.c (working copy)
@@ -1507,7 +1507,7 @@
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \
&& !defined(MSWIN32) && !defined(MSWINCE) \
- && !defined(MACOS) && !defined(DOS4GW)
+ && !defined(MACOS) && !defined(DOS4GW) && !defined(RTEMS)
# ifdef SUNOS4
extern caddr_t sbrk();
Best Regards,
Jie
2011/6/4 Jie Liu <lj8175@gmail.com>:
> Hi,
>
> I am working on porting gcj to rtems now, it's a project of GSoC2011.[1]
> And now, the first step: boehm-gc have been ported, so I want to get
> this patch reviewed and merged.
>
> And I have filed the FSF Paperwork, the patch has been attached.
> Thank you for your time.
>
> Best Regards,
> Jie
>
> [1]http://socghop.appspot.com/gsoc/org/google/gsoc2011/rtems
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fwd: Have a boehm-gc patch for gcj/rtems
2011-06-12 16:27 ` Jie Liu
@ 2011-06-13 9:41 ` Andrew Haley
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Haley @ 2011-06-13 9:41 UTC (permalink / raw)
To: gc; +Cc: java-patches, gcc-patches, Joel Sherrill, Jie Liu
On 12/06/11 16:45, Jie Liu wrote:
> Hi,
>
> Java HelloWorld compiled by cross gcj for RTEMS can run without
> problem now, I think it's time for get the boehm-gc patch reviewed and
> merged. :) Here is the patch:
>
> Index: mach_dep.c
> ===================================================================
> --- mach_dep.c (revision 172224)
> +++ mach_dep.c (working copy)
> @@ -411,7 +411,8 @@
> word dummy;
>
> # if defined(USE_GENERIC_PUSH_REGS)
> -# ifdef HAVE_BUILTIN_UNWIND_INIT
> +# if defined(HAVE_BUILTIN_UNWIND_INIT)\
> + &&!(defined(I386) && defined(RTEMS))
> /* This was suggested by Richard Henderson as the way to */
> /* force callee-save registers and register windows onto */
> /* the stack. */
> @@ -437,8 +438,8 @@
> for (; (char *)i < lim; i++) {
> *i = 0;
> }
> -# if defined(MSWIN32) || defined(MSWINCE) \
> - || defined(UTS4) || defined(LINUX) || defined(EWS4800)
> +# if defined(MSWIN32) || defined(MSWINCE) || defined(UTS4) \
> + || defined(LINUX) || defined(EWS4800) || defined(RTEMS)
> (void) setjmp(regs);
> # else
> (void) _setjmp(regs);
> Index: include/private/gcconfig.h
> ===================================================================
> --- include/private/gcconfig.h (revision 172224)
> +++ include/private/gcconfig.h (working copy)
> @@ -315,6 +315,11 @@
> # define mach_type_known
> # endif
> # endif
> +# if defined(__rtems__) && (defined(i386) || defined(__i386__))
> +# define I386
> +# define RTEMS
> +# define mach_type_known
> +# endif
> # if defined(NeXT) && defined(mc68000)
> # define M68K
> # define NEXT
> @@ -1297,6 +1302,17 @@
> # define STACKBOTTOM ((ptr_t)0xc0000000)
> # define DATAEND /* not needed */
> # endif
> +# ifdef RTEMS
> +# define OS_TYPE "RTEMS"
> +# include <sys/unistd.h>
> + extern int etext[];
> + extern int end[];
> + void *rtems_get_stack_bottom();
> +# define InitStackBottom rtems_get_stack_bottom()
> +# define DATASTART ((ptr_t)etext)
> +# define DATAEND ((ptr_t)end)
> +# define STACKBOTTOM ((ptr_t)InitStackBottom)
> +# endif
> # ifdef DOS4GW
> # define OS_TYPE "DOS4GW"
> extern long __nullarea;
> @@ -2370,7 +2386,8 @@
> # else
> # if defined(NEXT) || defined(DOS4GW) || \
> (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
> - (defined(SUNOS5) && !defined(USE_MMAP))
> + (defined(SUNOS5) && !defined(USE_MMAP)) || \
> + defined(RTEMS)
> # define GET_MEM(bytes) HBLKPTR((size_t) \
> calloc(1, (size_t)bytes
> + GC_page_size) \
> + GC_page_size-1)
> Index: configure
> ===================================================================
> --- configure (revision 172224)
> +++ configure (working copy)
> @@ -14867,6 +14867,8 @@
> $as_echo "#define _REENTRANT 1" >>confdefs.h
>
> ;;
> + rtems)
> + ;;
> decosf1 | irix | mach | os2 | dce | vxworks)
> as_fn_error "thread package $THREADS not yet supported" "$LINENO" 5
> ;;
> Index: os_dep.c
> ===================================================================
> --- os_dep.c (revision 172224)
> +++ os_dep.c (working copy)
> @@ -1507,7 +1507,7 @@
>
> # if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \
> && !defined(MSWIN32) && !defined(MSWINCE) \
> - && !defined(MACOS) && !defined(DOS4GW)
> + && !defined(MACOS) && !defined(DOS4GW) && !defined(RTEMS)
>
> # ifdef SUNOS4
> extern caddr_t sbrk();
>
> Best Regards,
> Jie
>
> 2011/6/4 Jie Liu <lj8175@gmail.com>:
>> Hi,
>>
>> I am working on porting gcj to rtems now, it's a project of GSoC2011.[1]
>> And now, the first step: boehm-gc have been ported, so I want to get
>> this patch reviewed and merged.
>>
>> And I have filed the FSF Paperwork, the patch has been attached.
>> Thank you for your time.
>>
>> Best Regards,
>> Jie
>>
>> [1]http://socghop.appspot.com/gsoc/org/google/gsoc2011/rtems
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-13 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-04 11:57 Have a boehm-gc patch for gcj/rtems Jie Liu
2011-06-12 16:27 ` Jie Liu
2011-06-13 9:41 ` Fwd: " Andrew Haley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).