summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-28 05:11:24 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-28 05:27:47 +0000
commitd8d8f4c6a46fe8a5d7749ff44d9ecce367ec113d (patch)
treec9f044a8feef81d26ce12634403addc35f843ef4
parent58cd57cc699f7e6e5f00cf3403df5bdbbb1a4ea6 (diff)
downloadicon-d8d8f4c6a46fe8a5d7749ff44d9ecce367ec113d.tar.gz
illumos config (Dyson)
-rw-r--r--debian/patches/config-illumos.patch193
-rw-r--r--debian/patches/series1
2 files changed, 194 insertions, 0 deletions
diff --git a/debian/patches/config-illumos.patch b/debian/patches/config-illumos.patch
new file mode 100644
index 0000000..2c50932
--- /dev/null
+++ b/debian/patches/config-illumos.patch
@@ -0,0 +1,193 @@
+Index: icon/config/illumos/Makedefs
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ icon/config/illumos/Makedefs 2013-01-28 05:22:56.575161018 +0000
+@@ -0,0 +1,19 @@
++# CC C compiler
++# CFLAGS flags for building C files
++# CFDYN additional flags for dynamic functions
++# RLINK flags for linking run-time system
++# RLIBS libraries to link with run-time system
++# TLIBS libraries to link for POSIX threads
++# XLIBS libraries to link for graphics
++# XPMDEFS definitions for building XPM library
++# GDIR directory of graphics helper library
++
++CC = gcc
++CFDYN = -fPIC
++CFLAGS = -D_XOPEN_SOURCE=500
++RLINK =
++RLIBS = -lm
++TLIBS =
++XLIBS = -lX11
++XPMDEFS = -DZPIPE -DSYSV
++GDIR = xpm
+Index: icon/config/illumos/define.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ icon/config/illumos/define.h 2013-01-28 05:19:44.108605517 +0000
+@@ -0,0 +1,10 @@
++/*
++ * Icon configuration file for Sun Solaris using Gnu C compiler
++ */
++
++#define UNIX 1
++#define LoadFunc
++
++/* use gcc to compile generated code */
++#define CComp "gcc"
++#define COpts "-I/usr/openwin/include -ldl"
+Index: icon/config/illumos/i386.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ icon/config/illumos/i386.c 2013-01-28 05:19:44.109629642 +0000
+@@ -0,0 +1,71 @@
++/*
++ * Coswitch for Windows using Visual C++.
++ *
++ * Written by Frank J. Lhota, based on an assembly version
++ * authored by Robert Goldberg and modified for OS/2 2.0 by Mark
++ * Emmer.
++ */
++
++#include <sys/asm_linkage.h>
++#include <sys/trap.h>
++
++/*
++ * The Windows co-expression context consists of 5 words. The
++ * following constants define the byte offsets for each of the
++ * registers stored in the context.
++ */
++
++#define SP_OFF "0"
++#define BP_OFF "4"
++#define SI_OFF "8"
++#define DI_OFF "12"
++#define BX_OFF "16"
++
++int coswitch(old, new, first)
++int *old;
++int *new;
++int first;
++{
++
++ /* Save current context to *old */
++ __asm__ __volatile__ (
++ "movl %%esp," SP_OFF "(%0)\n\t"
++ "movl %%ebp," BP_OFF "(%0)\n\t"
++ "movl %%esi," SI_OFF "(%0)\n\t"
++ "movl %%edi," DI_OFF "(%0)\n\t"
++ "movl %%ebx," BX_OFF "(%0)"
++ : : "a"( old )
++ );
++
++ if ( first )
++ {
++ /* first != 0 => restore context in *new. */
++ __asm__ __volatile__ (
++ "movl " SP_OFF "(%0),%%esp\n\t"
++ "movl " BP_OFF "(%0),%%ebp\n\t"
++ "movl " SI_OFF "(%0),%%esi\n\t"
++ "movl " DI_OFF "(%0),%%edi\n\t"
++ "movl " BX_OFF "(%0),%%ebx"
++ : : "a"( new )
++ );
++ }
++ else
++ {
++ /*
++ * first == 0 => Set things up for first activation of this
++ * coexpression. Load stack pointer from first
++ * word of *new and call new_context, which
++ * should never return.
++ */
++ __asm__ __volatile__ (
++ "movl " SP_OFF "(%0),%%esp\n\t"
++ "movl %%esp,%%ebp"
++ : : "a"( new )
++ );
++ new_context( 0, NULL );
++ syserr( "interp() returned in coswitch" );
++ }
++
++ return 0;
++}
++
+Index: icon/config/illumos/sparc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ icon/config/illumos/sparc.c 2013-01-28 05:19:44.110617954 +0000
+@@ -0,0 +1,39 @@
++/*
++ * coswitch for Sun-4 Sparc.
++ *
++ * Compile this with 'gcc -c rswitch.c'. Do not use gcc -O.
++ */
++
++#include <sys/asm_linkage.h>
++#include <sys/trap.h>
++
++int coswitch(old_cs, new_cs, first)
++int *old_cs, *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 */
++ }
++}
+Index: icon/config/illumos/status
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ icon/config/illumos/status 2013-01-28 05:19:44.111999059 +0000
+@@ -0,0 +1,29 @@
++System configuration:
++
++ Intel architecture running the Dyson system
++ (GNU userland with illumos kernel and libc)
++ Debian derivative.
++
++Latest Icon version:
++
++ Version 9.4.3
++
++Installer:
++
++ Igor Pashev <pashev.igor@gmail.com>
++
++Missing features:
++
++ None
++
++Known bugs:
++
++ None
++
++Comments:
++
++ Tested under Dyson
++
++Date:
++
++ January 28, 2013
diff --git a/debian/patches/series b/debian/patches/series
index 0a37d66..17bce2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
debian-9.4.3-2.patch
+config-illumos.patch