* sysdep/powerpc/locks.h: Use 64-bit versions of primitives when
__LP64__ is defined rather than __powerpc64__.
(compare_and_swap): 'ret' is an obj_addr_t not just an int.
(compare_and_swap_release): Likewise.
From-SVN: r104746
+2005-09-28 Geoffrey Keating <geoffk@apple.com>
+
+ * sysdep/powerpc/locks.h: Use 64-bit versions of primitives when
+ __LP64__ is defined rather than __powerpc64__.
+ (compare_and_swap): 'ret' is an obj_addr_t not just an int.
+ (compare_and_swap_release): Likewise.
+
2005-09-28 David Daney <ddaney@avtrex.com>
* HACKING: Update instructions for classpath import.
#ifndef __SYSDEP_LOCKS_H__
#define __SYSDEP_LOCKS_H__
-#ifdef __powerpc64__
+#ifdef __LP64__
#define _LARX "ldarx "
#define _STCX "stdcx. "
#else
compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
obj_addr_t new_val)
{
- int ret;
+ obj_addr_t ret;
__asm__ __volatile__ (
"0: " _LARX "%0,0,%1 \n"
compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
obj_addr_t new_val)
{
- int ret;
+ obj_addr_t ret;
__asm__ __volatile__ ("sync" : : : "memory");