Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/include apply some always_inline attribute to...
details: https://anonhg.NetBSD.org/src/rev/221634b5c61e
branches: trunk
changeset: 768911:221634b5c61e
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Aug 28 22:30:09 2011 +0000
description:
apply some always_inline attribute to setpsr and spl*. while i am
not yet sure exactly why this is necessary, but does avoid crashes
seen on sparc INSTALL with gcc 4.5.
diffstat:
sys/arch/sparc/include/psl.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (62 lines):
diff -r 8437b219ea8b -r 221634b5c61e sys/arch/sparc/include/psl.h
--- a/sys/arch/sparc/include/psl.h Sun Aug 28 22:09:36 2011 +0000
+++ b/sys/arch/sparc/include/psl.h Sun Aug 28 22:30:09 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psl.h,v 1.47 2011/07/16 11:15:52 nakayama Exp $ */
+/* $NetBSD: psl.h,v 1.48 2011/08/28 22:30:09 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -232,7 +232,7 @@
/*
* GCC pseudo-functions for manipulating PSR (primarily PIL field).
*/
-static __inline int
+static __inline __attribute__((__always_inline__)) int
getpsr(void)
{
int psr;
@@ -241,7 +241,7 @@
return (psr);
}
-static __inline int
+static __inline __attribute__((__always_inline__)) int
getmid(void)
{
int mid;
@@ -250,14 +250,14 @@
return ((mid >> 20) & 0x3);
}
-static __inline void
+static __inline __attribute__((__always_inline__)) void
setpsr(int newpsr)
{
__asm volatile("wr %0,0,%%psr" : : "r" (newpsr) : "memory");
__asm volatile("nop; nop; nop");
}
-static __inline void
+static __inline __attribute__((__always_inline__)) void
spl0(void)
{
int psr, oldipl;
@@ -284,7 +284,7 @@
* into the ipl field.)
*/
#define _SPLSET(name, newipl) \
-static __inline void name(void) \
+static __inline __attribute__((__always_inline__)) void name(void) \
{ \
int psr; \
__asm volatile("rd %%psr,%0" : "=r" (psr)); \
@@ -341,7 +341,7 @@
#define splzs() splraiseipl(makeiplcookie(IPL_ZS))
/* splx does not have a return value */
-static __inline void
+static __inline __attribute__((__always_inline__)) void
splx(int newipl)
{
int psr;
Home |
Main Index |
Thread Index |
Old Index