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.
This commit is contained in:
parent
286cc49014
commit
c8baa23e56
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117955
@ -458,6 +458,23 @@ alpha_pal_rdval(void)
|
||||
return v0;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user