mit-scheme.git
15 years agoAdd rule to make MacOS X application.
Chris Hanson [Mon, 14 Dec 2009 05:15:06 +0000 (21:15 -0800)]
Add rule to make MacOS X application.

15 years agoWrap over-long line.
Chris Hanson [Mon, 14 Dec 2009 05:13:45 +0000 (21:13 -0800)]
Wrap over-long line.

15 years agoWrap over-long line.
Chris Hanson [Mon, 14 Dec 2009 05:09:38 +0000 (21:09 -0800)]
Wrap over-long line.

15 years agoRestructure to allow caller to override various environment variables.
Chris Hanson [Mon, 14 Dec 2009 04:29:14 +0000 (20:29 -0800)]
Restructure to allow caller to override various environment variables.

15 years agoUse autoconf macro to capture code that computes native-code value.
Chris Hanson [Mon, 14 Dec 2009 03:56:55 +0000 (19:56 -0800)]
Use autoconf macro to capture code that computes native-code value.

15 years agoMake sure AC_CHECK_DECL is run *after* AC_PROG_CC.
Chris Hanson [Mon, 14 Dec 2009 00:02:07 +0000 (16:02 -0800)]
Make sure AC_CHECK_DECL is run *after* AC_PROG_CC.

15 years agoInclude icon in app.
Chris Hanson [Sun, 13 Dec 2009 06:07:34 +0000 (22:07 -0800)]
Include icon in app.

15 years agoUse much larger default heap size on 64-bit machines.
Chris Hanson [Sun, 13 Dec 2009 05:53:46 +0000 (21:53 -0800)]
Use much larger default heap size on 64-bit machines.

15 years agoUse much larger default heap size on 64-bit machines.
Chris Hanson [Sun, 13 Dec 2009 05:53:01 +0000 (21:53 -0800)]
Use much larger default heap size on 64-bit machines.

15 years agoWhen compiler supports x86-64, use x86-64 in preference to x86.
Chris Hanson [Sun, 13 Dec 2009 05:43:41 +0000 (21:43 -0800)]
When compiler supports x86-64, use x86-64 in preference to x86.

15 years agoFind structure field default value procedures by index, not by name.
Taylor R Campbell [Fri, 11 Dec 2009 01:54:49 +0000 (20:54 -0500)]
Find structure field default value procedures by index, not by name.

Otherwise, every constructor generated by DEFINE-STRUCTURE performs
lookups by name for every field with a default initializer, every
time you call the constructor.

This is a backward-compatible change, in the sense that .bin and .com
files generated with the old definition of DEFINE-STRUCTURE can still
be loaded into images with the new definition of DEFINE-STRUCTURE and
its corresponding run-time support.  However, .bin and .com files
generated with the new definition cannot be loaded into images with
the old run-time support, which lacks procedures needed by the new
definition for lookup by index.

Note: For the full benefit of this change, run at least a two-stage
build so that the runtime will include the new definition and be
compiled with the new definition.

15 years agoBum case canonicalization and character input in the parser.
Taylor R Campbell [Fri, 11 Dec 2009 01:19:15 +0000 (20:19 -0500)]
Bum case canonicalization and character input in the parser.

This avoids an ASSQ for every character read and some interpreter
environment lookups for every character dispatched on and atom read,
and replaces a general unknown procedure call by some open-coded
string and character operations for every character read in an atom
to canonicalize its case.

15 years agoUse PRIMITIVE-OBJECT-SET-TYPE, not OBJECT-SET-TYPE, in EOF-OBJECT.
Taylor R Campbell [Fri, 11 Dec 2009 00:39:15 +0000 (19:39 -0500)]
Use PRIMITIVE-OBJECT-SET-TYPE, not OBJECT-SET-TYPE, in EOF-OBJECT.

Neither is constant-folded, but PRIMITIVE-OBJECT-SET-TYPE is
open-coded while OBJECT-SET-TYPE is not.  (Is there a reason for
this?  An artefact of Multischeme?)

15 years agoExport ERROR:NOT-INPUT-PORT and ERROR:NOT-OUTPUT-PORT.
Taylor R Campbell [Fri, 11 Dec 2009 00:22:08 +0000 (19:22 -0500)]
Export ERROR:NOT-INPUT-PORT and ERROR:NOT-OUTPUT-PORT.

These should be exported anyway, but in particular they caused
INTEGRATE-EXTERNAL in files other than port.scm to generate
references to them out of their scope.

15 years agoReduce (<= a b ...) to (and (<= a b) ...) in genio column tracking.
Taylor R Campbell [Thu, 10 Dec 2009 23:29:17 +0000 (18:29 -0500)]
Reduce (<= a b ...) to (and (<= a b) ...) in genio column tracking.

Neither SF nor LIAR currently performs that reduction, so every
character written to a generic I/O port was causing a rest list to be
consed up and control to go through a generic microcode primitive
trampoline to do the reduction at run-time.

Also use FIX:<= rather than <=, since the numbers in question are all
fixnums.

15 years agoFix ERROR:ILLEGAL-STREAM-ELEMENT in runtime/stream.scm.
Taylor R Campbell [Wed, 9 Dec 2009 17:43:44 +0000 (12:43 -0500)]
Fix ERROR:ILLEGAL-STREAM-ELEMENT in runtime/stream.scm.

The first argument to what CONDITION-CONSTRUCTOR returns must be a
continuation, so (ERROR (MAKE-ILLEGAL-STREAM-ELEMENT ...)) doesn't
work.  Instead use CONDITION-SIGNALLER.

15 years agoFix bug in recent change to runtime/uenvir.scm's WALK-GLOBAL.
Taylor R Campbell [Fri, 4 Dec 2009 21:36:08 +0000 (16:36 -0500)]
Fix bug in recent change to runtime/uenvir.scm's WALK-GLOBAL.

MAP-ENTRY takes two arguments, not just one.

15 years agoUse weak pairs for some entries in obarray buckets.
Taylor R Campbell [Thu, 3 Dec 2009 01:53:54 +0000 (20:53 -0500)]
Use weak pairs for some entries in obarray buckets.

Entries for symbols with global bindings still use ordinary pairs.
This enables interned symbols without global bindings to be garbage-
collected.  Operations in lookup.c that create or destroy global
bindings update the relevant obarray bucket entry to strengthen or
weaken it.

In the process, fix intern.c's string_hash to accept a long string
length, rather than a uint32_t string length, so that strings longer
than 4 GB will not lose on 64-bit systems.

15 years agoFix invocation of out-of-line FIXNUM-LSH hook for i386 and x86-64.
Taylor R Campbell [Tue, 1 Dec 2009 20:24:50 +0000 (15:24 -0500)]
Fix invocation of out-of-line FIXNUM-LSH hook for i386 and x86-64.

Add comment explaining why it is unnecessary to clear the register
map before invoking the hook.

15 years agoClean up texinfo auxiliary files (e.g. imail.aux).
Matt Birkholz [Sun, 29 Nov 2009 21:23:10 +0000 (14:23 -0700)]
Clean up texinfo auxiliary files (e.g. imail.aux).

* doc/make-common.in (clean): Use new TEXINFO_ROOT variable to delete
the texinfo auxiliary files.  Also used it in place of the GNU make
specific "word" function.

* doc/imail/Makefile.in (clean): Set TEXINFO_ROOT.
* doc/sos/Makefile.in (clean): ditto
* doc/ref-manual/ref-manual (clean): ditto
* doc/user-manual/Makefile.in  (clean): ditto

15 years agoUse port/%state in genio ports.
Joe Marshall [Wed, 25 Nov 2009 00:58:00 +0000 (16:58 -0800)]
Use port/%state in genio ports.

15 years agoUse port/%state in stringio ports.
Joe Marshall [Wed, 25 Nov 2009 00:52:58 +0000 (16:52 -0800)]
Use port/%state in stringio ports.

15 years agoExport %char-set-member? to parser.
Joe Marshall [Tue, 24 Nov 2009 20:26:03 +0000 (12:26 -0800)]
Export %char-set-member? to parser.

15 years agoUse faster write-char when transcribing chars.
Joe Marshall [Tue, 24 Nov 2009 16:20:05 +0000 (08:20 -0800)]
Use faster write-char when transcribing chars.

15 years agoUse faster i/o in parse.
Joe Marshall [Tue, 24 Nov 2009 16:00:45 +0000 (08:00 -0800)]
Use faster i/o in parse.

15 years agoEnsure input and output are syntaxed early on.
Joe Marshall [Tue, 24 Nov 2009 02:25:26 +0000 (18:25 -0800)]
Ensure input and output are syntaxed early on.

15 years agoExport fast input and output operations.
Joe Marshall [Tue, 24 Nov 2009 02:23:35 +0000 (18:23 -0800)]
Export fast input and output operations.

15 years agoEnsure port is syntaxed before input and output.
Joe Marshall [Tue, 24 Nov 2009 02:12:55 +0000 (18:12 -0800)]
Ensure port is syntaxed before input and output.

15 years agoAdd fast write-char and discretionary-flush.
Joe Marshall [Tue, 24 Nov 2009 02:03:07 +0000 (18:03 -0800)]
Add fast write-char and discretionary-flush.

15 years agoAdd fast read-char and peek-char.
Joe Marshall [Tue, 24 Nov 2009 02:02:19 +0000 (18:02 -0800)]
Add fast read-char and peek-char.

15 years agoExpose fast port operators.
Joe Marshall [Tue, 24 Nov 2009 01:18:41 +0000 (17:18 -0800)]
Expose fast port operators.

15 years agoCreate some accessors that don't check PORT?
Joe Marshall [Tue, 24 Nov 2009 00:58:58 +0000 (16:58 -0800)]
Create some accessors that don't check PORT?

15 years agoDon't run-boot-inits! if saved-boot-inits is unbound.
Joe Marshall [Tue, 24 Nov 2009 00:30:41 +0000 (16:30 -0800)]
Don't run-boot-inits! if saved-boot-inits is unbound.

15 years agoAdd an assembly hook for SET-INTERRUPT-ENABLES! on i386.
Taylor R Campbell [Thu, 19 Nov 2009 19:06:57 +0000 (14:06 -0500)]
Add an assembly hook for SET-INTERRUPT-ENABLES! on i386.

15 years agoMark OVERFLOW? ignored in FIXNUM-LSH methods on i386 and x86-64.
Taylor R Campbell [Thu, 19 Nov 2009 18:34:43 +0000 (13:34 -0500)]
Mark OVERFLOW? ignored in FIXNUM-LSH methods on i386 and x86-64.

15 years agoShow only current year in start-up copyright.
Chris Hanson [Sun, 15 Nov 2009 08:27:08 +0000 (00:27 -0800)]
Show only current year in start-up copyright.

15 years agoFix references to flonum_zero and flonum_one.
Chris Hanson [Sat, 14 Nov 2009 22:29:34 +0000 (14:29 -0800)]
Fix references to flonum_zero and flonum_one.

15 years agoMake x86 and x86-64 assembly hooks for out-of-line FIXNUM-LSH.
Taylor R Campbell [Fri, 13 Nov 2009 19:52:06 +0000 (14:52 -0500)]
Make x86 and x86-64 assembly hooks for out-of-line FIXNUM-LSH.

I believe this now covers all cases, and is more reasonable than
generating for each FIXNUM-LSH invocation the nearly two dozen
instructions composing the assembly hooks.

Fixes Savannah bug 27384.

15 years agoFix bug in new double_round: flip order of arguments to copysign.
Taylor R Campbell [Fri, 13 Nov 2009 19:29:27 +0000 (14:29 -0500)]
Fix bug in new double_round: flip order of arguments to copysign.

15 years agoUse ja/jb, not jg/jl, in floating-point predicates on x86-64.
Taylor R Campbell [Fri, 13 Nov 2009 04:04:57 +0000 (23:04 -0500)]
Use ja/jb, not jg/jl, in floating-point predicates on x86-64.

15 years agoFix flonum case of ROUND to use IEEE round-to-even, per the R5RS.
Taylor R Campbell [Fri, 13 Nov 2009 03:48:28 +0000 (22:48 -0500)]
Fix flonum case of ROUND to use IEEE round-to-even, per the R5RS.

15 years agoFix i386 and x86-64 generic multiplication hooks on fixnums.
Taylor R Campbell [Thu, 12 Nov 2009 21:44:58 +0000 (16:44 -0500)]
Fix i386 and x86-64 generic multiplication hooks on fixnums.

Before multiplying, both tags must be cleared, and one of the
operands must be shifted to include a factor of 2^6.  Shifting both
operands, so that there is an extra factor of 2^12, or not clearing
the tag on both operands, is wrong.  However, this didn't affect any
real code, since the fixnum case of generic multiplication is always
open-coded by the compiler unless you futz with compiler switches.

15 years agoCache PORT/OPERATION/READ-CHAR in INPUT-PORT/READ-LINE and INPUT-PORT/READ-STRING.
Joe Marshall [Thu, 12 Nov 2009 19:29:35 +0000 (11:29 -0800)]
Cache PORT/OPERATION/READ-CHAR in INPUT-PORT/READ-LINE and INPUT-PORT/READ-STRING.

15 years agoRemove redundant PORT? test.
Joe Marshall [Thu, 12 Nov 2009 19:24:15 +0000 (11:24 -0800)]
Remove redundant PORT? test.

15 years agoFix bug in x86-64 instruction encoder: REX prefix must be last.
Taylor R Campbell [Thu, 12 Nov 2009 18:05:26 +0000 (13:05 -0500)]
Fix bug in x86-64 instruction encoder: REX prefix must be last.

(Thanks, AMD, for making it seem like the 66, F2, and F3 bytes are
part of the `opcode' all throughout the media instruction set
manual.)

Also change ([U]COMISF ...) to be ([U]COMIF S ...) for consistency.

15 years agoFix headings on x86-64's instr1.scm, instr2.scm, and lapgen.scm.
Taylor R Campbell [Wed, 11 Nov 2009 21:37:26 +0000 (16:37 -0500)]
Fix headings on x86-64's instr1.scm, instr2.scm, and lapgen.scm.

15 years agoOpen-code floating-point primitives on AMD x86-64.
Taylor R Campbell [Wed, 11 Nov 2009 20:24:13 +0000 (15:24 -0500)]
Open-code floating-point primitives on AMD x86-64.

Only lightly tested.  Use with caution.  Slippery when wet.  Keep out
of reach of children.

15 years agoTest stack overflow in LIARC interrupt checks.
Taylor R Campbell [Mon, 9 Nov 2009 14:44:11 +0000 (09:44 -0500)]
Test stack overflow in LIARC interrupt checks.

15 years agoProvide default binding for MIT_SCHEME_EXE.
Chris Hanson [Sun, 8 Nov 2009 04:55:56 +0000 (20:55 -0800)]
Provide default binding for MIT_SCHEME_EXE.

15 years agoAdd quote marks to instances of MIT_SCHEME_EXE to provide some
Chris Hanson [Sun, 8 Nov 2009 04:55:23 +0000 (20:55 -0800)]
Add quote marks to instances of MIT_SCHEME_EXE to provide some
protection from the shell.

15 years agoShow "aborted" when leaving the extent of an unfinished notification
Chris Hanson [Sun, 8 Nov 2009 01:06:26 +0000 (17:06 -0800)]
Show "aborted" when leaving the extent of an unfinished notification
thunk.

15 years agoFix typo.
Chris Hanson [Fri, 6 Nov 2009 23:57:25 +0000 (15:57 -0800)]
Fix typo.

15 years agoMerge git pull.
Chris Hanson [Fri, 6 Nov 2009 22:06:13 +0000 (14:06 -0800)]
Merge git pull.

15 years agoAdjust script so that MIT_SCHEME_EXE is just the executable name, not
Chris Hanson [Fri, 6 Nov 2009 22:01:45 +0000 (14:01 -0800)]
Adjust script so that MIT_SCHEME_EXE is just the executable name, not
a partial shell command.  Figure out stage library directory using
wildcard, since it now has an arch-specific suffix.  Allow override of
default stage0 dirs.

15 years agoFix thinko: the boot-root executable is _not_ $(MIT_SCHEME_EXE).
Chris Hanson [Fri, 6 Nov 2009 21:58:38 +0000 (13:58 -0800)]
Fix thinko: the boot-root executable is _not_ $(MIT_SCHEME_EXE).

15 years agoFix typo.
Chris Hanson [Fri, 6 Nov 2009 21:58:00 +0000 (13:58 -0800)]
Fix typo.

15 years agoFix various minor problems introduced in the configure scripts.
Taylor R Campbell [Fri, 6 Nov 2009 21:01:58 +0000 (16:01 -0500)]
Fix various minor problems introduced in the configure scripts.

Also kludge up a fix to etc/run-three-stages.

15 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Fri, 6 Nov 2009 05:41:15 +0000 (00:41 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

15 years agoSimplify x86-64 utility interface, and nuke all x87 code from it.
Taylor R Campbell [Fri, 6 Nov 2009 04:40:26 +0000 (23:40 -0500)]
Simplify x86-64 utility interface, and nuke all x87 code from it.

The calling convention for microcode utilities now more closely
matches the standard calling convention for C on the AMD64, which
reduces the amount of code needed in scheme_to_interface.  The i386
hack to split the assembly hook addresses between negative addresses
and positive addresses is no more; most of what little benefit it
added on the i386, it ceased to add on x86-64, since no hooks fit in
positive byte offsets from the register block start any longer, and
only sixteen would fit in negative byte offsets.  Perhaps later it
would be worth deciding which sixteen deserve byte offsets (e.g.,
scheme-to-interface certainly would), but this is simpler for now.
Note that there is still a space advantage to invoking a hook (jump
to an offset from Registers) over invoking an interface (move its
number to AL, jump to scheme-to-interface), since invoking an
interface requires going through a hook anyway.

These change serves mainly to simplify the code, not to improve
performance, although shuffling the calling convention may improve
performance as a bonus.

The x87 code appears to have been causing problems, and will later
be replaced by the AMD64's 128-bit media (SSEn) instructions anyway.
The compiler still has some x87 vestiges left in it, but not in any
code that is hit, and nearly all of it is commented out now.

*** NOTE:  Since this changes the calling convention of utilities
from compiled code, it breaks all existing x86-64 .com files, which
you must recompile with the new compiler.  This means that you can't
straightforwardly rebuild Scheme the usual way from a prior x86-64
installation.  The easiest way to proceed is to start again from a
LIARC snapshot and rebootstrap the x86-64 code.  Expect more of this
to come; in particular, since we now have a reasonable number of
machine registers, it may be worthwhile to assign one to be the
return value register.

15 years agoFix problem with compiler/configure: it needed to be updated to match
Chris Hanson [Thu, 5 Nov 2009 11:23:12 +0000 (03:23 -0800)]
Fix problem with compiler/configure: it needed to be updated to match
the other changes around it.  Also, rewrite the script to meet
autoconf portable shell recommendations.

15 years agoFix and simplify handling of MIT_SCHEME_EXE in top-level configure.
Chris Hanson [Thu, 5 Nov 2009 10:42:26 +0000 (02:42 -0800)]
Fix and simplify handling of MIT_SCHEME_EXE in top-level configure.

15 years agoAlways test for existing Scheme, except when running etc/make-liarc.sh.
Chris Hanson [Thu, 5 Nov 2009 10:27:36 +0000 (02:27 -0800)]
Always test for existing Scheme, except when running etc/make-liarc.sh.

15 years agoIgnore variants on standard binary dirs.
Chris Hanson [Thu, 5 Nov 2009 08:27:36 +0000 (00:27 -0800)]
Ignore variants on standard binary dirs.

15 years agoChanges to allow multiple architecture binaries to co-exist in the
Chris Hanson [Thu, 5 Nov 2009 08:24:37 +0000 (00:24 -0800)]
Changes to allow multiple architecture binaries to co-exist in the
same file system.  In MacOS X, for example, both the i386 and x86-64
architectures can be used, so it's useful to have both available for
development work, if nothing else.

* Change primary executable name and library name to
  "mit-scheme-ARCH".

* Create a new shell script in the microcode that implements the
  decision logic for choosing a target architecture, based on the host
  architecture and the --enable-native-code argument.  Use this script
  in both the top-level configure file and the microcode configure
  file, so that they agree on the architecture and the corresponding
  names.

* Add logic to create an executable symlink "mit-scheme-native"
  pointing to a native-code executable.  This name is used when we
  need a native-code implementation but don't care which one.  (It's
  also for compatibility.)

* Rework several shell scripts to make them more portable, using the
  autoconf shell portability recommendations.

15 years agoSimplify gcloop.c's tospace_open.
Taylor R Campbell [Thu, 5 Nov 2009 03:39:38 +0000 (22:39 -0500)]
Simplify gcloop.c's tospace_open.

This need not have a conditional; it is called only when the
condition is true, to report the error.  This may not have been the
source, but Gerry observed GCC stumble into an internal compiler
error while compiling this procedure!

15 years agoEliminate irrelevant reference to OS/2.
Chris Hanson [Wed, 4 Nov 2009 07:09:47 +0000 (23:09 -0800)]
Eliminate irrelevant reference to OS/2.

15 years agoWork around problem with SDX addressing mode under MacOS.
Chris Hanson [Wed, 4 Nov 2009 07:06:26 +0000 (23:06 -0800)]
Work around problem with SDX addressing mode under MacOS.

15 years agoAllow --enable-native-code to override default code generator.
Chris Hanson [Wed, 4 Nov 2009 07:05:55 +0000 (23:05 -0800)]
Allow --enable-native-code to override default code generator.

15 years agoFix thinko; add support for x86-64 on MacOS.
Chris Hanson [Tue, 3 Nov 2009 07:48:10 +0000 (23:48 -0800)]
Fix thinko; add support for x86-64 on MacOS.

15 years agoAdd icon file for MacOS app.
Chris Hanson [Tue, 3 Nov 2009 05:03:01 +0000 (21:03 -0800)]
Add icon file for MacOS app.

15 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Tue, 3 Nov 2009 04:48:31 +0000 (23:48 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

15 years agoSimplify x86-64 addressing mode syntax.
Taylor R Campbell [Tue, 3 Nov 2009 03:58:38 +0000 (22:58 -0500)]
Simplify x86-64 addressing mode syntax.

*** NOTE:  Since this changes machines/x86-64/insmac.scm, you must
resyntax the compiler afresh, e.g. by running

scheme --band runtime.com <<EOF
(for-each load-option '(SF CREF))
(load "compiler.sf")
EOF

Otherwise, the compiler will expand machines/x86-64/insutl.scm using
the old macro definitions, not the new ones, and grow very confused.
Using the host compiler's macros is pretty bogus.

15 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Tue, 3 Nov 2009 01:59:26 +0000 (20:59 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

15 years agoTreat PRIMITIVE-OBJECT-SET-TYPE as a side-effecting primitive.
Taylor R Campbell [Tue, 3 Nov 2009 01:50:09 +0000 (20:50 -0500)]
Treat PRIMITIVE-OBJECT-SET-TYPE as a side-effecting primitive.

This causes it not to be constant-folded, which was causing problems
for LIARC when compiling runtime/packag.scm, and which was probably
unsafe to do anyway.

15 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Mon, 2 Nov 2009 23:17:43 +0000 (18:17 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

15 years agoHook up x86-64 in the compiler and microcode's configure scripts.
Taylor R Campbell [Mon, 2 Nov 2009 21:46:15 +0000 (16:46 -0500)]
Hook up x86-64 in the compiler and microcode's configure scripts.

15 years agoSimplify INVOCATION:PRIMITIVE for x86-64.
Taylor R Campbell [Mon, 2 Nov 2009 21:43:49 +0000 (16:43 -0500)]
Simplify INVOCATION:PRIMITIVE for x86-64.

No generated code changes; the code implementing the rule has just
been reduced by factoring out common parts of conditional branches.

15 years agoMake the compiler/configure script idempotent.
Taylor R Campbell [Mon, 2 Nov 2009 16:29:03 +0000 (11:29 -0500)]
Make the compiler/configure script idempotent.

15 years agoCheck for an existing MIT Scheme in top-level Setup.sh and configure.
Taylor R Campbell [Mon, 2 Nov 2009 16:16:02 +0000 (11:16 -0500)]
Check for an existing MIT Scheme in top-level Setup.sh and configure.

15 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Mon, 2 Nov 2009 04:04:17 +0000 (23:04 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

15 years agoEnable open-coding of most non-flonum primitives on x86-64.
Taylor R Campbell [Mon, 2 Nov 2009 03:48:59 +0000 (22:48 -0500)]
Enable open-coding of most non-flonum primitives on x86-64.

15 years agoAdapt rulfix.scm for x86-64.
Taylor R Campbell [Mon, 2 Nov 2009 03:45:26 +0000 (22:45 -0500)]
Adapt rulfix.scm for x86-64.

15 years agoFix various immediate operands in x86-64 LAP generation.
Taylor R Campbell [Mon, 2 Nov 2009 03:36:55 +0000 (22:36 -0500)]
Fix various immediate operands in x86-64 LAP generation.

Implement an abstraction for yielding an operand representing some
immediate value, either by yielding an actual immediate operand or by
loading an immediate into a temporary register with MOV (which takes
64-bit immediate operands, unlike every other instruction) and by
yielding a reference to the temporary register for the operand.

Use this to simplify LOAD-DISPLACED-REGISTER, and reduce the code it
generates.

Use more appropriate names for procedures that generate code to move
objects into registers (`load') and to move objects into memory
(`store').

Fix various other places that generate LAP with immediates to use the
new abstraction to ensure that they always fit in the relevant
instructions' operands.

15 years agoAnother round of clarifying signedness in x86-64 instruction syntax.
Taylor R Campbell [Mon, 2 Nov 2009 01:40:41 +0000 (20:40 -0500)]
Another round of clarifying signedness in x86-64 instruction syntax.

15 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Sun, 1 Nov 2009 15:21:21 +0000 (10:21 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

15 years agoRestructure LIAR's lists of foldable variables and primitives.
Taylor R Campbell [Sun, 1 Nov 2009 01:29:00 +0000 (21:29 -0400)]
Restructure LIAR's lists of foldable variables and primitives.

Treat global variables and primitives separately when enumerating the
global boolean-valued, function, or side-effect-free operators.  This
re-enables LIAR's constant-folding after it was defeated by earlier
changes to bind global variables to compiled procedures that call
primitives, rather than to bind them to the primitives.

15 years agoComment out machines/x86-64/instrf.scm.
Taylor R Campbell [Sun, 1 Nov 2009 00:04:16 +0000 (20:04 -0400)]
Comment out machines/x86-64/instrf.scm.

Later this will be replaced by the SSEn instruction sets, but since
the instruction syntax syntax changed, it is necessary to ignore the
old x87 definitions for now.

15 years agoIn x86-64 arithmetic instructions, use UNSIGNED bits for &U.
Taylor R Campbell [Sun, 1 Nov 2009 00:02:06 +0000 (20:02 -0400)]
In x86-64 arithmetic instructions, use UNSIGNED bits for &U.

15 years agoAlign stack to 16 byte boundary in x86-64's C_to_interface.
Taylor R Campbell [Sat, 31 Oct 2009 05:32:48 +0000 (01:32 -0400)]
Align stack to 16 byte boundary in x86-64's C_to_interface.

Otherwise, parts of the microcode fail spectacularly when compiled
with `gcc -O3'.

15 years agoFix another bug in IMUL: the 3-operand, >8-bit opcode is 69, not 6b.
Taylor R Campbell [Sat, 31 Oct 2009 00:16:24 +0000 (20:16 -0400)]
Fix another bug in IMUL: the 3-operand, >8-bit opcode is 69, not 6b.

15 years agoFix bug in IMUL L/Q rules: immediate operand is a long, not a word.
Taylor R Campbell [Fri, 30 Oct 2009 23:51:11 +0000 (19:51 -0400)]
Fix bug in IMUL L/Q rules: immediate operand is a long, not a word.

15 years agoImplement microcode auxiliaries for AMD x86-64 compiled code.
Taylor R Campbell [Fri, 30 Oct 2009 22:14:32 +0000 (18:14 -0400)]
Implement microcode auxiliaries for AMD x86-64 compiled code.

15 years agoAdapt general LAP generation rules to AMD x86-64.
Taylor R Campbell [Fri, 30 Oct 2009 22:11:15 +0000 (18:11 -0400)]
Adapt general LAP generation rules to AMD x86-64.

Move interrupt-check analysis to new file back/checks.scm.  Later,
the other back ends should switch to using this, rather than having
copies of the code.

Fixnum and flonum rules are not yet adapted.

15 years agoDisable i386 LAP optimizer for AMD x86-64.
Taylor R Campbell [Fri, 30 Oct 2009 21:41:55 +0000 (17:41 -0400)]
Disable i386 LAP optimizer for AMD x86-64.

To be rewritten later.

15 years agoWrite instruction rules for the general AMD x86-64 instruction set.
Taylor R Campbell [Fri, 30 Oct 2009 21:40:44 +0000 (17:40 -0400)]
Write instruction rules for the general AMD x86-64 instruction set.

(No floating-point instructions yet.)

15 years agoWrite machine parameters and instruction syntaxer for AMD x86-64.
Taylor R Campbell [Fri, 30 Oct 2009 21:39:17 +0000 (17:39 -0400)]
Write machine parameters and instruction syntaxer for AMD x86-64.

15 years agoFix bug in recent transformations that caused inadvertent shadowing.
Taylor R Campbell [Thu, 22 Oct 2009 21:00:52 +0000 (17:00 -0400)]
Fix bug in recent transformations that caused inadvertent shadowing.

The real fix is to make cgen do alphatization, in which case copy.scm
could be considerably simplified, but this hack works for now to fix,
e.g., miscompilation of INITIALIZE-PACKAGE! in runtime/emacs.scm,
which has

(let ((type (select-console-port-type)))
  (if (let ((type (port/type the-console-port)))
        (or (eq? type vanilla-console-port-type)
            (eq? type emacs-console-port-type)))
      (set-port/type! the-console-port type)))

=>

(let ((type (select-console-port-type)))
  (let ((type (port/type the-console-port)))
    (if (or (eq? type vanilla-console-port-type)
            (eq? type emacs-console-port-type))
        (set-port/type! the-console-port type))))

One of the variables formerly named TYPE is now named by an uninterned
symbol instead.

15 years agoFix ADD-DEFAULTED-SUBPROBLEMS! to use the model's original rest parameter.
Taylor R Campbell [Wed, 21 Oct 2009 19:17:06 +0000 (15:17 -0400)]
Fix ADD-DEFAULTED-SUBPROBLEMS! to use the model's original rest parameter.

15 years agoFix argument order bug in integrated parameter deletion.
Taylor R Campbell [Tue, 20 Oct 2009 19:41:52 +0000 (15:41 -0400)]
Fix argument order bug in integrated parameter deletion.

15 years agoMake AUTOMAGIC-INTEGRATIONS search recursively, so that it transform
Taylor R Campbell [Fri, 9 Oct 2009 20:29:10 +0000 (16:29 -0400)]
Make AUTOMAGIC-INTEGRATIONS search recursively, so that it transform

(let ((foo cdr))
  (cdr x))

into

(cdr x),

which will then be open-coded.  I believe AUTOMAGIC-INTEGRATIONS
formerly made no changes that improved the code LIAR generates; now
this change does improve the code that LIAR generates.  This idiom
arises mainly in macros and in integrated procedures.

Fix bugs in previous changes that this change uncovered: when
integrating compound operators and conditional predicates, bail if
any open blocks are involved; handling them is too complicated.