#include <sys/asm_linkage.h>
#include <sys/trap.h>
#else
+#ifdef AFS_XBSD_ENV
+#include <machine/trap.h>
+#define ST_FLUSH_WINDOWS ST_FLUSHWIN
+#define MINFRAME 92
+#define SA(x) (((x)+7)&~7)
+#define STACK_ALIGN 8
+#else /* SunOS 4: */
#include <sun4/asm_linkage.h>
#include <sun4/trap.h>
#endif
+#endif
.data
#ifdef AFS_SUN5_ENV
.globl PRE_Block
END(returnto)
#endif
-#if defined(AFS_NCR_ENV) || defined(AFS_X86_ENV) || defined(AFS_DJGPP_ENV)
+#if defined(AFS_NCR_ENV) || defined(AFS_X86_ENV) || defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
/* Sun 386i... I hope this does the right thing!!!
*
* Written by Derek Atkins <warlord@MIT.EDU>
.set newsp,16
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
.globl _PRE_Block
.globl _savecontext
_savecontext:
pushl %ebp /* New Frame! */
movl %esp,%ebp
pusha /* Push all registers */
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
movl $1,_PRE_Block /* Pre-emption code */
#else
movl $1,PRE_Block /* Pre-emption code */
/* Shouldnt be here....*/
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
call _abort
#else
call abort
/* stack offset */
.set area2,8
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
.globl _returnto
_returnto:
#else
movl area2(%ebp),%eax /* eax = area2 */
movl (%eax),%esp /* restore esp */
popa
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
movl $0,_PRE_Block /* clear it up... */
#else
movl $0,PRE_Block /* clear it up... */
/* I see, said the blind man, as he picked up his hammer and saw! */
pushl $1234
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
call _abort
#else
call abort