This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Another IA-64 Boehm gc patch
- To: java-patches at sourceware dot cygnus dot com
- Subject: Another IA-64 Boehm gc patch
- From: Andrew Haley <aph at pasanda dot cygnus dot co dot uk>
- Date: 19 Jun 2000 19:17:44 -0000
- CC: Hans Boehm <boehm at acm dot org>
This patch changes an asm in order to avoid a reload failure that
results from trying to pass a 32-bit subreg as a 64-bit register.
This is possibly a compiler bug, but this patch is a workaround that
generates the correct code.
Comments?
Andrew.
2000-06-19 Andrew Haley <aph@cygnus.com>
* gc_priv.h (GC_test_and_set): Use a long rather than an int for a
register arg.
Index: gc_priv.h
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/gc_priv.h,v
retrieving revision 1.12
diff -p -2 -c -r1.12 gc_priv.h
*** gc_priv.h 2000/05/07 00:43:49 1.12
--- gc_priv.h 2000/06/19 19:03:37
*************** void GC_print_callers (/* struct callinf
*** 455,462 ****
# if defined(IA64)
inline static int GC_test_and_set(volatile unsigned int *addr) {
! int oldval;
__asm__ __volatile__("xchg4 %0=%1,%2"
: "=r"(oldval), "=m"(*addr)
! : "r"(1), "1"(*addr));
return oldval;
}
--- 455,462 ----
# if defined(IA64)
inline static int GC_test_and_set(volatile unsigned int *addr) {
! long oldval, n = 1;
__asm__ __volatile__("xchg4 %0=%1,%2"
: "=r"(oldval), "=m"(*addr)
! : "r"(n), "1"(*addr));
return oldval;
}