summaryrefslogtreecommitdiff
path: root/config/aix
diff options
context:
space:
mode:
Diffstat (limited to 'config/aix')
-rw-r--r--config/aix/Makedefs19
-rw-r--r--config/aix/define.h6
-rw-r--r--config/aix/rswitch.s52
-rw-r--r--config/aix/status33
4 files changed, 110 insertions, 0 deletions
diff --git a/config/aix/Makedefs b/config/aix/Makedefs
new file mode 100644
index 0000000..573c5f3
--- /dev/null
+++ b/config/aix/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 -qMAXMEM=9999
+CFDYN =
+RLINK =
+RLIBS = -lm
+TLIBS =
+XLIBS = -lX11
+XPMDEFS = -DZPIPE
+GDIR = xpm
diff --git a/config/aix/define.h b/config/aix/define.h
new file mode 100644
index 0000000..c4e3ddd
--- /dev/null
+++ b/config/aix/define.h
@@ -0,0 +1,6 @@
+/*
+ * Icon configuration file for IBM RS/6000 running AIX 4.2 or newer
+ */
+
+#define UNIX 1
+#define LoadFunc /* requires 4.2 or newer */
diff --git a/config/aix/rswitch.s b/config/aix/rswitch.s
new file mode 100644
index 0000000..45a1341
--- /dev/null
+++ b/config/aix/rswitch.s
@@ -0,0 +1,52 @@
+# coswitch(old, new, first)
+# GPR3 GPR4 GPR5
+
+ .file "rswitch.s"
+ .extern .new_context{PR}
+ .extern .syserr{PR}
+ .globl .coswitch[PR]
+ .csect .coswitch[PR]
+
+ .set r0, 0
+ .set SP, 1
+ .set TOC, 2
+ .set OLD, 3
+ .set NEW, 4
+ .set FIRST, 5
+ .set RSIZE, 80 # room for regs 13-31, rounded up mod16
+
+.coswitch:
+ stu SP, -RSIZE(SP) # allocate stack frame
+
+ # Save Old Context:
+ st SP, 0(OLD) # SP
+ st TOC, 4(OLD) # TOC
+ mflr r0
+ st r0, 8(OLD) # LR (return address)
+ mfcr r0
+ st r0, 12(OLD) # CR
+ stm 13, -RSIZE(SP) # GPRs 13-31 (save on stack)
+
+ cmpi 0, FIRST, 0
+ beq first # if first time
+
+ # Restore new context:
+ l SP, 0(NEW) # SP
+ l TOC, 4(NEW) # TOC
+ l r0, 8(NEW) # LR
+ mtlr r0
+ l r0, 12(NEW) # CR
+ mtcr r0
+ lm 13, -RSIZE(SP) # GPRs 13-31 (from stack)
+
+ ai SP, SP, RSIZE # deallocate stack frame
+ brl # return into new context
+
+first: # First-time call:
+ l SP, 0(NEW) # SP as figured by Icon
+ ai SP, SP, -64(SP) # save area for callee
+ cal OLD, 0(r0) # arg1
+ cal NEW, 0(r0) # arg2
+ bl .new_context{PR} # new_context(0,0)
+ cal OLD, 0(r0)
+ bl .syserr{PR}
diff --git a/config/aix/status b/config/aix/status
new file mode 100644
index 0000000..40f9880
--- /dev/null
+++ b/config/aix/status
@@ -0,0 +1,33 @@
+System configuration:
+
+ IBM RS/6000 running AIX v4.2 or newer
+
+Latest Icon version:
+
+ Version 9.4.1
+
+Installer:
+
+ Gregg Townsend
+ Icon Project
+ The University of Arizona
+
+Missing features:
+
+ None
+
+Known bugs:
+
+ None
+
+Comments:
+
+ Tested on an RS/6000 running AIX 4.3.
+
+ AIX Version 4.2 or newer is needed for loadfunc().
+ Although loadfunc() is enabled, I've never succeeded in
+ building a loadable library that it finds acceptable.
+
+Date:
+
+ February 15, 2002