Return-Path: arris!arris.com!rec@uunet.UU.NET
Received: by jove.pa.dec.com; id AA00761; Sat, 24 Mar 90 11:38:28 -0800
Received: by decwrl.dec.com; id AA17757; Sat, 24 Mar 90 09:50:55 -0800
Received: from arris.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA18588; Sat, 24 Mar 90 12:50:17 -0500
Received: by arris.com (4.1/SMI-4.0)
	id AA09796; Sat, 24 Mar 90 12:27:12 EST
Date: Sat, 24 Mar 90 12:27:12 EST
From: rec@arris.com (Roger Critchlow)
Message-Id: <9003241727.AA09796@arris.com>
To: bartlett
Subject: patches for SPARC/I386 Scheme->C

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  README I386 ISC386IX SPARC makefile i386.s sparc.s
#   both.patch tar.fix
# Wrapped by rec@elf115 on Sat Mar 24 16:57:48 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(3537 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
XGreetings -
X
X  Enclosed are the patches to Scheme->C for the Sparc and Intel 386.
XThere are the following files enclosed in this shar archive:
X
X  README - this informative file.
X  both.patch - context diffs for the combined sparc and i386 changes
X	to the 23feb90/scrt/* files.  I have separate patches which
X	don't apply cleanly in either order if you want them.
X  tar.fix - a script to extract 23feb90 on System V and rewrite file
X	names to the 14 character limit.  It extracts the archive four
X	times, moves files to shorter names, and edits the makefiles.
X  makefile - a makefile augmented to build Sparc and i386 versions of
X	Scheme->C.
X  sparc.s - the sparc assembly assist, sans protected fixnum routines.
X  i386.s - an empty i386 assembly assist.
X  SPARC - the sparc configuration header.
X  I386 - a generic intel 386 configuration header.
X  ISC386IX - an Interactive Systems 386/ix specific configuration header.
X
XConfiguration notes:
X
X  The new version of the root makefile allows one to make a version of
XScheme->C on top of the source distribution.  It does this by moving the
Xdistributed makefiles out of the way where necessary so that the version
Xspecific information can be prepended.
X
X  I have several hacked versions of the other makefiles which I will
Xspare you.  A general, portable solution is possible, but I haven't
Xdone it yet.
X
X  The scrt/makefile needs to have each machine's assembler support source
Xfile added to the SMISC macro.
X
X  The test/makefile ought to specify the user's CC to sccomp rather than
Xoverriding it.  gcc compiled libraries need to be linked with gcc to get
Xthe proper runtime support.
X
XSystem V portability notes:
X
X  System V doesn't do symbolic links.  Use the new inplaceCPU target in
Xthe root makefile to build the objects in place.
X
X  System V doesn't have ranlib.  Make a command file named ranlib which
Xruns 'ar rs' on the archive instead.
X
X  System V tar complains vociferously about lots of stuff which makes no
Xdifference.  Ignore it.  It won't say anything about the real violence it
Xdoes when filenames get truncated.
X
X  System V install is not equivalent to BSD install.  All installations
Xneed to be done by hand.
X
X  System V ar refuses to ranlib xlib/xlib.a (too many symbols!) and ld
Xrefuses to link against archives without ranlib symbol tables.  Just
Xbuild a partially linked object with 'ld -r -o xlib.o' and pretend it's
Xa library.  You didn't really care about the size of your binaries, did you?
X
X  The System V signal handling interface probably doesn't work exactly as
Xit should, but I haven't been enough of a masochist to try and break it.
X
X  The replacement I used for select() in scrt/cio.c is a version of sigpoll()
Xwhich ISC has extended beyond the SV3.2 specification.  Other implementations
Xof System V may need other solutions.
X
XSparc portability notes:
X
X  The Bigendian changes are confined to objects.h, but they make a hash
Xof the source.  They are currently conditionalized on SPARC, but ought
Xto be more specifically identified.
X
X  The MATHTRAPS code remains to be written.  There is a trap on overflow
Xinstruction on the Sparc and a software trap number assigned to integer
Xoverflow traps defined in the system headers.  It shouldn't be too hard.
X
X  There are a handful of Little-endian dependent tests in one of the
Xtest modules.  I have a fix for them that examines (implementation-
Xinformation) for 'SPARC which I will send separately.
X
XI386 portability notes:
X
X  The MATHTRAPS code remains to be written.  I have no idea if it can be
Xdone or not.
X
END_OF_FILE
if test 3537 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'I386' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'I386'\"
else
echo shar: Extracting \"'I386'\" \(404 characters\)
sed "s/^X//" >'I386' <<'END_OF_FILE'
X#
X# This is the header file for constructing make files for I386 processors.
X#
X
X.SUFFIXES:
X.SUFFIXES:	.o .c .sc .s .u
X
X# Processor name:
X
Xcpu = I386
X
X# Default flags to use when invoking the C compiler.
X
XCFLAGS = -O -DSYSV
XCC = gcc
X
X# Assembly language object files.
X
XAruntime = i386.o 
X
X# Profiled library
X
XPlib =
X
X# Heap size in megabytes for the compiler.
X
Xscheapmb = 4 -scl 40
X
X# End of I386 header.
END_OF_FILE
if test 404 -ne `wc -c <'I386'`; then
    echo shar: \"'I386'\" unpacked with wrong size!
fi
# end of 'I386'
fi
if test -f 'ISC386IX' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ISC386IX'\"
else
echo shar: Extracting \"'ISC386IX'\" \(688 characters\)
sed "s/^X//" >'ISC386IX' <<'END_OF_FILE'
X#
X# This is the header file for constructing make files for I386 processors
X# under System V.3.2, Interactive Systems 386/ix 2.0.2.
X#
X
X.SUFFIXES:
X.SUFFIXES:	.o .c .sc .s .u
X
X# Processor name:
Xcpu = I386
X
X# System name:
Xsys = SYSV
X
X# Default flags to use when invoking the C compiler:
XCFLAGS = -O -DISC386IX -DSYSV
X
X# Default libraries to link against:
XCLIBS = -lm
X
X# Name of the c compile:
XCC = gcc
X
X# How to build an archive symbol table:
XRANLIB = ar rs
X
X# Flags to pass to ln when making source links:
XLNFLAGS =
X
X# Assembly language object files:
XAruntime = i386.o 
X
X# Profiled library:
XPlib =
X
X# Heap size in megabytes for the compiler:
Xscheapmb = 4 -scl 40
X
X# End of ISC386IX header.
END_OF_FILE
if test 688 -ne `wc -c <'ISC386IX'`; then
    echo shar: \"'ISC386IX'\" unpacked with wrong size!
fi
# end of 'ISC386IX'
fi
if test -f 'SPARC' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'SPARC'\"
else
echo shar: Extracting \"'SPARC'\" \(400 characters\)
sed "s/^X//" >'SPARC' <<'END_OF_FILE'
X#
X# This is the header file for constructing make files for SPARC processors.
X#
X
X.SUFFIXES:
X.SUFFIXES:	.o .c .sc .s .u
X
X# Processor name:
X
Xcpu = SPARC
X
X# Default flags to use when invoking the C compiler.
X
XCFLAGS = -g
XCC = cc
X
X# Assembly language object files.
X
XAruntime = sparc.o 
X
X# Profiled library
X
XPlib =
X
X# Heap size in megabytes for the compiler.
X
Xscheapmb = 8 -scl 40
X
X# End of SPARC header.
END_OF_FILE
if test 400 -ne `wc -c <'SPARC'`; then
    echo shar: \"'SPARC'\" unpacked with wrong size!
fi
# end of 'SPARC'
fi
if test -f 'makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'makefile'\"
else
echo shar: Extracting \"'makefile'\" \(6774 characters\)
sed "s/^X//" >'makefile' <<'END_OF_FILE'
X#
X# This file is used to make the Scheme->C system for multiple processor types.
X#
X
XSRCDIR = /wrl/Gen/src/schemetoc
X
XMIPSDIR = /wrl/pmax/src/schemetoc
XMIPSBIN = /wrl/pmax/bin
XMIPSLIB = /wrl/pmax/lib
X
XTITANDIR = /wrl/titan/src/schemetoc
XTITANBIN = /wrl/titan/bin
XTITANLIB = /wrl/titan/lib
X
XVAXDIR = /wrl/vax/src/schemetoc
XVAXBIN = /wrl/vax/bin
XVAXLIB = /wrl/vax/lib
X
X# Architecture specific makefiles are constructed by the
X# following commands.
X
XinplaceCPU:
X	test -f makefile-tail || cp makefile makefile-tail
X	echo "BINDIR = ${BINDIR}"  > makefile
X	echo "LIBDIR = ${LIBDIR}" >> makefile
X	cat makefile-tail      	  >> makefile
X	test -f doc/makefile-tail || cp doc/makefile doc/makefile-tail
X	echo "SRCDIR = ${SRCDIR}/doc"  > doc/makefile
X	cat doc/makefile-tail	       >> doc/makefile
X	cat ${CPU} 			> scrt/makefile
X	echo "SRCDIR = ${SRCDIR}/scrt" >> scrt/makefile 
X	echo "CPUDIR = ${CPUDIR}/scrt" >> scrt/makefile
X	echo "BINDIR = ${BINDIR}"      >> scrt/makefile
X	echo "LIBDIR = ${LIBDIR}"      >> scrt/makefile
X	cat scrt/makefile-tail         >> scrt/makefile
X	cat ${CPU} 			> scsc/makefile
X	echo "SRCDIR = ${SRCDIR}/scsc" >> scsc/makefile 
X	echo "CPUDIR = ${CPUDIR}/scsc" >> scsc/makefile
X	echo "BINDIR = ${BINDIR}"      >> scsc/makefile
X	echo "LIBDIR = ${LIBDIR}"      >> scsc/makefile
X	cat scsc/makefile-tail         >> scsc/makefile
X	cat ${CPU} 			> test/makefile
X	echo "SRCDIR = ${SRCDIR}/test" >> test/makefile 
X	echo "CPUDIR = ${CPUDIR}/test" >> test/makefile
X	echo "BINDIR = ${BINDIR}"      >> test/makefile
X	echo "LIBDIR = ${LIBDIR}"      >> test/makefile
X	cat test/makefile-tail	       >> test/makefile
X
X# Architecture specific directories and links to the source files are
X# constructed by the following commands which follow:
X
XforCPU:
X	-mkdir ${CPUDIR}
X	cp ${CPU} ${CPUDIR}
X	echo "BINDIR = ${BINDIR}"  > ${CPUDIR}/makefile
X	echo "LIBDIR = ${LIBDIR}" >> ${CPUDIR}/makefile
X	cat makefile         	  >> ${CPUDIR}/makefile
X	@-echo
X	@-echo '***** /doc *****'
X	-mkdir ${CPUDIR}/doc
X	echo "SRCDIR = ${SRCDIR}/doc"  > ${CPUDIR}/doc/makefile
X	cat doc/makefile	      >> ${CPUDIR}/doc/makefile
X	-cd ${CPUDIR}/doc; make srclinks
X	@-echo
X	@-echo '***** /scrt *****'
X	-mkdir ${CPUDIR}/scrt
X	cat ${CPU} 			> ${CPUDIR}/scrt/makefile
X	echo "SRCDIR = ${SRCDIR}/scrt" >> ${CPUDIR}/scrt/makefile 
X	echo "CPUDIR = ${CPUDIR}/scrt" >> ${CPUDIR}/scrt/makefile
X	echo "BINDIR = ${BINDIR}"      >> ${CPUDIR}/scrt/makefile
X	echo "LIBDIR = ${LIBDIR}"      >> ${CPUDIR}/scrt/makefile
X	cat scrt/makefile-tail         >> ${CPUDIR}/scrt/makefile
X	-cd ${CPUDIR}/scrt; make srclinks
X	@-echo
X	@-echo '***** /scsc *****'
X	-mkdir ${CPUDIR}/scsc
X	cat ${CPU} 			> ${CPUDIR}/scsc/makefile
X	echo "SRCDIR = ${SRCDIR}/scsc" >> ${CPUDIR}/scsc/makefile 
X	echo "CPUDIR = ${CPUDIR}/scsc" >> ${CPUDIR}/scsc/makefile
X	echo "BINDIR = ${BINDIR}"      >> ${CPUDIR}/scsc/makefile
X	echo "LIBDIR = ${LIBDIR}"      >> ${CPUDIR}/scsc/makefile
X	cat scsc/makefile-tail         >> ${CPUDIR}/scsc/makefile
X	-cd ${CPUDIR}/scsc; make srclinks
X	@-echo
X	@-echo '***** /test *****'
X	-mkdir ${CPUDIR}/test
X	cat ${CPU} 			> ${CPUDIR}/test/makefile
X	echo "SRCDIR = ${SRCDIR}/test" >> ${CPUDIR}/test/makefile 
X	echo "CPUDIR = ${CPUDIR}/test" >> ${CPUDIR}/test/makefile
X	echo "BINDIR = ${BINDIR}"      >> ${CPUDIR}/test/makefile
X	echo "LIBDIR = ${LIBDIR}"      >> ${CPUDIR}/test/makefile
X	cat test/makefile-tail         >> ${CPUDIR}/test/makefile
X	-cd ${CPUDIR}/test; make srclinks
X
XforMIPS:
X	make "CPU = MIPS" "CPUDIR = ${MIPSDIR}" \
X	     "BINDIR = ${MIPSBIN}" "LIBDIR = ${MIPSLIB}" forCPU
X
XforTITAN:
X	make "CPU = TITAN" "CPUDIR = ${TITANDIR}" \
X	     "BINDIR = ${TITANBIN}" "LIBDIR = ${TITANLIB}" forCPU
X
XforVAX:
X	make "CPU = VAX" "CPUDIR = ${VAXDIR}" \
X	     "BINDIR = ${VAXBIN}" "LIBDIR = ${VAXLIB}" forCPU
X
XforI386:
X	make "CPU = I386" "CPUDIR = /usr/local/src/24mar90" \
X	     "SRCDIR = /usr/local/src/24mar90" \
X	     "BINDIR = /usr/local/bin" "LIBDIR = /usr/local/lib" inplaceCPU
X
XforISC386IX:
X	make "CPU = ISC386IX" "CPUDIR = /usr/local/src/24mar90" \
X	     "SRCDIR = /usr/local/src/24mar90" \
X	     "BINDIR = /usr/local/bin" "LIBDIR = /usr/local/lib" inplaceCPU
X
XforSPARC:
X	make "CPU = SPARC" "CPUDIR = /var/tmp/schemetoc" \
X	     "SRCDIR = /var/tmp/schemetoc" \
X	     "BINDIR = /usr/local/bin" "LIBDIR = /usr/local/lib" inplaceCPU
X
X# The Scheme->C system is initially compiled from the C sources by the
X# following:
X
Xport:
X	cd scrt; make port
X	cd scsc; make port
X
X# A "private" working copy of the current compiler, libary, and interpreter
X# is installed in a directory by the following command:
X
Xinstall-private:
X	cd scrt; make "destdir = ${destdir}" install-private
X	cd scsc; make "destdir = ${destdir}" install-private
X
X# Clean out working files.
X
Xclean:
X	rm -f *.BAK *.CKP SC-TO-C*
X	cd doc; make clean
X	cd scrt; make clean
X	cd scsc; make clean
X	cd test; make clean
X
X# Clean up C source files generated from Scheme source.
X
Xclean-sc-to-c:
X	cd scrt; make clean-sc-to-c
X	cd scsc; make clean-sc-to-c
X	cd test; make clean-sc-to-c
X
X# Delete programs and libraries.
X
Xnoprogs:
X	cd scrt; make noprogs
X	cd scsc; make noprogs
X	cd test; make noprogs
X
X# All binaries and documentation files are installed by the following command
X# for access by all users.
X
Xinstall:
X	cd doc; make "BINDIR = ${BINDIR}" "LIBDIR = ${LIBDIR}" install
X	cd scrt; make "BINDIR = ${BINDIR}" "LIBDIR = ${LIBDIR}" install
X	cd scsc; make "BINDIR = ${BINDIR}" "LIBDIR = ${LIBDIR}" install
X
X# All files which must be constructed are made by the following command:
X
Xall:
X	cd scrt; make all
X	cd scsc; make all
X
X# Distribute "source" files required to make the Scheme->C system.
X
Xsrcdist:
X	rdist -c MIPS README TITAN VAX makefile ${destdir}
X	cd doc; make "destdir = ${destdir}/doc" srcdist
X	-cd scbenchmark; make "destdir = ${destdir}/scbenchmark" srcdist
X	cd scrt; make "destdir = ${destdir}/scrt" srcdist
X	cd scsc; make "destdir = ${destdir}/scsc" srcdist
X	-cd test; make "destdir = ${destdir}/test" srcdist
X	-cd tools; make "destdir = ${destdir}/tools" srcdist
X
X# Distribute "binary" files so that they may be installed on some other
X# system.
X
Xbindist:
X	rdist -c MIPS README TITAN VAX makefile ${destdir}
X	cd doc; make "destdir = ${destdir}/doc" bindist
X	cd scrt; make "destdir = ${destdir}/scrt" bindist
X	cd scsc; make "destdir = ${destdir}/scsc" bindist
X
X# Write the tar tape for distribution.
X
XTARFILES = MIPS README VAX makefile \
X	   doc/[a-z]*.mss doc/[a-z]*.psf doc/[a-z]*.l doc/makefile \
X	   gnuemacs/README gnuemacs/[a-z]* \
X	   scrt/[a-z]*.sc scrt/[a-z]*.[chs] scrt/makefile-tail \
X	   scsc/[a-z]*.sc scsc/[a-z]*.c scsc/[a-z]*.sch scsc/makefile-tail \
X	   test/[a-z]*.sc test/makefile-tail \
X	   cdecl/README cdecl/[a-z]* \
X	   xlib/README xlib/[X-z]*
X
XTARFLAGS = -cl
X
Xtartape:
X	tar ${TARFLAGS} ${TARFILES}
X
Xtarlog:
X	tar tvf ${TARTAPE} > ${TARLOG}
END_OF_FILE
if test 6774 -ne `wc -c <'makefile'`; then
    echo shar: \"'makefile'\" unpacked with wrong size!
fi
# end of 'makefile'
fi
if test -f 'i386.s' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'i386.s'\"
else
echo shar: Extracting \"'i386.s'\" \(0 characters\)
sed "s/^X//" >'i386.s' <<'END_OF_FILE'
END_OF_FILE
if test 0 -ne `wc -c <'i386.s'`; then
    echo shar: \"'i386.s'\" unpacked with wrong size!
fi
# end of 'i386.s'
fi
if test -f 'sparc.s' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sparc.s'\"
else
echo shar: Extracting \"'sparc.s'\" \(3054 characters\)
sed "s/^X//" >'sparc.s' <<'END_OF_FILE'
X!
X! Rules for building continuations on the SPARC:
X!
X! 1 - register windows must be flushed to memory before
X!	the stack is copied to the heap.
X!
X! 2 - setjmp must save the caller's local and input register
X!	frames when saving context, because longjmp will not
X!	have access to the saved stack to fetch the registers
X!	from their normal resting place.
X!
X! 3 - longjmp must flush register windows so the correct register
X!	values will be reloaded from memory when execution continues
X!	on the restored stack.
X!
X! 4 - longjmp must restore the caller's local and input register
X!	frames because the stack hasn't been restored when longjmp
X!	is called.
X!
X
X
X!
X! This misnamed function is responsible for providing the
X! top of stack address, via macro STACKPTR, to the continuation
X! builder and the heap manager.  Because both of these functions
X! immediately begin examining the memory on the stack, the register
X! windows are flushed to memory so their values will be saved in
X! heap allocated continuations and seen by the garbage collector.
X!
X	.global	_sc_processor_register
X_sc_processor_register:
X	ta	3			! flush register windows
X	jmp	%o7+8			! return
X	add	%sp, 0, %o0		! return stack pointer
X
X!
X! Save the current environment in a heap allocated continuation.
X!
X	.global	_sc_setjmp
X_sc_setjmp:
X	st	%o6, [%o0 +  0]		! save stack pointer
X	st	%o7, [%o0 +  4]		! save continuation pointer
X	st	%g1, [%o0 +  8]		! save global registers
X	st	%g2, [%o0 + 12]		! these may be allocated for
X	st	%g3, [%o0 + 16]		! caller saves registers or
X	st	%g4, [%o0 + 20]		! for global values.
X	st	%g5, [%o0 + 24]
X	st	%g6, [%o0 + 28]
X	st	%g7, [%o0 + 32]
X	st	%l0, [%o0 + 36]		! save local registers
X	st	%l1, [%o0 + 40]		! the sunos setjmp uses
X	st	%l2, [%o0 + 44]		! the register windows to
X	st	%l3, [%o0 + 48]		! save these, we can't.
X	st	%l4, [%o0 + 52]
X	st	%l5, [%o0 + 56]
X	st	%l6, [%o0 + 60]
X	st	%l7, [%o0 + 64]
X	st	%i0, [%o0 + 68]
X	st	%i1, [%o0 + 72]
X	st	%i2, [%o0 + 76]
X	st	%i3, [%o0 + 80]
X	st	%i4, [%o0 + 84]
X	st	%i5, [%o0 + 88]
X	st	%i6, [%o0 + 92]
X	st	%i7, [%o0 + 96]
X	mov	%y, %o2			! fetch %y, whatever it is
X	st	%o2, [%o0 + 100]	! and save it
X	jmp	%o7+8			! return
X	add	%g0, %g0, %o0		! return 0
X
X!
X! Restore an environment from a heap allocated continuation.
X!
X	.global	_sc_longjmp
X_sc_longjmp:
X	ta	3			! flush register windows
X	ld	[%o0 +  0], %o6		! restore stack pointer
X	ld	[%o0 +  4], %o7		! load continuation pointer
X	ld	[%o0 +  8], %g1		! restore global registers
X	ld	[%o0 + 12], %g2
X	ld	[%o0 + 16], %g3
X	ld	[%o0 + 20], %g4
X	ld	[%o0 + 24], %g5
X	ld	[%o0 + 28], %g6
X	ld	[%o0 + 32], %g7
X	ld	[%o0 + 36], %l0		! restore local frame from stack
X	ld	[%o0 + 40], %l1
X	ld	[%o0 + 44], %l2
X	ld	[%o0 + 48], %l3
X	ld	[%o0 + 52], %l4
X	ld	[%o0 + 56], %l5
X	ld	[%o0 + 60], %l6
X	ld	[%o0 + 64], %l7
X	ld	[%o0 + 68], %i0
X	ld	[%o0 + 72], %i1
X	ld	[%o0 + 76], %i2
X	ld	[%o0 + 80], %i3
X	ld	[%o0 + 84], %i4
X	ld	[%o0 + 88], %i5
X	ld	[%o0 + 92], %i6
X	ld	[%o0 + 96], %i7
X	ld	[%o0 + 100], %o2	! restore %y, whatever it is
X	mov	%o2, %y
X	jmp	%o7+8			! return
X	add	%o1, %g0, %o0		! return arg
X
END_OF_FILE
if test 3054 -ne `wc -c <'sparc.s'`; then
    echo shar: \"'sparc.s'\" unpacked with wrong size!
fi
# end of 'sparc.s'
fi
if test -f 'both.patch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'both.patch'\"
else
echo shar: Extracting \"'both.patch'\" \(19852 characters\)
sed "s/^X//" >'both.patch' <<'END_OF_FILE'
Xdiff -c -d 23feb90/scrt/apply.h 24mar90/scrt/apply.h
X*** 23feb90/scrt/apply.h	Fri Feb 23 01:46:36 1990
X--- 24mar90/scrt/apply.h	Sat Mar 24 05:01:08 1990
X***************
X*** 44,49 ****
X--- 44,57 ----
X     by the compiler to call unknown functions.
X  */
X  
X+ #ifdef SPARC
X+ #define MAXARGS 25
X+ #endif
X+ 
X+ #ifdef I386
X+ #define MAXARGS 25	/* gcc doesn't appear to set any limit */
X+ #endif
X+ 
X  #ifdef MIPS
X  #define MAXARGS 25	/* Maximum number of required arguments permitted.
X  			   Note that this does not preclude an optional
XOnly in 24mar90/scrt: apply.o
Xdiff -c -d 23feb90/scrt/callcc.c 24mar90/scrt/callcc.c
X*** 23feb90/scrt/callcc.c	Fri Feb 23 01:46:51 1990
X--- 24mar90/scrt/callcc.c	Sat Mar 24 04:59:16 1990
X***************
X*** 57,62 ****
X--- 57,70 ----
X  #include "callcc.h"
X  #include "apply.h"
X  #include "signal.h"
X+ 
X+ #ifdef SPARC
X+ extern	sc_setjmp();
X+ #pragma unknown_control_flow(sc_setjmp)
X+ #define setjmp( x )	sc_setjmp( x )
X+ #define longjmp( x, y )	sc_longjmp( x, y )
X+ #endif
X+ 
X  #ifdef MIPS
X  extern  sc_setsp();
X  #endif
XOnly in 24mar90/scrt: callcc.o
Xdiff -c -d 23feb90/scrt/cio.c 24mar90/scrt/cio.c
X*** 23feb90/scrt/cio.c	Fri Feb 23 01:47:01 1990
X--- 24mar90/scrt/cio.c	Sat Mar 24 05:01:08 1990
X***************
X*** 46,51 ****
X--- 46,62 ----
X  #include <sys/time.h>
X  #include "objects.h"
X  
X+ #if ISC386IX
X+ #include <stropts.h>
X+ #include <poll.h>
X+ int rename(old, new) char *old, *new;
X+ {
X+   if (link(old, new) == 0 && unlink(old) == 0)
X+     return 0;
X+   return -1;
X+ }
X+ #endif
X+ 
X  int  sc_libc_eof = EOF;
X  
X  /*  feof(stream)  */
X***************
X*** 88,100 ****
X--- 99,121 ----
X  	FILE *stream;
X  {
X  	int  readfds, nfound;
X+ #if ! ISC386IX
X  	struct  timeval  timeout;
X+ #else
X+ 	struct pollfd pollfd;
X+ #endif
X  	
X  	if  (((stream)->_cnt) <= 0)  {
X+ #if ! ISC386IX
X  	   readfds = 1<<(fileno( stream ));
X  	   timeout.tv_sec = 0;
X  	   timeout.tv_usec = 0;
X  	   nfound = select( fileno( stream )+1, &readfds, 0, 0, &timeout );
X+ #else
X+ 	  pollfd.fd = fileno( stream );
X+ 	  pollfd.events = POLLIN;
X+ 	  nfound = poll(&pollfd, 1, 0);
X+ #endif
X  	   if  (nfound == 0)  return( 0 );
X  	}
X  	return( 1 );
XOnly in 24mar90/scrt: cio.o
Xdiff -c -d 23feb90/scrt/heap.c 24mar90/scrt/heap.c
X*** 23feb90/scrt/heap.c	Fri Feb 23 01:47:13 1990
X--- 24mar90/scrt/heap.c	Sat Mar 24 05:01:10 1990
X***************
X*** 99,107 ****
X--- 99,109 ----
X  
X  int	sc_gcinfo;		/* controls logging */
X  
X+ #if ! SYSV
X  static struct rusage gcru,	/* resource consumption during collection */
X  	             startru,
X  	      	     stopru;
X+ #endif
X  
X  int	*sc_stackbase;		/* pointer to base of the stack */
X  
X***************
X*** 108,113 ****
X--- 110,116 ----
X  TSCP	sc_whenfreed,		/* list of items needing cleanup when free */
X  	sc_freed;		/* list of free items to be cleanup */
X  
X+ #if ! SYSV
X  /* The following function converts a rusage structure into an 18 word Scheme
X     vector composed of the same items.
X  */
X***************
X*** 237,242 ****
X--- 240,249 ----
X  {
X  	return( rusagevector( &gcru ) );
X  }
X+ #else
X+ #define	getrusage(x,y)	/* no operation */
X+ #define updategcru()	/* no operation */
X+ #endif		/* SYSV-BSD dependency */
X  
X  #ifdef TITAN
X  /* The following function is called to read one of the Titan registers.  It
X***************
X*** 380,386 ****
X--- 387,434 ----
X  }
X  #endif MIPS
X  
X+ #ifdef SPARC
X+ /* All processor registers which might contain pointers are traced by the
X+    following procedure.
X+ */
X+ 
X+ static  trace_stack_and_registers()
X+ {
X+ 	int  i, *pp;
X+ 	jmp_buf tmp;
X+ 
X+ 	pp = STACKPTR;
X+ 	while  (pp != sc_stackbase)  move_continuation_ptr( *pp++ );
X+ }
X+ #endif SPARC
X+ 
X+ #ifdef I386
X+ /* The following code is used to read the stack pointer.  The register
X+    number is passed in to force an argument to be on the stack, which in
X+    turn can be used to find the address of the top of stack.
X+ */
X+ 
X+ int  *sc_processor_register( reg )
X+ 	int  reg;
X+ {
X+ 	return( &reg );
X+ }
X+ 
X+ /* All processor registers which might contain pointers are traced by the
X+    following procedure.
X+ */
X+ 
X+ static  trace_stack_and_registers()
X+ {
X+ 	int  i, *pp;
X+ 	jmp_buf tmp;
X  
X+ 	setjmp(tmp);
X+ 	pp = STACKPTR;
X+ 	while  (pp != sc_stackbase)  move_continuation_ptr( *pp++ );
X+ }
X+ #endif I386
X+ 
X  /* The size of an extended object in words is returned by the following
X     function.
X  */
X***************
X*** 1274,1279 ****
X--- 1322,1328 ----
X  	getrusage( 0, &stopru );
X  	updategcru();
X  	if  (sc_gcinfo)  { 
X+ #if ! SYSV
X  	   fprintf( stderr,
X  	            "              %d%% locked  %d%% retained  %d user ms",
X  		    (sc_lockcnt*100)/sc_heappages,
X***************
X*** 1283,1288 ****
X--- 1332,1343 ----
X  	   	    "  %d system ms  %d page faults\n",
X  		    stopru.ru_stime.tv_sec*1000+stopru.ru_stime.tv_usec/1000,
X  		    stopru.ru_majflt );
X+ #else
X+ 	   fprintf( stderr,
X+ 	            "              %d%% locked  %d%% retained\n",
X+ 		    (sc_lockcnt*100)/sc_heappages,
X+ 	            (sc_generationpages*100)/sc_heappages);
X+ #endif
X  	}
X  	if  (sc_gcinfo == 2)  {
X  	   /* Perform additional consistency checks */
Xdiff -c -d 23feb90/scrt/heap.h 24mar90/scrt/heap.h
X*** 23feb90/scrt/heap.h	Fri Feb 23 01:47:07 1990
X--- 24mar90/scrt/heap.h	Sat Mar 24 05:17:08 1990
X***************
X*** 42,50 ****
X--- 42,57 ----
X  /* Import definitions */
X  
X  #ifndef rusage
X+ #ifdef SPARC
X+ #include <sys/time.h>
X+ #include <sys/resource.h>
X+ #else
X+ #ifndef SYSV
X  #include <time.h>
X  #include <sys/resource.h>
X  #endif
X+ #endif
X+ #endif
X  
X  /* This module implements the object storage storage system for SCHEME->C.
X  
X***************
X*** 306,311 ****
X--- 313,326 ----
X  */
X  
X  extern int  *sc_stackbase;
X+ 
X+ #ifdef I386
X+ #define STACKPTR sc_processor_register( 4 )
X+ #endif
X+ 
X+ #ifdef SPARC
X+ #define STACKPTR sc_processor_register( 0 )
X+ #endif
X  
X  #ifdef MIPS
X  #define STACKPTR sc_processor_register( 29 )
XOnly in 24mar90/scrt: heap.o
XOnly in 24mar90/scrt: i386.o
XOnly in 24mar90/scrt: i386.s
XOnly in 24mar90/scrt: libsc.a
XOnly in 24mar90/scrt: makefile
Xdiff -c -d 23feb90/scrt/objects.h 24mar90/scrt/objects.h
X*** 23feb90/scrt/objects.h	Fri Feb 23 01:47:22 1990
X--- 24mar90/scrt/objects.h	Sat Mar 24 05:39:44 1990
X***************
X*** 44,52 ****
X--- 44,60 ----
X  
X  /* Default the value of CPUTYPE if not currently defined. */
X  
X+ #ifndef SPARC
X+ #ifndef I386
X  #ifndef MIPS
X  #ifndef TITAN
X  #ifndef VAX
X+ #ifdef sparc
X+ #define SPARC 1
X+ #endif
X+ #ifdef i386
X+ #define I386 1
X+ #endif
X  #ifdef mips
X  #define MIPS 1
X  #endif
X***************
X*** 59,64 ****
X--- 67,81 ----
X  #endif
X  #endif
X  #endif
X+ #endif
X+ #endif
X+ 
X+ #ifdef SPARC
X+ #define MATHTRAPS 0
X+ #endif
X+ #ifdef I386
X+ #define MATHTRAPS 0
X+ #endif
X  
X  /* The Scheme->C installer may elect to have arithmetic overflow handled
X     gracefully on either the MIPS or the VAX implementations.  The default
X***************
X*** 71,76 ****
X--- 88,102 ----
X  
X  /* A machine dependent definition:  the setjmp/longjmp buffer.  */
X  
X+ #ifdef SPARC
X+ typedef int jmp_buf[2+7+8+8+1];
X+ #define DOUBLE_ALIGN 1
X+ #endif
X+ 
X+ #ifdef I386
X+ #include <setjmp.h>
X+ #define CPUTYPE I386
X+ #endif
X  #ifdef MIPS
X  #include <setjmp.h>
X  #define CPUTYPE MIPS
X***************
X*** 128,139 ****
X--- 154,175 ----
X  	      unsigned  gned;
X  	   }  unsi;
X  	   struct {	/* EXTENDEDOBJ */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  rest:24;
X+ #else
X+ 	      unsigned  rest:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	   }  extendedobj;
X  	   struct {	/* SYMBOL */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  rest:24;
X+ #else
X+ 	      unsigned  rest:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      TSCP  name;
X  	      TSCP  *ptrtovalue;
X  	      TSCP  value;
X***************
X*** 140,170 ****
X--- 176,232 ----
X  	      TSCP  propertylist;
X  	   }  symbol;
X  	   struct {	/* STRING */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  length:24;
X+ #else
X+ 	      unsigned  length:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      char  char0;
X  	   }  string;
X  	   struct {	/* VECTOR */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  length:24;
X+ #else
X+ 	      unsigned  length:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      TSCP  element0;
X  	   }  vector;
X  	   struct {	/* PROCEDURE */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  required:8;
X  	      unsigned  optional:16;
X+ #else
X+ 	      unsigned  optional:16;
X+ 	      unsigned  required:8;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      TSCP  (*code)();
X  	      TSCP  closure;
X  	   }  procedure;
X  	   struct {	/* CLOSURE */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  length:24;
X+ #else
X+ 	      unsigned  length:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      TSCP  closure;
X  	      TSCP  var0;
X  	   }  closure;
X  	   struct {	/* CONTINUATION */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  length:24;
X+ #else
X+ 	      unsigned  length:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      TSCP  continuation;
X  	      jmp_buf  savedstate;
X  	      int  *address;
X***************
X*** 172,189 ****
X--- 234,266 ----
X  	      int  word0;
X  	   }  continuation;
X  	   struct {	/* FLOAT32 */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  rest:24;
X+ #else
X+ 	      unsigned  rest:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      float  value;
X  	   }  float32;
X  	   struct {	/* FLOAT64 */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  rest:24;
X+ #else
X+ 	      unsigned  rest:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      double  value;
X  	   }  float64;
X  	   struct {	/* FORWARD */
X+ #ifndef SPARC
X  	      unsigned  tag:8;
X  	      unsigned  length:24;
X+ #else
X+ 	      unsigned  length:24;
X+ 	      unsigned  tag:8;
X+ #endif
X  	      TSCP  forward;
X  	   } forward;
X  	   struct {	/* PAIR */
X***************
X*** 202,207 ****
X--- 279,292 ----
X  #define  U_TX( scp ) ((TSCP)((char*)(scp)+EXTENDEDTAG))
X  #define  U_TP( scp ) ((TSCP)((char*)(scp)+PAIRTAG))
X  #define  T_U( tscp ) ((SCP)((int)(tscp) & (~TAGMASK)))
X+ #ifdef SPARC
X+ #define  TX_U( tscp ) ((SCP)((char*)tscp-EXTENDEDTAG))
X+ #define  TP_U( tscp ) ((SCP)((char*)tscp-PAIRTAG))
X+ #endif
X+ #ifdef I386
X+ #define  TX_U( tscp ) ((SCP)((char*)tscp-EXTENDEDTAG))
X+ #define  TP_U( tscp ) ((SCP)((char*)tscp-PAIRTAG))
X+ #endif
X  #ifdef MIPS
X  #define  TX_U( tscp ) ((SCP)((char*)tscp-EXTENDEDTAG))
X  #define  TP_U( tscp ) ((SCP)((char*)tscp-PAIRTAG))
X***************
X*** 701,706 ****
X--- 786,797 ----
X  #define STRING_CHAR( tscp, n )  (*(((char*)tscp)+FIXED_C( n )+3))
X  
X  #define VECTOR_LENGTH( tscp )     (TX_U( tscp )->vector.length)
X+ #ifdef SPARC
X+ #define VECTOR_ELEMENT( tscp, n ) (*((PATSCP)(((char*)( tscp ))+3+((int)n))))
X+ #endif
X+ #ifdef I386
X+ #define VECTOR_ELEMENT( tscp, n ) (*((PATSCP)(((char*)( tscp ))+3+((int)n))))
X+ #endif
X  #ifdef MIPS
X  #define VECTOR_ELEMENT( tscp, n ) (*((PATSCP)(((char*)( tscp ))+3+((int)n))))
X  #endif
X***************
X*** 728,744 ****
X--- 819,851 ----
X  
X  /* C declarations */
X  
X+ #ifndef SPARC
X  #define DEFSTRING( name, chars, len ) \
X  	static struct { unsigned tag:8; \
X  		        unsigned length:24; \
X  		        char char0[len+(4-(len % 4))]; } \
X  	name = { STRINGTAG, len, chars }
X+ #else
X+ #define DEFSTRING( name, chars, len ) \
X+ 	static struct { unsigned length:24; \
X+ 		        unsigned tag:8; \
X+ 		        char char0[len+(4-(len % 4))]; } \
X+ 	name = { len, STRINGTAG, chars }
X+ #endif
X  
X+ #ifndef SPARC
X  #define DEFFLOAT( name, value ) \
X  	static struct { unsigned tag:8; \
X  		        unsigned length: 24; \
X  		        FLOATTYPE f; } \
X  	name = { FLOATTAG, 0, value }
X+ #else
X+ #define DEFFLOAT( name, value ) \
X+ 	static struct { unsigned length:24; \
X+ 		        unsigned tag:8; \
X+ 		        FLOATTYPE f; } \
X+ 	name = { 0, FLOATTAG, value }
X+ #endif
X  
X  #define DEFTSCP( name ) TSCP  name
X  
X***************
X*** 918,924 ****
X  #define CHAR_TSCP	C_CHAR
X  #define INT_TSCP	sc_int_tscp
X  #define UNSIGNED_TSCP   sc_unsigned_tscp
X! #define POINTER_TSCP	sc_unsigned_tscp
X  #define DOUBLE_TSCP	FLTV_FLT
X  #define INITHEAP	sc_restoreheap
X  #define SCHEMEEXIT()	scrt6_default_2dexit()
X--- 1025,1031 ----
X  #define CHAR_TSCP	C_CHAR
X  #define INT_TSCP	sc_int_tscp
X  #define UNSIGNED_TSCP   sc_unsigned_tscp
X! #define POINTER_TSCP	sc_int_tscp
X  #define DOUBLE_TSCP	FLTV_FLT
X  #define INITHEAP	sc_restoreheap
X  #define SCHEMEEXIT()	scrt6_default_2dexit()
XOnly in 24mar90/scrt: objects.o
Xdiff -c -d 23feb90/scrt/scdebug.c 24mar90/scrt/scdebug.c
X*** 23feb90/scrt/scdebug.c	Fri Feb 23 02:15:08 1990
X--- 24mar90/scrt/scdebug.c	Sat Mar 24 04:59:21 1990
X***************
X*** 1043,1050 ****
X  EXTERNTSCP( scrt3_string_2dappend_v );
X  EXTERNTSCPP( scrt3_substring );
X  EXTERNTSCP( scrt3_substring_v );
X! EXTERNTSCPP( scrt4_c_2dunsigned_2dref );
X! EXTERNTSCP( scrt4_c_2dunsigned_2dref_v );
X  EXTERNTSCPP( scrt1_append_2dtwo );
X  EXTERNTSCP( scrt1_append_2dtwo_v );
X  EXTERNTSCPP( scrt1_assq );
X--- 1043,1050 ----
X  EXTERNTSCP( scrt3_string_2dappend_v );
X  EXTERNTSCPP( scrt3_substring );
X  EXTERNTSCP( scrt3_substring_v );
X! EXTERNTSCPP( scrt4_c_2dint_2dref );
X! EXTERNTSCP( scrt4_c_2dint_2dref_v );
X  EXTERNTSCPP( scrt1_append_2dtwo );
X  EXTERNTSCP( scrt1_append_2dtwo_v );
X  EXTERNTSCPP( scrt1_assq );
X***************
X*** 1191,1197 ****
X  L1973:
X          SETGEN( PAIR_CAR( l1412 ), X7 );
X  L1932:
X!         X6 = scrt4_c_2dunsigned_2dref( X1, _TSCP( 0 ) );
X          X4 = PAIR_CAR( X4 );
X          X3 = PAIR_CAR( X3 );
X          X2 = PAIR_CAR( X2 );
X--- 1191,1197 ----
X  L1973:
X          SETGEN( PAIR_CAR( l1412 ), X7 );
X  L1932:
X!         X6 = scrt4_c_2dint_2dref( X1, _TSCP( 0 ) );
X          X4 = PAIR_CAR( X4 );
X          X3 = PAIR_CAR( X3 );
X          X2 = PAIR_CAR( X2 );
X***************
X*** 1313,1319 ****
X          init = 1;
X          INITHEAP( 0, 0, 0, 0 );
X          init_constants();
X!         init_modules( "(scdebug SCHEME->C COMPILER 19jan90jfb)" );
X          INITIALIZEVAR( U_TX( ADR( t1670 ) ), 
X                         ADR( scdebug_trace_2dlevel_v ), 
X                         _TSCP( 0 ) );
X--- 1313,1319 ----
X          init = 1;
X          INITHEAP( 0, 0, 0, 0 );
X          init_constants();
X!         init_modules( "(scdebug SCHEME->C COMPILER 23feb90jfb)" );
X          INITIALIZEVAR( U_TX( ADR( t1670 ) ), 
X                         ADR( scdebug_trace_2dlevel_v ), 
X                         _TSCP( 0 ) );
XOnly in 24mar90/scrt: scdebug.o
Xdiff -c -d 23feb90/scrt/scdebug.sc 24mar90/scrt/scdebug.sc
X*** 23feb90/scrt/scdebug.sc	Fri Feb 23 01:44:32 1990
X--- 24mar90/scrt/scdebug.sc	Sat Mar 24 04:59:22 1990
X***************
X*** 220,226 ****
X  ;;; environment at that interpreter level.
X  
X  (define (DOBACKTRACE start stop lines port)
X!     (do ((stp stacktrace (c-unsigned-ref stp 0))
X  	 (procname "")
X  	 (envlist '())
X  	 (envid '(env-0 env-1 env-2 env-3 env-4 env-5 env-6 env-7 env-8
X--- 220,226 ----
X  ;;; environment at that interpreter level.
X  
X  (define (DOBACKTRACE start stop lines port)
X!     (do ((stp stacktrace (c-int-ref stp 0))
X  	 (procname "")
X  	 (envlist '())
X  	 (envid '(env-0 env-1 env-2 env-3 env-4 env-5 env-6 env-7 env-8
XOnly in 24mar90/scrt: sceval.o
XOnly in 24mar90/scrt: scexpand.o
XOnly in 24mar90/scrt: scexpand1.o
XOnly in 24mar90/scrt: scexpand2.o
XOnly in 24mar90/scrt: sci
XOnly in 24mar90/scrt: sci.o
Xdiff -c -d 23feb90/scrt/scinit.c 24mar90/scrt/scinit.c
X*** 23feb90/scrt/scinit.c	Fri Feb 23 01:47:40 1990
X--- 24mar90/scrt/scinit.c	Sat Mar 24 05:21:40 1990
X***************
X*** 53,58 ****
X--- 53,70 ----
X  extern  errno;			/* C-library Error flag */
X  
X  extern  etext;
X+ #ifdef SPARC
X+ #define ETEXT	((int)&etext)	/* First address after text */
X+ #include <sun4/vmparam.h>
X+ #define STACKBASE (int*)USRSTACK
X+ #endif
X+ #ifdef ISC386IX
X+ #define ETEXT	((int)&etext)	/* First address after text */
X+ #include <sys/types.h>
X+ #include <sys/fcntl.h>		/* probably should be elsewhere */
X+ #include <sys/immu.h>
X+ #define STACKBASE (int*)UVSTACK
X+ #endif
X  #ifdef MIPS
X  #define ETEXT	((int)&etext)	/* First address after text */
X  #include <mips/param.h>
X***************
X*** 71,78 ****
X  #define STACKBASE (int*)USRSTACK
X  #endif
X  
X- #include <sys/file.h>
X  #include <sys/types.h>
X  #include <sys/uio.h>
X  #include <strings.h>
X  #include <varargs.h>
X--- 83,90 ----
X  #define STACKBASE (int*)USRSTACK
X  #endif
X  
X  #include <sys/types.h>
X+ #include <sys/file.h>
X  #include <sys/uio.h>
X  #include <strings.h>
X  #include <varargs.h>
X***************
X*** 182,187 ****
X--- 194,200 ----
X  
X  static  init_procs()
X  {
X+ #if ! SYSV
X          INITIALIZEVAR( U_TX( ADR( t1030 ) ), 
X                         ADR( sc_my_2drusage_v ), 
X                         MAKEPROCEDURE( 0, 
X***************
X*** 191,196 ****
X--- 204,210 ----
X                         MAKEPROCEDURE( 0, 
X                                        0, 
X                                        sc_collect_2drusage, EMPTYLIST ) );
X+ #endif
X          INITIALIZEVAR( U_TX( ADR( t1034 ) ), 
X                         ADR( sc_collect_v ), 
X                         MAKEPROCEDURE( 0, 
X***************
X*** 717,722 ****
X--- 731,742 ----
X  	      sc_cons(
X  	         sc_cstringtostring( "23feb90jfb" ),
X  	         sc_cons(
X+ #ifdef SPARC
X+ 		    sc_cstringtostring( "SparcStation-1" ),
X+ #endif
X+ #ifdef I386
X+ 		    sc_cstringtostring( "AT/386" ),
X+ #endif
X  #ifdef MIPS
X  		    sc_cstringtostring( "DECstation3100" ),
X  #endif
X***************
X*** 727,732 ****
X--- 747,758 ----
X  		    sc_cstringtostring( "VAX" ),
X  #endif
X  		    sc_cons(
X+ #ifdef SPARC
X+ 		       sc_cstringtostring( "SPARC" ),
X+ #endif
X+ #ifdef I386
X+ 		       sc_cstringtostring( "Intel 386" ),
X+ #endif
X  #ifdef MIPS
X  		       sc_cstringtostring( "R2000" ),
X  #endif
X***************
X*** 737,743 ****
X--- 763,778 ----
X  		       sc_cstringtostring( "VAX" ),
X  #endif
X  		       sc_cons(
X+ #ifdef SPARC
X+ 			  sc_cstringtostring( "SunOS" ),
X+ #else
X+ #if VAX || TITAN || MIPS
X  		          sc_cstringtostring( "ULTRIX" ),
X+ #endif
X+ #if SYSV
X+ 			  sc_cstringtostring( "System V.3.2" ),
X+ #endif
X+ #endif
X  		          sc_cons(
X  			      FALSEVALUE,
X  			      EMPTYLIST
X***************
X*** 749,752 ****
X--- 784,792 ----
X  	          )
X  	      );
X  }
X+ 
X+ 
X+ 
X+ 
X+ 
X  
XOnly in 24mar90/scrt: scinit.o
XOnly in 24mar90/scrt: scqquote.o
XOnly in 24mar90/scrt: screp.o
XOnly in 24mar90/scrt: scrt1.o
XOnly in 24mar90/scrt: scrt2.o
XOnly in 24mar90/scrt: scrt3.o
XOnly in 24mar90/scrt: scrt4.o
XOnly in 24mar90/scrt: scrt5.o
XOnly in 24mar90/scrt: scrt6.o
Xdiff -c -d 23feb90/scrt/signal.c 24mar90/scrt/signal.c
X*** 23feb90/scrt/signal.c	Fri Feb 23 01:47:51 1990
X--- 24mar90/scrt/signal.c	Sat Mar 24 05:01:18 1990
X***************
X*** 116,122 ****
X--- 116,126 ----
X  	}
X  	else  {
X  	   /* Signal must be defered */
X+ #if SYSV
X+ 	   sighold( signal );
X+ #else
X  	   sigblock( 1<<signal );
X+ #endif
X  	   pendingsignals = pendingsignals | (1<<signal);
X  	   if  (gcinprogress == 0)  sc_pendingsignals = 1;
X  	}
X***************
X*** 148,159 ****
X  	/* Send the pending signals and exit the critical section */
X  	sc_pendingsignals = 0;
X  	self = getpid();
X  	oldmask = sigblock( -1 ) & ~pendingsignals;
X  	for  (i = 0; i < 32; i++)
X! 	   if  (pendingsignals & (1<<i))  kill( self, i );
X  	pendingsignals = 0;
X  	sc_mutex = 0;
X  	sigsetmask( oldmask );
X  
X  	/* Apply the when-unreferenced procedures */
X  	while  (freed != EMPTYLIST)  {
X--- 152,172 ----
X  	/* Send the pending signals and exit the critical section */
X  	sc_pendingsignals = 0;
X  	self = getpid();
X+ #if ! SYSV
X  	oldmask = sigblock( -1 ) & ~pendingsignals;
X+ #endif
X  	for  (i = 0; i < 32; i++)
X! 	  if  (pendingsignals & (1<<i)) {
X! #if SYSV
X! 	    sigrelse( i );
X! #endif
X! 	    kill( self, i );
X! 	  }
X  	pendingsignals = 0;
X  	sc_mutex = 0;
X+ #if ! SYSV
X  	sigsetmask( oldmask );
X+ #endif
X  
X  	/* Apply the when-unreferenced procedures */
X  	while  (freed != EMPTYLIST)  {
XOnly in 24mar90/scrt: signal.o
XOnly in 24mar90/scrt: sparc.s
END_OF_FILE
if test 19852 -ne `wc -c <'both.patch'`; then
    echo shar: \"'both.patch'\" unpacked with wrong size!
fi
# end of 'both.patch'
fi
if test -f 'tar.fix' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'tar.fix'\"
else
echo shar: Extracting \"'tar.fix'\" \(6479 characters\)
sed "s/^X//" >'tar.fix' <<'END_OF_FILE'
X#!/bin/sh
X#
X# Script to extract the 23feb90.tar.Z distribution of the
X# Scheme->C compiler on System V-ish systems with silly file
X# name length restrictions.
X#
X# The SysV.3.2 tar reports many bad extents when extracting
X# this archive, but it appears to extract everything correctly
X# anyway.
X#
X# Parameters that you should set according to your system
X# conventions and convenience.
X#
Xarchive=/usr/local/src/archives/23feb90.tar.Z
Xdestdir=/usr/local/src/23feb90
Xtempdir=/tmp
X#
X# Extract the archive.
X#
X
Xmkdir $destdir
Xzcat $archive | (cd $destdir; tar xfo -)
X
X#
X# Rename some files in place
X#
Xmv $destdir/gnuemacs/s2c-gnuemacs.README $destdir/gnuemacs/s2c.README
Xmv $destdir/gnuemacs/s2c-gnuemacs.el $destdir/gnuemacs/s2c.el
X
Xmv $destdir/scrt/scexpanders1.sc $destdir/scrt/scexpand1.sc
Xmv $destdir/scrt/scexpanders2.sc $destdir/scrt/scexpand2.sc
Xmv $destdir/scrt/scexpanders1.c $destdir/scrt/scexpand1.c
Xmv $destdir/scrt/scexpanders2.c $destdir/scrt/scexpand2.c
Xed $destdir/scrt/makefile-tail << %
Xg/scexpanders/s//scexpand/g
Xw
Xq
X%
X
Xmv $destdir/test/test20-input.sc $destdir/test/test20-in.sc
Xed $destdir/test/test20.sc << %
Xg/test20-input.sc/s//test20-in.sc/g
Xw
Xq
X%
X
X#
X# Can't figure any good thing to do with these two
X# files, and their truncated names are harmless.
X# mv $destdir/xlib/Xcursorfont.cdecl $destdir/xlib/...
X# mv $destdir/xlib/Xresource.cdecl $destdir/xlib/...
X#
Xmv $destdir/xlib/xtextitem.c $destdir/xlib/xtext.c
Xmv $destdir/xlib/xtextitem.sc $destdir/xlib/xtext.sc
Xmv $destdir/xlib/xtextitem.sch $destdir/xlib/xtext.sch
X
X#
X# Now comes the ugly part.
X#
XSCH="xlib/xcharstruct.sch xlib/xcomposestatus.sch xlib/xfontstruct.sch\
X xlib/xhostaddress.sch xlib/xkeyboardcontrol.sch xlib/xkeyboardstate.sch\
X xlib/xlibCONSTANTS.sch xlib/xmodifierkeymap.sch xlib/xrmoptiondescrec.sch\
X xlib/xsetwindowattributes.sch xlib/xstandardcolormap.sch xlib/xtextitem16.sch\
X xlib/xvisualinfo.sch xlib/xwindowattributes.sch xlib/xwindowchanges.sch"
XC="xlib/xcharstruct.c xlib/xcomposestatus.c xlib/xfontstruct.c\
X xlib/xhostaddress.c xlib/xkeyboardcontrol.c xlib/xkeyboardstate.c\
X xlib/xlibCONSTANTS.c xlib/xmodifierkeymap.c xlib/xrmoptiondescrec.c\
X xlib/xsetwindowattributes.c xlib/xstandardcolormap.c xlib/xtextitem16.c\
X xlib/xvisualinfo.c xlib/xwindowattributes.c xlib/xwindowchanges.c"
XSC="xlib/xcharstruct.sc xlib/xcomposestatus.sc xlib/xfontstruct.sc\
X xlib/xhostaddress.sc xlib/xkeyboardcontrol.sc xlib/xkeyboardstate.sc\
X xlib/xlibCONSTANTS.sc xlib/xmodifierkeymap.sc xlib/xrmoptiondescrec.sc\
X xlib/xsetwindowattributes.sc xlib/xstandardcolormap.sc xlib/xtextitem16.sc\
X xlib/xvisualinfo.sc xlib/xwindowattributes.sc xlib/xwindowchanges.sc"
X
X#
X# Extract the overlong files into $tempdir.
X#
Xmkdir $tempdir/xlib
Xcd $tempdir/xlib
Xzcat $archive | tar xfo - $SCH
Xmv xlib sch
Xzcat $archive | tar xfo - $SC
Xmv xlib sc
Xzcat $archive | tar xfo - $C
Xmv xlib c
X
X#
X# Remove the truncated file names from $destdir
X#
Xcd $destdir
Xrm -f $SCH
Xrm -f $SC
Xrm -f $C
X
X#
X# Move files to new names.
X#
Xmv $tempdir/xlib/c/xcharstruct.c $destdir/xlib/xcharstr.c
Xmv $tempdir/xlib/sc/xcharstruct.sc $destdir/xlib/xcharstr.sc
Xmv $tempdir/xlib/sch/xcharstruct.sch $destdir/xlib/xcharstr.sch
Xmv $tempdir/xlib/c/xcomposestatus.c $destdir/xlib/xcomstat.c
Xmv $tempdir/xlib/sc/xcomposestatus.sc $destdir/xlib/xcomstat.sc
Xmv $tempdir/xlib/sch/xcomposestatus.sch $destdir/xlib/xcomstat.sch
Xmv $tempdir/xlib/c/xfontstruct.c $destdir/xlib/xfontstr.c
Xmv $tempdir/xlib/sc/xfontstruct.sc $destdir/xlib/xfontstr.sc
Xmv $tempdir/xlib/sch/xfontstruct.sch $destdir/xlib/xfontstr.sch
Xmv $tempdir/xlib/c/xhostaddress.c $destdir/xlib/xhostaddr.c
Xmv $tempdir/xlib/sc/xhostaddress.sc $destdir/xlib/xhostaddr.sc
Xmv $tempdir/xlib/sch/xhostaddress.sch $destdir/xlib/xhostaddr.sch
Xmv $tempdir/xlib/c/xkeyboardcontrol.c $destdir/xlib/xkbdcont.c
Xmv $tempdir/xlib/sc/xkeyboardcontrol.sc $destdir/xlib/xkbdcont.sc
Xmv $tempdir/xlib/sch/xkeyboardcontrol.sch $destdir/xlib/xkbdcont.sch
Xmv $tempdir/xlib/c/xkeyboardstate.c $destdir/xlib/xkbdstat.c
Xmv $tempdir/xlib/sc/xkeyboardstate.sc $destdir/xlib/xkbdstat.sc
Xmv $tempdir/xlib/sch/xkeyboardstate.sch $destdir/xlib/xkbdstat.sch
Xmv $tempdir/xlib/c/xlibCONSTANTS.c $destdir/xlib/xlibCONST.c
Xmv $tempdir/xlib/sc/xlibCONSTANTS.sc $destdir/xlib/xlibCONST.sc
Xmv $tempdir/xlib/sch/xlibCONSTANTS.sch $destdir/xlib/xlibCONST.sch
Xmv $tempdir/xlib/c/xmodifierkeymap.c $destdir/xlib/xmodmap.c
Xmv $tempdir/xlib/sc/xmodifierkeymap.sc $destdir/xlib/xmodmap.sc
Xmv $tempdir/xlib/sch/xmodifierkeymap.sch $destdir/xlib/xmodmap.sch
Xmv $tempdir/xlib/c/xrmoptiondescrec.c $destdir/xlib/xrmoption.c
Xmv $tempdir/xlib/sc/xrmoptiondescrec.sc $destdir/xlib/xrmoption.sc
Xmv $tempdir/xlib/sch/xrmoptiondescrec.sch $destdir/xlib/xrmoption.sch
Xmv $tempdir/xlib/c/xsetwindowattributes.c $destdir/xlib/xswinattr.c
Xmv $tempdir/xlib/sc/xsetwindowattributes.sc $destdir/xlib/xswinattr.sc
Xmv $tempdir/xlib/sch/xsetwindowattributes.sch $destdir/xlib/xswinattr.sch
Xmv $tempdir/xlib/c/xstandardcolormap.c $destdir/xlib/xstdcmap.c
Xmv $tempdir/xlib/sc/xstandardcolormap.sc $destdir/xlib/xstdcmap.sc
Xmv $tempdir/xlib/sch/xstandardcolormap.sch $destdir/xlib/xstdcmap.sch
Xmv $tempdir/xlib/c/xtextitem16.c $destdir/xlib/xtext16.c
Xmv $tempdir/xlib/sc/xtextitem16.sc $destdir/xlib/xtext16.sc
Xmv $tempdir/xlib/sch/xtextitem16.sch $destdir/xlib/xtext16.sch
Xmv $tempdir/xlib/c/xvisualinfo.c $destdir/xlib/xvinfo.c
Xmv $tempdir/xlib/sc/xvisualinfo.sc $destdir/xlib/xvinfo.sc
Xmv $tempdir/xlib/sch/xvisualinfo.sch $destdir/xlib/xvinfo.sch
Xmv $tempdir/xlib/c/xwindowattributes.c $destdir/xlib/xwinattr.c
Xmv $tempdir/xlib/sc/xwindowattributes.sc $destdir/xlib/xwinattr.sc
Xmv $tempdir/xlib/sch/xwindowattributes.sch $destdir/xlib/xwinattr.sch
Xmv $tempdir/xlib/c/xwindowchanges.c $destdir/xlib/xwinchgs.c
Xmv $tempdir/xlib/sc/xwindowchanges.sc $destdir/xlib/xwinchgs.sc
Xmv $tempdir/xlib/sch/xwindowchanges.sch $destdir/xlib/xwinchgs.sch
X
X#
X# Clean up $tempdir
X#
X
Xrm -fr $tempdir/xlib
X
X#
X# Rewrite the makefile.
X#
Xed $destdir/xlib/makefile << %
Xg/xcharstruct/s//xcharstr/g
Xg/xcomposestatus/s//xcomstat/g
Xg/xfontstruct/s//xfontstr/g
Xg/xhostaddress/s//xhostaddr/g
Xg/xkeyboardcontrol/s//xkbdcont/g
Xg/xkeyboardstate/s//xkbdstat/g
Xg/xlibCONSTANTS/s//xlibCONST/g
Xg/xmodifierkeymap/s//xmodmap/g
Xg/xrmoptiondescrec/s//xrmoption/g
Xg/xsetwindowattributes/s//xswinattr/g
Xg/xstandardcolormap/s//xstdcmap/g
Xg/xtextitem16/s//xtext16/g
Xg/xtextitem/s//xtext/g
Xg/xvisualinfo/s//xvinfo/g
Xg/xwindowattributes/s//xwinattr/g
Xg/xwindowchanges/s//xwinchgs/g
Xw
Xq
X%
X
END_OF_FILE
if test 6479 -ne `wc -c <'tar.fix'`; then
    echo shar: \"'tar.fix'\" unpacked with wrong size!
fi
# end of 'tar.fix'
fi
echo shar: End of shell archive.
exit 0
Return-Path: arris!arris.com!rec@uunet.UU.NET
Received: by jove.pa.dec.com; id AA01514; Mon, 26 Mar 90 15:46:31 -0800
Received: by decwrl.dec.com; id AA23612; Mon, 26 Mar 90 09:51:48 -0800
Received: from arris.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA12008; Mon, 26 Mar 90 12:51:08 -0500
Received: by arris.com (4.1/SMI-4.0)
	id AA15403; Mon, 26 Mar 90 12:45:59 EST
Date: Mon, 26 Mar 90 12:45:59 EST
From: rec@arris.com (Roger Critchlow)
Message-Id: <9003261745.AA15403@arris.com>
To: bartlett
Subject: bigendian patches for 23feb90/test/test16.sc

After sending off the patches, I realized that it might have been prudent
to test them a little more thoroughly.  I should have tried to compile the
scheme sources for the runtime, interpreter, compiler, and X11 libraries.
As it stands, the patches have passed the tests and built the xclients
you supplied.

Here's the patch I made to the tests in test16.sc to allow the
SPARC to pass.

Yours, 

-- rec --

----------------------------------------------------------
*** test16.sc	Thu Feb 22 21:11:07 1990
--- ../../schemetoc/test/test16.sc	Fri Mar 16 16:31:46 1990
***************
*** 52,57 ****
--- 52,60 ----
  ;;; *.*  Extensions for accessing C structures.  At the moment, they assume
  ;;;      that the bits are ordered like the VAX.
  
+   (let ((big-endian (member (list-ref (implementation-information) 3)
+ 			    '("SPARC"))))
+ 
      (let ((s (make-string 10 #\*)))
  	 (c-byte-set! s 0 (char->integer #\S))
  	 (c-byte-set! s 1 (char->integer #\c))
***************
*** 71,84 ****
      (let ((s (make-string 10 #\*)))
  	 (c-int-set! s 0 #xffff)
  	 (chk 10 (c-int-ref s 0) #xffff)
! 	 (chk 11 (c-shortunsigned-ref s 0) #xffff)
! 	 (chk 12 (c-shortunsigned-ref s 2) 0)
! 	 (chk 13 (c-shortint-ref s 0) -1)
! 	 (chk 14 (c-shortint-ref s 2) 0)
! 	 (c-shortint-set! s 2 -1)
! 	 (chk 15 (c-int-ref s 0) -1)
! 	 (c-shortunsigned-set! s 0 #xfffe)
! 	 (chk 16 (c-int-ref s 0) -2))
  
      (let ((s (make-string 10 #\*)))
  	 (c-unsigned-set! s 0 (- (expt 2 32) 1))
--- 74,98 ----
      (let ((s (make-string 10 #\*)))
  	 (c-int-set! s 0 #xffff)
  	 (chk 10 (c-int-ref s 0) #xffff)
! 	 (if big-endian
! 	     (begin
! 	       (chk 11 (c-shortunsigned-ref s 2) #xffff)
! 	       (chk 12 (c-shortunsigned-ref s 0) 0)
! 	       (chk 13 (c-shortint-ref s 2) -1)
! 	       (chk 14 (c-shortint-ref s 0) 0)
! 	       (c-shortint-set! s 0 -1)
! 	       (chk 15 (c-int-ref s 0) -1)
! 	       (c-shortunsigned-set! s 2 #xfffe)
! 	       (chk 16 (c-int-ref s 0) -2))
! 	     (begin
! 	       (chk 11 (c-shortunsigned-ref s 0) #xffff)
! 	       (chk 12 (c-shortunsigned-ref s 2) 0)
! 	       (chk 13 (c-shortint-ref s 0) -1)
! 	       (chk 14 (c-shortint-ref s 2) 0)
! 	       (c-shortint-set! s 2 -1)
! 	       (chk 15 (c-int-ref s 0) -1)
! 	       (c-shortunsigned-set! s 0 #xfffe)
! 	       (chk 16 (c-int-ref s 0) -2))))
  
      (let ((s (make-string 10 #\*)))
  	 (c-unsigned-set! s 0 (- (expt 2 32) 1))
***************
*** 99,105 ****
  
      (let ((s (make-string 10 #\*))
  	  (v (make-vector 10 -1)))
! 	 (chk 40 (scheme-byte-ref s 1) 10)
  	 (chk 41 (scheme-byte-ref s 4) (char->integer #\*))
  	 (chk 42 (scheme-byte-ref s 14) 0)
  	 (scheme-byte-set! s 5 (char->integer #\^))
--- 113,121 ----
  
      (let ((s (make-string 10 #\*))
  	  (v (make-vector 10 -1)))
!          (if big-endian
! 	     (chk 40 (scheme-byte-ref s 2) 10)
! 	     (chk 40 (scheme-byte-ref s 1) 10))
  	 (chk 41 (scheme-byte-ref s 4) (char->integer #\*))
  	 (chk 42 (scheme-byte-ref s 14) 0)
  	 (scheme-byte-set! s 5 (char->integer #\^))
***************
*** 123,126 ****
  	 (chk 55 (bit-or 1 3 5) 7)
  	 (chk 56 (bit-xor 1 3 5) 7)
  	 (chk 57 (bit-lsh 1 31) 2147483648.)
! 	 (chk 58 (bit-rsh -1 31) 1))
--- 139,142 ----
  	 (chk 55 (bit-or 1 3 5) 7)
  	 (chk 56 (bit-xor 1 3 5) 7)
  	 (chk 57 (bit-lsh 1 31) 2147483648.)
! 	 (chk 58 (bit-rsh -1 31) 1)))
