1
# DP: Build gcj for aarch64-linux-gnu
5
2013-04-16 Andreas Schwab <schwab@suse.de>
7
* configure.ac (aarch64-*-*): Don't disable java.
8
* configure: Regenerate.
12
2013-04-16 Andreas Schwab <schwab@suse.de>
14
* configure.host: Add support for aarch64.
15
* sysdep/aarch64/locks.h: New file.
17
libjava/classpath/ChangeLog.gcj
19
2013-04-16 Andreas Schwab <schwab@suse.de>
21
* native/fdlibm/ieeefp.h: Add support for aarch64.
24
===================================================================
25
--- a/src/configure.ac (revision 197996)
26
+++ b/src/configure.ac (revision 197997)
29
# Disable Java if libffi is not supported.
37
===================================================================
38
--- a/src/configure (revision 197996)
39
+++ b/src/configure (revision 197997)
42
# Disable Java if libffi is not supported.
49
Index: libjava/configure.host
50
===================================================================
51
--- a/src/libjava/configure.host (revision 197996)
52
+++ b/src/libjava/configure.host (revision 197997)
55
# This case statement supports per-CPU defaults.
58
+ libgcj_interpreter=yes
60
+ ATOMICSPEC=-fuse-atomic-builtins
63
with_libffi_default=no
67
DIVIDESPEC=-f%{m32:no-}use-divide-subroutine
70
+ slow_pthread_self=no
71
+ can_unwind_signal=no
72
+ CHECKREFSPEC=-fcheck-references
73
+ DIVIDESPEC=-fuse-divide-subroutine
78
Index: libjava/classpath/native/fdlibm/ieeefp.h
79
===================================================================
80
--- a/src/libjava/classpath/native/fdlibm/ieeefp.h (revision 197996)
81
+++ b/src/libjava/classpath/native/fdlibm/ieeefp.h (revision 197997)
83
#ifndef __IEEE_BIG_ENDIAN
84
#ifndef __IEEE_LITTLE_ENDIAN
88
+#define __IEEE_BIG_ENDIAN
90
+#define __IEEE_LITTLE_ENDIAN
95
#define __IEEE_LITTLE_ENDIAN
97
Index: libjava/sysdep/aarch64/locks.h
98
===================================================================
99
--- a/src/libjava/sysdep/aarch64/locks.h (revision 0)
100
+++ b/src/libjava/sysdep/aarch64/locks.h (revision 197997)
102
+// locks.h - Thread synchronization primitives. AArch64 implementation.
104
+#ifndef __SYSDEP_LOCKS_H__
105
+#define __SYSDEP_LOCKS_H__
107
+typedef size_t obj_addr_t; /* Integer type big enough for object */
110
+// Atomically replace *addr by new_val if it was initially equal to old.
111
+// Return true if the comparison succeeded.
112
+// Assumed to have acquire semantics, i.e. later memory operations
113
+// cannot execute before the compare_and_swap finishes.
115
+compare_and_swap(volatile obj_addr_t *addr,
117
+ obj_addr_t new_val)
119
+ return __sync_bool_compare_and_swap(addr, old, new_val);
122
+// Set *addr to new_val with release semantics, i.e. making sure
123
+// that prior loads and stores complete before this
126
+release_set(volatile obj_addr_t *addr, obj_addr_t new_val)
128
+ __sync_synchronize();
132
+// Compare_and_swap with release semantics instead of acquire semantics.
133
+// On many architecture, the operation makes both guarantees, so the
134
+// implementation can be the same.
136
+compare_and_swap_release(volatile obj_addr_t *addr,
138
+ obj_addr_t new_val)
140
+ return __sync_bool_compare_and_swap(addr, old, new_val);
143
+// Ensure that subsequent instructions do not execute on stale
144
+// data that was loaded from memory before the barrier.
148
+ __sync_synchronize();
151
+// Ensure that prior stores to memory are completed with respect to other
156
+ __sync_synchronize();