summaryrefslogtreecommitdiff
path: root/config/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'config/macintosh')
-rw-r--r--config/macintosh/Makedefs21
-rw-r--r--config/macintosh/define.h8
-rw-r--r--config/macintosh/powerpc.s52
-rw-r--r--config/macintosh/status43
4 files changed, 124 insertions, 0 deletions
diff --git a/config/macintosh/Makedefs b/config/macintosh/Makedefs
new file mode 100644
index 0000000..381b077
--- /dev/null
+++ b/config/macintosh/Makedefs
@@ -0,0 +1,21 @@
+# 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
+# SFLAGS flags for stripping iconx
+
+CC = cc
+CFLAGS = -I/usr/X11R6/include
+CFDYN =
+RLINK = -dynamic
+RLIBS = -lm
+TLIBS =
+XLIBS = -L/usr/X11R6/lib -lX11
+XPMDEFS = -DZPIPE -I/usr/X11R6/include
+GDIR = xpm
+SFLAGS = -Sx
diff --git a/config/macintosh/define.h b/config/macintosh/define.h
new file mode 100644
index 0000000..e1857dd
--- /dev/null
+++ b/config/macintosh/define.h
@@ -0,0 +1,8 @@
+/*
+ * Icon configuration file for Macintosh
+ */
+
+#define UNIX 1
+#define LoadFunc
+
+#define NamedSemaphores /* unnamed sempahores not implemented by OS 10.4 */
diff --git a/config/macintosh/powerpc.s b/config/macintosh/powerpc.s
new file mode 100644
index 0000000..71724a6
--- /dev/null
+++ b/config/macintosh/powerpc.s
@@ -0,0 +1,52 @@
+# coswitch(old, new, first)
+# GPR3 GPR4 GPR5
+
+# This code is modeled after the ppc_aix context switch
+# it was compared to the Darwin context switch routine to
+# get the syntax correct for the Apple gcc compiler.
+.macro ENTRY
+ .text
+ .align 2
+ .globl $0
+$0:
+.endmacro
+
+ .file "rswitch.s"
+ .set RSIZE, 80 ; room for regs 13-31, rounded up mod16
+
+ ENTRY _coswitch
+
+ stwu r1, -RSIZE(r1) ; allocate stack frame
+
+ ; Save Old Context:
+ stw r1, 0(r3) ; SP
+ stw r2, 4(r3) ; TOC
+ mflr r0
+ stw r0, 8(r3) ; LR (return address)
+ mfcr r0
+ stw r0, 12(r3) ; CR
+ stmw r13, -RSIZE(r1) ; GPRs 13-31 (save on stack)
+
+ cmpi 0, r5, 0
+ beq first ; if first time
+
+ ; Restore new context:
+ lwz r1, 0(r4) ; SP
+ lwz r2, 4(r4) ; TOC
+ lwz r0, 8(r4) ; LR
+ mtlr r0
+ lwz r0, 12(r4) ; CR
+ mtcr r0
+ lmw r13, -RSIZE(r1) ; GPRs 13-31 (from stack)
+
+ addic r1, r1, RSIZE ; deallocate stack frame
+ blr ; return into new context
+
+first: ; First-time call:
+ lwz r1, 0(r4) ; SP as figured by Icon
+ addic r1, r1, -64 ; save area for callee
+ addi r3, 0, 0 ; arg1
+ addi r4, 0, 0 ; arg2
+ bl _new_context ; new_context(0,0)
+ addi r3, 0, 0
+ bl _syserr
diff --git a/config/macintosh/status b/config/macintosh/status
new file mode 100644
index 0000000..43dffac
--- /dev/null
+++ b/config/macintosh/status
@@ -0,0 +1,43 @@
+System configuration:
+
+ Apple Macintosh running OS X (10.1 or newer)
+
+Latest Icon version:
+
+ Version 9.4.3
+
+Installer:
+
+ Gregg Townsend
+ Icon Project
+ The University of Arizona
+
+Missing features:
+
+ None
+
+Known bugs:
+
+ None
+
+Comments:
+
+ See the special Macintosh page in the documentation directory.
+
+ Icon runs on Darwin, which is (loosely speaking) the
+ command-line-based Unix substructure of MacOS X. The
+ Xcode Developer Tools must be installed. (These come
+ with MacOS on a CD that is not always installed.)
+
+ An Icon installation with graphics requires the X11 window
+ system, available from Apple but not always installed.
+ To install Icon without graphics, use "make Configure"
+ instead of "make X-Configure" when building.
+
+ This configuration can use pthreads for context switching.
+
+ Tested with MacOS 10.4.3 (Tiger).
+
+Date:
+
+ November 10, 2005