From 7cb1400ba0d9ee63e61d4811b6e77db3189ae310 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Mon, 8 Nov 1993 06:20:11 +0000 Subject: [PATCH] Add RS6000 support. --- v7/src/microcode/config.h | 12 +++++++++++- v7/src/microcode/oscond.h | 15 ++++++++++++--- v7/src/microcode/unxutl/config | 7 ++++++- v7/src/microcode/ux.h | 8 ++++++-- v7/src/microcode/uxterm.c | 8 ++++---- v7/src/microcode/uxtrap.h | 22 ++++++++++++++++++---- v7/src/microcode/wsize.c | 13 +++++++------ 7 files changed, 64 insertions(+), 21 deletions(-) diff --git a/v7/src/microcode/config.h b/v7/src/microcode/config.h index 696376049..8135672cf 100644 --- a/v7/src/microcode/config.h +++ b/v7/src/microcode/config.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: config.h,v 9.82 1993/10/27 01:41:39 gjr Exp $ +$Id: config.h,v 9.83 1993/11/08 06:14:41 gjr Exp $ Copyright (c) 1987-1993 Massachusetts Institute of Technology @@ -191,6 +191,7 @@ typedef unsigned long SCHEME_OBJECT; #define FASL_APOLLO_68K 16 #define FASL_APOLLO_PRISM 17 #define FASL_ALPHA 18 +#define FASL_RS6000 19 #ifdef vax @@ -610,6 +611,15 @@ extern void * alpha_heap_malloc (long); #define HAS_FLOOR #define HAS_FREXP #endif /* apollo */ + +#ifdef _IBMR2 +#define MACHINE_TYPE "IBM RS6000" +#define FASL_INTERNAL_FORMAT FASL_RS6000 +/* Heap is not in Low Memory. */ +#define FLONUM_MANTISSA_BITS 53 +#define FLONUM_EXPT_SIZE 10 +#define MAX_FLONUM_EXPONENT 1023 +#endif /* _IBMR2 */ #ifdef NATIVE_CODE_IS_C # ifndef HAS_COMPILER_SUPPORT diff --git a/v7/src/microcode/oscond.h b/v7/src/microcode/oscond.h index fc76af04f..8be6bc336 100644 --- a/v7/src/microcode/oscond.h +++ b/v7/src/microcode/oscond.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: oscond.h,v 1.14 1993/06/24 06:09:34 gjr Exp $ +$Id: oscond.h,v 1.15 1993/11/08 06:15:20 gjr Exp $ Copyright (c) 1990-1993 Massachusetts Institute of Technology @@ -46,6 +46,11 @@ MIT in each case. */ # define _BSD4_3 #endif +#if defined(_AIX) +# define _POSIX +# define _BSD4_3 +#endif + #if defined(__hpux) && !defined(hpux) #define hpux #endif @@ -148,8 +153,12 @@ MIT in each case. */ #define _BSD4_2 #endif -#if defined(_BSD4_2) || defined(_BSD4_3) -#define _BSD +#if defined(_BSD4_3) +#define _BSD 43 +#else +#if defined(_BSD4_2) +#define _BSD 42 +#endif #endif #if defined(_BSD) && defined(_SYSV) diff --git a/v7/src/microcode/unxutl/config b/v7/src/microcode/unxutl/config index 1e8d7158f..5179de692 100755 --- a/v7/src/microcode/unxutl/config +++ b/v7/src/microcode/unxutl/config @@ -1,6 +1,6 @@ #!/bin/sh # Configuration script for MIT Scheme -# $Id: config,v 1.26 1993/11/03 22:37:12 cph Exp $ +# $Id: config,v 1.27 1993/11/08 06:12:49 gjr Exp $ # Modelled on the configuration script for GNU CC # The section between lines is the copyright prefix from the GNU CC config. #---------------------------------------------------------------------- @@ -45,6 +45,7 @@ usage() echo "sun3 sun3-os3 sun3-nfp sun3-os3-nfp sun4 sparc" echo "i386-sysv 386bsd umax" echo "vax-bsd42 vax-bsd43 vax-ultrix" + echo "rs6000" if [ -r config.out ] then cat config.out @@ -151,6 +152,10 @@ discriminate() system_file=sunos4 machine_file=sun4 ;; + rs6000) + system_file=aix + machine_file=rs6000 + ;; umax) # Encore Multimax system_file=umax machine_file=umax diff --git a/v7/src/microcode/ux.h b/v7/src/microcode/ux.h index 2a6571564..538610806 100644 --- a/v7/src/microcode/ux.h +++ b/v7/src/microcode/ux.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ux.h,v 1.53 1993/10/27 22:17:55 gjr Exp $ +$Id: ux.h,v 1.54 1993/11/08 06:15:59 gjr Exp $ Copyright (c) 1988-1993 Massachusetts Institute of Technology @@ -63,7 +63,7 @@ extern int errno; /* As specified by OSF/1 Programmer's reference: */ extern int EXFUN (ioctl, (int, unsigned long, ...)); #endif -#ifndef _SUNOS4 +#if !(defined(_SUNOS4) || defined(_AIX)) extern int EXFUN (open, (const char *, int, ...)); #endif extern int EXFUN (kill, (pid_t, int)); @@ -144,6 +144,10 @@ extern int EXFUN (kill, (pid_t, int)); #endif /* _IRIX4 */ +#ifdef _AIX +#define UNION_WAIT_STATUS +#endif /* _AIX */ + #else /* not _POSIX */ #ifdef _BSD diff --git a/v7/src/microcode/uxterm.c b/v7/src/microcode/uxterm.c index c3b0db9dc..6b688c3c9 100644 --- a/v7/src/microcode/uxterm.c +++ b/v7/src/microcode/uxterm.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxterm.c,v 1.22 1993/04/19 08:27:29 cph Exp $ +$Id: uxterm.c,v 1.23 1993/11/08 06:17:10 gjr Exp $ Copyright (c) 1990-1993 Massachusetts Institute of Technology @@ -642,15 +642,15 @@ DEFUN (OS_pty_master_send_signal, (channel, sig), Tchannel channel AND int sig) (syscall_ioctl_TIOCSIGSEND, (UX_ioctl ((CHANNEL_DESCRIPTOR (channel)), TIOCSIGSEND, sig))); #else /* not TIOCSIGSEND */ -#ifdef HAVE_BSD_JOB_CONTROL +#if defined(TIOCPGRP) && defined(HAVE_BSD_JOB_CONTROL) int fd = (CHANNEL_DESCRIPTOR (channel)); int gid; STD_VOID_SYSTEM_CALL (syscall_ioctl_TIOCGPGRP, (UX_ioctl (fd, TIOCGPGRP, (&gid)))); STD_VOID_SYSTEM_CALL (syscall_kill, (UX_kill ((-gid), sig))); -#else /* not HAVE_BSD_JOB_CONTROL */ +#else /* not TIOCGPGRP or not HAVE_BSD_JOB_CONTROL */ error_unimplemented_primitive (); -#endif /* HAVE_BSD_JOB_CONTROL */ +#endif /* TIOCGPGRP and HAVE_BSD_JOB_CONTROL */ #endif /* TIOCSIGSEND */ } diff --git a/v7/src/microcode/uxtrap.h b/v7/src/microcode/uxtrap.h index 4358c62f8..cd403b7dd 100644 --- a/v7/src/microcode/uxtrap.h +++ b/v7/src/microcode/uxtrap.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxtrap.h,v 1.22 1993/09/09 18:24:19 gjr Exp $ +$Id: uxtrap.h,v 1.23 1993/11/08 06:18:02 gjr Exp $ Copyright (c) 1990-1993 Massachusetts Institute of Technology @@ -525,6 +525,13 @@ struct sigcontext { } #endif /* __alpha */ + +#ifdef _AIX +/* For now */ +#define SIGCONTEXT sigcontext +#define SIGCONTEXT_SP(scp) 0 +#define SIGCONTEXT_PC(scp) 0 +#endif /* _AIX */ #ifndef SIGINFO_T #define SIGINFO_T int @@ -587,15 +594,22 @@ struct sigcontext { #endif #if !(defined (_NEXTOS) && (_NEXTOS_VERSION >= 20)) +#ifdef _AIX +extern int _etext; +#define get_etext() (&_etext) +#else /* not _AIX */ #ifdef __linux extern unsigned int etext; -#else +#else /* not __linux */ #if !(defined (_HPUX) && (_HPUX_VERSION >= 80) && defined (hp9000s300)) extern long etext; -#endif +#endif /* _HPUX ... */ #endif /* __linux */ +#endif /* _AIX */ +#ifndef get_etext # define get_etext() (&etext) -#endif +#endif /* get_etext */ +#endif /* _NEXTOS */ /* Machine/OS-independent section */ diff --git a/v7/src/microcode/wsize.c b/v7/src/microcode/wsize.c index 1f2c720c9..202508997 100644 --- a/v7/src/microcode/wsize.c +++ b/v7/src/microcode/wsize.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: wsize.c,v 9.32 1992/09/26 02:47:35 cph Exp $ +$Id: wsize.c,v 9.33 1993/11/08 06:20:11 gjr Exp $ -Copyright (c) 1989-1992 Massachusetts Institute of Technology +Copyright (c) 1989-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -36,7 +36,8 @@ MIT in each case. */ #include #include #include -#include "config.h" +#include "ansidecl.h" +/* #include "config.h" */ #ifndef TYPE_CODE_LENGTH /* This MUST match object.h */ @@ -51,8 +52,8 @@ MIT in each case. */ #define true 1 extern int errno; -extern char * malloc(); -extern free (); +extern PTR EXFUN (malloc, ()); +extern void EXFUN (free, ()); /* The following hanky-panky courtesy of some buggy compilers. */ @@ -186,7 +187,7 @@ main() } else { - count = (free (temp)); + free (temp); if (((unsigned long) temp) < (1 << ((char_size * sizeof(long)) - TYPE_CODE_LENGTH))) printf ("#define HEAP_IN_LOW_MEMORY 1\n"); -- 2.25.1