diff options
author | jake <jake@FreeBSD.org> | 2003-04-01 02:37:04 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-04-01 02:37:04 +0000 |
commit | 48ae97193ab7383182fc11ea2f8b55af40cb1533 (patch) | |
tree | 69d4752481b41257e1681664f788e5740c6394d8 | |
parent | c724e78c22f4c4ebc3f06fa701fd6870225a6629 (diff) | |
download | FreeBSD-src-48ae97193ab7383182fc11ea2f8b55af40cb1533.zip FreeBSD-src-48ae97193ab7383182fc11ea2f8b55af40cb1533.tar.gz |
Implement casuptr.
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 7 | ||||
-rw-r--r-- | sys/sparc64/sparc64/support.S | 23 |
2 files changed, 23 insertions, 7 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index b662961..fa2ba40 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -703,10 +703,3 @@ set_fpregs(struct thread *td, struct fpreg *fpregs) tf->tf_gsr = fpregs->fr_gsr; return (0); } - -intptr_t -casuptr(intptr_t *p, intptr_t old, intptr_t new) -{ - return (-1); -} - diff --git a/sys/sparc64/sparc64/support.S b/sys/sparc64/sparc64/support.S index 649f0b8..b701f04 100644 --- a/sys/sparc64/sparc64/support.S +++ b/sys/sparc64/sparc64/support.S @@ -402,6 +402,29 @@ fs_nofault_begin: .set susword, suword16 .set suword, suword64 + .globl casuptr, fuptr, suptr + .set casuptr, casuword64 + .set fuptr, fuword64 + .set suptr, suword64 + +/* + * int32_t casuword32(volatile int32_t *p, int32_t e, int32_t s) + */ +ENTRY(casuword32) + casa [%o0] ASI_AIUP, %o1, %o2 + retl + mov %o2, %o0 +END(casuword32) + +/* + * int64_t casuword64(volatile int64_t *p, int64_t e, int64_t s) + */ +ENTRY(casuword64) + casxa [%o0] ASI_AIUP, %o1, %o2 + retl + mov %o2, %o0 +END(casuword64) + /* * int fuword8(const void *base) */ |