diff options
author | jhb <jhb@FreeBSD.org> | 2001-02-22 15:39:58 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-02-22 15:39:58 +0000 |
commit | 1fcc4482e82d35fa8ffef0099e01dc9bb0b07e36 (patch) | |
tree | d72ce1d3000d0d6f0a47671d3fa041d02c058a40 | |
parent | 57e83d23b7fb4cd51a38f8a279b74fbc565edcbb (diff) | |
download | FreeBSD-src-1fcc4482e82d35fa8ffef0099e01dc9bb0b07e36.zip FreeBSD-src-1fcc4482e82d35fa8ffef0099e01dc9bb0b07e36.tar.gz |
Add a inline function to read the psr.
-rw-r--r-- | sys/ia64/include/ia64_cpu.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h index bd91987..ca6c112 100644 --- a/sys/ia64/include/ia64_cpu.h +++ b/sys/ia64/include/ia64_cpu.h @@ -221,6 +221,17 @@ ia64_ptc_l(u_int64_t va, u_int64_t log2size) } /* + * Read the value of psr. + */ +static __inline u_int64_t +ia64_get_psr(void) +{ + u_int64_t result; + __asm __volatile("mov %0=psr;;" : "=r" (result)); + return result; +} + +/* * Read the value of ar.k0. */ static __inline u_int64_t |