Apparently pointers are also returned in %a0.

This commit is contained in:
ad 2007-11-29 17:12:21 +00:00
parent 935eacf351
commit 29d1edb61b
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: atomic_and.S,v 1.2 2007/11/29 17:09:32 ad Exp $ */
/* $NetBSD: atomic_and.S,v 1.3 2007/11/29 17:12:21 ad Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -50,6 +50,8 @@ ATOMIC_OP_ALIAS(atomic_and_uint,_atomic_and_32)
STRONG_ALIAS(_atomic_and_uint,_atomic_and_32)
ATOMIC_OP_ALIAS(atomic_and_ulong,_atomic_and_32)
STRONG_ALIAS(_atomic_and_ulong,_atomic_and_32)
ATOMIC_OP_ALIAS(atomic_and_ptr,_atomic_and_32)
STRONG_ALIAS(_atomic_and_ptr,_atomic_and_32)
ENTRY_NOPROFILE(_atomic_and_32_nv)
movl %sp@(4), %a0
@ -58,9 +60,12 @@ ENTRY_NOPROFILE(_atomic_and_32_nv)
andl %sp@(8), %d0
casl %d1, %d0, %a0@
bne 1b
movl %d0, %a0 /* pointers return also in %a0 */
rts
ATOMIC_OP_ALIAS(atomic_and_32_nv,_atomic_and_32_nv)
ATOMIC_OP_ALIAS(atomic_and_uint_nv,_atomic_and_32_nv)
STRONG_ALIAS(_atomic_and_uint_nv,_atomic_and_32_nv)
ATOMIC_OP_ALIAS(atomic_and_ulong_nv,_atomic_and_32_nv)
STRONG_ALIAS(_atomic_and_ulong_nv,_atomic_and_32_nv)
ATOMIC_OP_ALIAS(atomic_and_ptr_nv,_atomic_and_32_nv)
STRONG_ALIAS(_atomic_and_ptr_nv,_atomic_and_32_nv)

View File

@ -1,4 +1,4 @@
/* $NetBSD: atomic_or.S,v 1.2 2007/11/29 17:09:33 ad Exp $ */
/* $NetBSD: atomic_or.S,v 1.3 2007/11/29 17:12:22 ad Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -50,6 +50,8 @@ ATOMIC_OP_ALIAS(atomic_or_uint,_atomic_or_32)
STRONG_ALIAS(_atomic_or_uint,_atomic_or_32)
ATOMIC_OP_ALIAS(atomic_or_ulong,_atomic_or_32)
STRONG_ALIAS(_atomic_or_ulong,_atomic_or_32)
ATOMIC_OP_ALIAS(atomic_or_ptr,_atomic_or_32)
STRONG_ALIAS(_atomic_or_ptr,_atomic_or_32)
ENTRY_NOPROFILE(_atomic_or_32_nv)
movl %sp@(4), %a0
@ -58,9 +60,12 @@ ENTRY_NOPROFILE(_atomic_or_32_nv)
orl %sp@(8), %d0
casl %d1, %d0, %a0@
bne 1b
movl %d0, %a0 /* pointers return also in %a0 */
rts
ATOMIC_OP_ALIAS(atomic_or_32_nv,_atomic_or_32_nv)
ATOMIC_OP_ALIAS(atomic_or_uint_nv,_atomic_or_32_nv)
STRONG_ALIAS(_atomic_or_uint_nv,_atomic_or_32_nv)
ATOMIC_OP_ALIAS(atomic_or_ulong_nv,_atomic_or_32_nv)
STRONG_ALIAS(_atomic_or_ulong_nv,_atomic_or_32_nv)
ATOMIC_OP_ALIAS(atomic_or_ptr_nv,_atomic_or_32_nv)
STRONG_ALIAS(_atomic_or_ptr_nv,_atomic_or_32_nv)