diff options
Diffstat (limited to 'config/solaris_sunc')
-rw-r--r-- | config/solaris_sunc/Makedefs | 19 | ||||
-rw-r--r-- | config/solaris_sunc/define.h | 9 | ||||
-rw-r--r-- | config/solaris_sunc/sparc.c | 37 | ||||
-rw-r--r-- | config/solaris_sunc/status | 32 |
4 files changed, 97 insertions, 0 deletions
diff --git a/config/solaris_sunc/Makedefs b/config/solaris_sunc/Makedefs new file mode 100644 index 0000000..e5bb495 --- /dev/null +++ b/config/solaris_sunc/Makedefs @@ -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 = cc +CFLAGS = -O -w -I/usr/openwin/include +CFDYN = -KPIC +RLINK = +RLIBS = -lm -ldl +TLIBS = -lposix4 -lpthread +XLIBS = -L /usr/openwin/lib -R/usr/openwin/lib -lX11 +XPMDEFS = -DZPIPE -DSYSV +GDIR = xpm diff --git a/config/solaris_sunc/define.h b/config/solaris_sunc/define.h new file mode 100644 index 0000000..d4789bb --- /dev/null +++ b/config/solaris_sunc/define.h @@ -0,0 +1,9 @@ +/* + * Icon configuration file for Solaris 2.x with SunPro C compiler + */ + +#define UNIX 1 +#define LoadFunc + +#define CComp "cc" +#define COpts "-I/usr/openwin/include -ldl" diff --git a/config/solaris_sunc/sparc.c b/config/solaris_sunc/sparc.c new file mode 100644 index 0000000..b712211 --- /dev/null +++ b/config/solaris_sunc/sparc.c @@ -0,0 +1,37 @@ +/* + * coswitch for Sun-4 Sparc. + */ + +#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 */ + } +} diff --git a/config/solaris_sunc/status b/config/solaris_sunc/status new file mode 100644 index 0000000..54d26dc --- /dev/null +++ b/config/solaris_sunc/status @@ -0,0 +1,32 @@ +System configuration: + + Sun Solaris 2.x with the Sun WorkShop compiler + +Latest Icon version: + + Version 9.4.3 + +Installer: + + Gregg Townsend + Icon Project + The University of Arizona + +Missing features: + + None + +Known bugs: + + None + +Comments: + + Tested on Sun SPARC systems running Solaris 2.6 (WorkShop C 4.2) + and Solaris 9 (WorkShop C 5.0). + + This configuration can use pthreads for context switching. + +Date: + + November 8, 2005 |