diff options
author | marcel <marcel@FreeBSD.org> | 2003-07-24 07:41:08 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-07-24 07:41:08 +0000 |
commit | ff7ebb21b78e670173e40936db94922848426386 (patch) | |
tree | 22a52fa98ab69e4a62b02ada086be9eea733a60c | |
parent | 0a0278c533d4d14ccf3d87e4bf1707eb72b143db (diff) | |
download | FreeBSD-src-ff7ebb21b78e670173e40936db94922848426386.zip FreeBSD-src-ff7ebb21b78e670173e40936db94922848426386.tar.gz |
Implement alpha_pal_wrunique() and alpha_pal_rdunique(). Both are
used to set and get the thread pointer. Note that a context switch
will automaticly save and restore the thread pointer.
-rw-r--r-- | sys/alpha/include/alpha_cpu.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/alpha/include/alpha_cpu.h b/sys/alpha/include/alpha_cpu.h index d1b3436..32b00ff 100644 --- a/sys/alpha/include/alpha_cpu.h +++ b/sys/alpha/include/alpha_cpu.h @@ -459,6 +459,23 @@ alpha_pal_rdval(void) } static __inline void +alpha_pal_wrunique(u_int64_t tp) +{ + register u_int64_t a0 __asm__("$16") = tp; + __asm__ __volatile__("call_pal 0x9f # PAL_wrunique" + : "+r" (a0) : : "$1", "$22", "$23", "$24", "$25"); +} + +static __inline u_int64_t +alpha_pal_rdunique(void) +{ + register u_int64_t v0 __asm__("$0"); + __asm__ __volatile__("call_pal 0x9e # PAL_rdunique" + : "=r" (v0) : : "$1", "$22", "$23", "$24", "$25"); + return (v0); +} + +static __inline void alpha_pal_tbi(u_int64_t op, u_int64_t va) { register u_int64_t a0 __asm__("$16") = op; |