1
Index: libgc-7.1.new/include/private/gcconfig.h
2
===================================================================
3
--- libgc-7.1.new.orig/include/private/gcconfig.h 2009-08-12 20:10:04.000000000 +0100
4
+++ libgc-7.1.new/include/private/gcconfig.h 2009-08-12 20:10:18.000000000 +0100
7
# define mach_type_known
9
+# if defined(LINUX) && defined(__avr32__)
11
+# define mach_type_known
13
# if defined(LINUX) && defined(__sh__)
15
# define mach_type_known
16
@@ -1781,6 +1785,19 @@
21
+# define MACH_TYPE "AVR32"
22
+# define CPP_WORDSZ 32
24
+# define OS_TYPE "LINUX"
25
+# define DYNAMIC_LOADING
26
+# define LINUX_STACKBOTTOM
27
+# define USE_GENERIC_PUSH_REGS
28
+# define SEARCH_FOR_DATA_START
30
+# define DATAEND (_end)
34
# define MACH_TYPE "CRIS"
35
# define CPP_WORDSZ 32
36
Index: libgc-7.1.new/include/private/thread_local_alloc.h
37
===================================================================
38
--- libgc-7.1.new.orig/include/private/thread_local_alloc.h 2009-08-12 20:10:04.000000000 +0100
39
+++ libgc-7.1.new/include/private/thread_local_alloc.h 2009-08-12 20:10:18.000000000 +0100
42
# define USE_WIN32_COMPILER_TLS
44
-# elif defined(LINUX) && !defined(ARM32) && \
45
+# elif defined(LINUX) && !defined(ARM32) && !defined(AVR32) && \
46
(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >=3))
47
# define USE_COMPILER_TLS
48
# elif (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
49
Index: libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/avr32.h
50
===================================================================
51
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
52
+++ libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/avr32.h 2009-08-12 20:10:18.000000000 +0100
55
+ * Copyright (C) 2009 Bradley Smith <brad@brad-smith.co.uk>
57
+ * Permission is hereby granted, free of charge, to any person obtaining a
58
+ * copy of this software and associated documentation files (the
59
+ * "Software"), to deal in the Software without restriction, including
60
+ * without limitation the rights to use, copy, modify, merge, publish,
61
+ * distribute, sublicense, and/or sell copies of the Software, and to
62
+ * permit persons to whom the Software is furnished to do so, subject to
63
+ * the following conditions:
65
+ * The above copyright notice and this permission notice shall be included
66
+ * in all copies or substantial portions of the Software.
68
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
69
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
70
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
71
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
72
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
73
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
74
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
78
+#include "../all_atomic_load_store.h"
80
+#include "../ordered.h" /* There are no multiprocessor implementations. */
82
+#include "../test_and_set_t_is_ao_t.h"
84
+AO_INLINE AO_TS_VAL_t
85
+AO_test_and_set(volatile AO_TS_t *addr) {
88
+ __asm__ __volatile__(
89
+ "xchg %[old], %[mem], %[newv]"
91
+ : [mem] "r"(addr), [newv] "r"(1)
97
+#define AO_HAVE_test_and_set
98
Index: libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops.h
99
===================================================================
100
--- libgc-7.1.new.orig/libatomic_ops-1.2/src/atomic_ops.h 2009-08-12 20:10:04.000000000 +0100
101
+++ libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops.h 2009-08-12 20:10:18.000000000 +0100
103
# if defined(__cris__) || defined(CRIS)
104
# include "atomic_ops/sysdeps/gcc/cris.h"
106
+# if defined(__avr32__)
107
+# include "atomic_ops/sysdeps/gcc/avr32.h"
109
#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
111
#if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
112
Index: libgc-7.1.new/mach_dep.c
113
===================================================================
114
--- libgc-7.1.new.orig/mach_dep.c 2009-08-12 20:10:25.000000000 +0100
115
+++ libgc-7.1.new/mach_dep.c 2009-08-12 20:10:46.000000000 +0100
117
# if defined(HAVE_PUSH_REGS)
119
# elif defined(UNIX_LIKE) && !defined(DARWIN) && !defined(ARM32) && \
121
+ !defined(HURD) && !defined(AVR32)
122
/* Older versions of Darwin seem to lack getcontext(). */
123
/* ARM Linux often doesn't support a real getcontext(). */