summaryrefslogtreecommitdiff
path: root/config/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'config/bsd')
-rw-r--r--config/bsd/alpha.s46
-rw-r--r--config/bsd/define.h4
-rw-r--r--config/bsd/i386.c23
-rw-r--r--config/bsd/m68k.c25
-rw-r--r--config/bsd/powerpc.s78
-rw-r--r--config/bsd/sparc.c33
-rw-r--r--config/bsd/status8
-rw-r--r--config/bsd/vax.c38
8 files changed, 3 insertions, 252 deletions
diff --git a/config/bsd/alpha.s b/config/bsd/alpha.s
deleted file mode 100644
index 6c9ba72..0000000
--- a/config/bsd/alpha.s
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * coswitch(old_cs, new_cs, first) for DEC Alpha architecture
- * $16 $17 $18
- */
- .data
-errmsg: .ascii "new_context() returned in coswitch\X00"
-
- .text
- .globl coswitch
- .ent coswitch
-coswitch:
- lda $sp, -72($sp) /* make room on stack */
- stq $sp, 0($16) /* save stack pointer */
- stq $9, 0($sp) /* save registers on stack */
- stq $10, 8($sp)
- stq $11, 16($sp)
- stq $12, 24($sp)
- stq $13, 32($sp)
- stq $14, 40($sp)
- stq $15, 48($sp)
- stq $27, 56($sp)
- stq $26, 64($sp) /* return address */
- beq $18, first /* if first time */
-
- ldq $sp, 0($17) /* load new stack pointer */
- ldq $9, 0($sp) /* load registers from stack */
- ldq $10, 8($sp)
- ldq $11, 16($sp)
- ldq $12, 24($sp)
- ldq $13, 32($sp)
- ldq $14, 40($sp)
- ldq $15, 48($sp)
- ldq $27, 56($sp)
- ldq $26, 64($sp) /* return address */
- lda $sp, 72($sp) /* reset sp */
- jsr_coroutine $31, ($26), 0 /* jump into new_context */
-
-first:
- ldq $sp, 0($17) /* load stack pointer only */
- bis $31, $31, $16 /* r16 = 0 */
- bis $31, $31, $17 /* r17 = 0 */
- jsr $26, new_context /* new_context(0,0) */
- lda $16, errmsg
- jsr $26, syserr /* shouldn't get here */
-
- .end coswitch
diff --git a/config/bsd/define.h b/config/bsd/define.h
index 1859df0..e1adb04 100644
--- a/config/bsd/define.h
+++ b/config/bsd/define.h
@@ -4,7 +4,3 @@
#define UNIX 1
#define LoadFunc
-
-#define CComp "gcc"
-#define COpts "-O -I/usr/X11R6/include"
-#define ICONC_XLIB "-Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -lX11"
diff --git a/config/bsd/i386.c b/config/bsd/i386.c
deleted file mode 100644
index 1eecd7c..0000000
--- a/config/bsd/i386.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * coswitch for the i386 architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm ("movl 8(%ebp),%eax");
- asm ("movl %esp,0(%eax)");
- asm ("movl %ebp,4(%eax)");
- asm ("movl 12(%ebp),%eax");
-
- if (first == 0) { /* this is the first activation */
- asm ("movl 0(%eax),%esp");
- asm ("movl $0,%ebp");
- new_context (0, 0);
- syserr ("new_context() returned in coswitch");
- }
- else {
- asm ("movl 0(%eax),%esp");
- asm ("movl 4(%eax),%ebp");
- }
-}
diff --git a/config/bsd/m68k.c b/config/bsd/m68k.c
deleted file mode 100644
index 077922b..0000000
--- a/config/bsd/m68k.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * coswitch for the m68k architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm ("movl %a6@(8),%a0"); /* a0 = old */
- asm ("movl %a6@(12),%a1"); /* a1 = new */
- asm ("movl %a7,%a0@"); /* save sp in cstate[0] */
- asm ("movl %a6,%a0@(4)"); /* save a6 (fp) in cstate[0] */
- asm ("moveml #0x3cfc,%a0@(8)"); /* store d2-d7, a2-a6 in old->cstate */
-
- if (first == 0) { /* this is first activation */
- asm ("movl %a1@,%a7");
- asm ("movl #0,%a6");
- new_context (0, 0);
- syserr ("new_context() returned in coswitch");
- }
- else {
- asm ("movl %a1@,%a7"); /* restore sp */
- asm ("movl %a1@(4),%a6"); /* restore fp */
- asm ("moveml %a1@(8),#0x3cfc"); /* restore d2-d7, a2-a6 */
- }
-}
diff --git a/config/bsd/powerpc.s b/config/bsd/powerpc.s
deleted file mode 100644
index 8044959..0000000
--- a/config/bsd/powerpc.s
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# coswitch for the PowerPC architecture
-#
-
- .file "rswitch.s"
-
- .data
-errmsg: .string "new_context() returned in coswitch\n"
-
- .text
- .align 2
- .globl coswitch
- .type coswitch,@function
-
-coswitch:
- stwu 1, -80(1) # allocate stack frame
-
- # Save Old Context:
- stw 1, 0(3) # SP
- mflr 0
- stw 0, 4(3) # LR (return address)
- stw 14, 0(1) # GPRs 14-31 (save on stack)
- stw 15, 4(1)
- stw 16, 8(1)
- stw 17, 12(1)
- stw 18, 16(1)
- stw 19, 20(1)
- stw 20, 24(1)
- stw 21, 28(1)
- stw 22, 32(1)
- stw 23, 36(1)
- stw 24, 40(1)
- stw 25, 44(1)
- stw 26, 48(1)
- stw 27, 52(1)
- stw 28, 56(1)
- stw 29, 60(1)
- stw 30, 64(1)
- stw 31, 68(1)
-
- cmpi 0, 5, 0
- beq first # if first time
-
- # Restore new context:
- lwz 1, 0(4) # SP
- lwz 0, 4(4) # LR
- mtlr 0
- lwz 14, 0(1) # GPRs 14-31 (from stack)
- lwz 15, 4(1)
- lwz 16, 8(1)
- lwz 17, 12(1)
- lwz 18, 16(1)
- lwz 19, 20(1)
- lwz 20, 24(1)
- lwz 21, 28(1)
- lwz 22, 32(1)
- lwz 23, 36(1)
- lwz 24, 40(1)
- lwz 25, 44(1)
- lwz 26, 48(1)
- lwz 27, 52(1)
- lwz 28, 56(1)
- lwz 29, 60(1)
- lwz 30, 64(1)
- lwz 31, 68(1)
-
- addic 1, 1, 80 # deallocate stack frame
- blr # return into new context
-
-first: # First-time call:
- lwz 1, 0(4) # SP as figured by Icon
- addic 1, 1, -64 # save area for callee
- addi 3, 0, 0 # arg1
- addi 4, 0, 0 # arg2
- bl new_context # new_context(0,0)
- lis 3, errmsg@ha
- la 3, errmsg@l(3)
- bl syserr
diff --git a/config/bsd/sparc.c b/config/bsd/sparc.c
deleted file mode 100644
index 4f2215c..0000000
--- a/config/bsd/sparc.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * coswitch for the SPARC architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm("ta 0x03"); /* ST_FLUSH_WINDOWS in trap.h */
- asm("ld [%fp+0x44], %o0"); /* load old_cs into %o0 */
- asm("st %sp,[%o0]"); /* Save user stack pointer */
- asm("st %fp,[%o0+0x4]"); /* Save frame pointer */
- asm("st %i7,[%o0+0x8]"); /* Save return address */
-
- if (first == 0) { /* this is the first activation */
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0], %o1"); /* load %o1 from cstate[0] */
-
- /* Decrement new stack pointer value before loading it into sp. */
- /* The top 64 bytes of the stack are reserved for the kernel, to */
- /* save the 8 local and 8 in registers into, on context switches, */
- /* interrupts, traps, etc. */
-
- asm("save %o1,-96, %sp"); /* load %sp from %o1 */
- new_context(0,0);
- syserr("new_context() returned in coswitch");
-
- } else {
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0+0x4],%fp"); /* Load frame pointer */
- asm("ld [%o0+0x8],%i7"); /* Load return address */
- asm("ld [%o0],%sp"); /* Load user stack pointer */
- }
-}
diff --git a/config/bsd/status b/config/bsd/status
index e0fba53..4179d1f 100644
--- a/config/bsd/status
+++ b/config/bsd/status
@@ -4,7 +4,7 @@ System configuration:
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
@@ -25,10 +25,8 @@ Comments:
This configuration is for FreeBSD, NetBSD, and OpenBSD.
For Darwin (Apple Macintosh), use the "macintosh" configuration.
- This configuration can use pthreads for context switching.
-
- Tested on FreeBSD 6.0-beta5 (i386 and amd64).
+ Tested on OpenBSD 4.6.
Date:
- November 10, 2005
+ March 26, 2010
diff --git a/config/bsd/vax.c b/config/bsd/vax.c
deleted file mode 100644
index 52d30f9..0000000
--- a/config/bsd/vax.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * coswitch for the VAX architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm ("movl 4(%ap),%r0");
- asm ("movl 8(%ap),%r1");
- asm ("movl %sp,0(%r0)");
- asm ("movl %fp,4(%r0)");
- asm ("movl %ap,8(%r0)");
- asm ("movl %r11,16(%r0)");
- asm ("movl %r10,20(%r0)");
- asm ("movl %r9,24(%r0)");
- asm ("movl %r8,28(%r0)");
- asm ("movl %r7,32(%r0)");
- asm ("movl %r6,36(%r0)");
-
- if (first == 0) { /* this is the first activation */
- asm ("movl 0(%r1),%sp");
- asm ("clrl %fp");
- asm ("clrl %ap");
- new_context (0,0);
- syserr ("new_context() returned in coswitch");
- }
- else {
- asm ("movl 0(%r1),%sp");
- asm ("movl 4(%r1),%fp");
- asm ("movl 8(%r1),%ap");
- asm ("movl 16(%r1),%r11");
- asm ("movl 20(%r1),%r10");
- asm ("movl 24(%r1),%r9");
- asm ("movl 28(%r1),%r8");
- asm ("movl 32(%r1),%r7");
- asm ("movl 36(%r1),%r6");
- }
-}