$OpenBSD: patch-sal_osl_unx_asm_interlck_sparc_s,v 1.2 2010/06/26 15:48:12 robert Exp $
--- sal/osl/unx/asm/interlck_sparc.s.orig.port	Wed May 26 20:28:29 2010
+++ sal/osl/unx/asm/interlck_sparc.s	Fri Jun 25 23:56:14 2010
@@ -65,7 +65,7 @@ osl_decrementInterLockCountFuncPtr:
 
 .section   ".text"
 
-#if defined(NETBSD) || defined(LINUX)
+#if defined(NETBSD) || defined(LINUX) || defined(OPENBSD)
 /* add the address of the calling "call" instruction (stored in %o7) to
  * %o5 which contains _GLOBAL_OFFSET_TABLE_
  */
@@ -79,7 +79,7 @@ osl_decrementInterLockCountFuncPtr:
 
 osl_incrementInterlockedCount:
 
-#if defined(NETBSD) || defined(LINUX)
+#if defined(NETBSD) || defined(LINUX) || defined(OPENBSD)
         mov     %o7, %g1
         sethi   %hi(_GLOBAL_OFFSET_TABLE_-4), %o5
         call    .Laddoseven
@@ -102,7 +102,7 @@ osl_incrementInterlockedCount:
 
 osl_decrementInterlockedCount:
 
-#if defined(NETBSD) || defined(LINUX)
+#if defined(NETBSD) || defined(LINUX) || defined(OPENBSD)
         mov     %o7, %g1
         sethi   %hi(_GLOBAL_OFFSET_TABLE_-4), %o5
         call    .Laddoseven
@@ -110,7 +110,7 @@ osl_decrementInterlockedCount:
         mov     %g1, %o7
 #endif
         set     osl_decrementInterLockCountFuncPtr, %o1
-#if defined(NETBSD) || defined(LINUX)
+#if defined(NETBSD) || defined(LINUX) || defined(OPENBSD)
         ld      [%o1 + %o5], %o1
 #endif
         ld      [%o1], %o1
@@ -125,7 +125,7 @@ osl_decrementInterlockedCount:
 
 osl_InterlockedCountSetV9:
 
-#if defined(NETBSD) || defined(LINUX)
+#if defined(NETBSD) || defined(LINUX) || defined(OPENBSD)
         mov	    %o7, %g1
         sethi	%hi(_GLOBAL_OFFSET_TABLE_-4), %o5
         call	.Laddoseven
@@ -139,7 +139,7 @@ osl_InterlockedCountSetV9:
         nop                                             ! delay slot
         set     osl_incrementInterlockedCountV8, %o0
         set     osl_decrementInterlockedCountV8, %o3
-#if defined(NETBSD) || defined(LINUX)
+#if defined(NETBSD) || defined(LINUX) || defined(OPENBSD)
         ld      [%o0 + %o5], %o0
         ld      [%o1 + %o5], %o1
         ld      [%o2 + %o5], %o2
@@ -150,7 +150,7 @@ osl_InterlockedCountSetV9:
         st      %o0,[%o1]
 1:      set     osl_incrementInterlockedCountV9, %o0
         set     osl_decrementInterlockedCountV9, %o3
-#if defined(NETBSD) || defined(LINUX)
+#if defined(NETBSD) || defined(LINUX) || defined(OPENBSD)
         ld      [%o0 + %o5], %o0
         ld      [%o1 + %o5], %o1
         ld      [%o2 + %o5], %o2
