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.
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!
Chris Hanson [Wed, 4 Nov 2009 07:09:47 +0000 (23:09 -0800)]
Eliminate irrelevant reference to OS/2.
Chris Hanson [Wed, 4 Nov 2009 07:06:26 +0000 (23:06 -0800)]
Work around problem with SDX addressing mode under MacOS.
Chris Hanson [Wed, 4 Nov 2009 07:05:55 +0000 (23:05 -0800)]
Allow --enable-native-code to override default code generator.
Chris Hanson [Tue, 3 Nov 2009 07:48:10 +0000 (23:48 -0800)]
Fix thinko; add support for x86-64 on MacOS.
Chris Hanson [Tue, 3 Nov 2009 05:03:01 +0000 (21:03 -0800)]
Add icon file for MacOS app.
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
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.
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
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.
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
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.
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.
Taylor R Campbell [Mon, 2 Nov 2009 16:29:03 +0000 (11:29 -0500)]
Make the compiler/configure script idempotent.
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.
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
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.
Taylor R Campbell [Mon, 2 Nov 2009 03:45:26 +0000 (22:45 -0500)]
Adapt rulfix.scm for x86-64.
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.
Taylor R Campbell [Mon, 2 Nov 2009 01:40:41 +0000 (20:40 -0500)]
Another round of clarifying signedness in x86-64 instruction syntax.
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
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.
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.
Taylor R Campbell [Sun, 1 Nov 2009 00:02:06 +0000 (20:02 -0400)]
In x86-64 arithmetic instructions, use UNSIGNED bits for &U.
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'.
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.
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.
Taylor R Campbell [Fri, 30 Oct 2009 22:14:32 +0000 (18:14 -0400)]
Implement microcode auxiliaries for AMD x86-64 compiled code.
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.
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.
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.)
Taylor R Campbell [Fri, 30 Oct 2009 21:39:17 +0000 (17:39 -0400)]
Write machine parameters and instruction syntaxer for AMD x86-64.
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.
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.
Taylor R Campbell [Tue, 20 Oct 2009 19:41:52 +0000 (15:41 -0400)]
Fix argument order bug in integrated parameter deletion.
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.
Taylor R Campbell [Wed, 7 Oct 2009 19:14:44 +0000 (15:14 -0400)]
Use x86-64 pathnames for x86-64 back end's packaging and scripts.
Taylor R Campbell [Wed, 7 Oct 2009 19:09:56 +0000 (15:09 -0400)]
Copy i386 back end to begin x86-64 back end for LIAR.
Perhaps later we can merge the common parts to reduce the amount of
duplication, but this is most convenient for now.
Taylor R Campbell [Wed, 7 Oct 2009 03:42:08 +0000 (23:42 -0400)]
Close some procedures whose closing blocks are expression blocks.
Taylor R Campbell [Thu, 1 Oct 2009 18:23:38 +0000 (14:23 -0400)]
Reverse sense of ordering in argument type string to reflect reality.
Fixes
(set-hash-table/rehash-size! (make-hash-table) -1.2)
;The object -1.2, passed as an argument to set-hash-table/rehash-size!, is not a real number < 1 or exact integer >= 1.
Chris Hanson [Mon, 28 Sep 2009 05:53:13 +0000 (22:53 -0700)]
Add grep spencer1 tests.
Chris Hanson [Mon, 28 Sep 2009 05:52:52 +0000 (22:52 -0700)]
Avoid infinite loop for patterns like (* (SEQ)).
Chris Hanson [Mon, 28 Sep 2009 04:45:22 +0000 (21:45 -0700)]
Rename REPEAT> to ** and REPEAT< to **? and allow single limit.
Chris Hanson [Mon, 28 Sep 2009 04:18:40 +0000 (21:18 -0700)]
Add grep ere tests.
Chris Hanson [Mon, 28 Sep 2009 03:53:07 +0000 (20:53 -0700)]
Don't count singleton sub-tests as a separate level.
Chris Hanson [Mon, 28 Sep 2009 02:33:34 +0000 (19:33 -0700)]
Fix thinko in last change.
Chris Hanson [Mon, 28 Sep 2009 02:31:15 +0000 (19:31 -0700)]
Change reporting of test results to be terse when passing and more verbose when failing.
Chris Hanson [Mon, 28 Sep 2009 02:30:19 +0000 (19:30 -0700)]
Fix thinko.
Chris Hanson [Mon, 28 Sep 2009 02:22:10 +0000 (19:22 -0700)]
Fix bug in cold-load sequence.
Chris Hanson [Sun, 27 Sep 2009 10:40:14 +0000 (03:40 -0700)]
Strip angle brackets off record-type name when printing record.
Chris Hanson [Sun, 27 Sep 2009 10:36:24 +0000 (03:36 -0700)]
Fix cold-load errors.
Chris Hanson [Sun, 27 Sep 2009 10:08:25 +0000 (03:08 -0700)]
Don't signal compiler errors while linking.
Chris Hanson [Sun, 27 Sep 2009 09:59:24 +0000 (02:59 -0700)]
Add tests for regsexp.
Chris Hanson [Sun, 27 Sep 2009 07:15:23 +0000 (00:15 -0700)]
Build unit-test framework.
Chris Hanson [Sun, 27 Sep 2009 04:04:16 +0000 (21:04 -0700)]
Add notices and comments to test files.
Chris Hanson [Sat, 26 Sep 2009 08:48:13 +0000 (01:48 -0700)]
Move *parser tests to new tests directory.
Chris Hanson [Sat, 26 Sep 2009 08:46:42 +0000 (01:46 -0700)]
Move XML tests to new tests directory.
Chris Hanson [Sat, 26 Sep 2009 08:45:29 +0000 (01:45 -0700)]
Add some tests; these are mostly old and not automated.
Chris Hanson [Sat, 26 Sep 2009 05:22:33 +0000 (22:22 -0700)]
Fix definition of FNV hash. Thanks Taylor!
Chris Hanson [Sat, 26 Sep 2009 05:22:10 +0000 (22:22 -0700)]
Simplify definitions of core object lengths and masks. Eliminate references to 8-bit types. Fix a couple of sign errors.
Taylor R Campbell [Thu, 24 Sep 2009 16:36:40 +0000 (12:36 -0400)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Thu, 24 Sep 2009 16:33:54 +0000 (12:33 -0400)]
Fix hygiene in top-level bindings of synthetic identifiers.
Make such bindings globally unique by creating them with uninterned
symbols, bypassing the alpha renaming which was making them look
prettier at the expense of global uniqueness.
Chris Hanson [Thu, 24 Sep 2009 07:46:12 +0000 (00:46 -0700)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme
Chris Hanson [Thu, 24 Sep 2009 07:44:26 +0000 (00:44 -0700)]
Remove complex and unused optimizer. Change "combination" to "form"
in places where it was being used incorrectly. A couple of other
tweaks.
Chris Hanson [Thu, 24 Sep 2009 07:21:53 +0000 (00:21 -0700)]
When pretty-printing code, abbreviate quotations.
Chris Hanson [Thu, 24 Sep 2009 07:14:20 +0000 (00:14 -0700)]
Fix thinko in previous change.
Chris Hanson [Thu, 24 Sep 2009 07:08:42 +0000 (00:08 -0700)]
Don't accept negative integers when converting to ulong.
Taylor R Campbell [Wed, 23 Sep 2009 17:53:00 +0000 (13:53 -0400)]
Eliminate unsyntaxer's logic for FLUID-LET.
This code was fragile, and has neither worked nor even been reached
in at least eight years, so eliminating it doesn't really reduce any
functionality.
Taylor R Campbell [Wed, 23 Sep 2009 16:36:31 +0000 (12:36 -0400)]
Teach SF to pull LETs and BEGINs out of IF predicates.
LIAR doesn't do a very good job with disjunctions not immediately in
the predicate position of IFs. It still doesn't do a very good job
with (OR X (LET ((Y ...)) (OR ...))), but this helps it a little to
reduce needless pushing and popping of #F on the stack.
Chris Hanson [Tue, 22 Sep 2009 13:58:30 +0000 (06:58 -0700)]
Tweak EQUALITY-PREDICATE to do what it's called.
Chris Hanson [Tue, 22 Sep 2009 13:55:50 +0000 (06:55 -0700)]
Eliminate keyword quote in rule patterns.
Taylor R Campbell [Mon, 21 Sep 2009 23:28:30 +0000 (19:28 -0400)]
Tabify recent change to sf/subst.scm, for consistency.
Taylor R Campbell [Mon, 21 Sep 2009 22:38:22 +0000 (18:38 -0400)]
When expanding (VALUES ...) in SF, integrate the receiver.
Taylor R Campbell [Mon, 21 Sep 2009 22:36:49 +0000 (18:36 -0400)]
Make SF invert LAMBDAs nested inside LETs in operator positions.
((let ((x (foo)) (y (bar)))
(lambda (receiver) ...))
(lambda (x y z)
...))
=>
(let ((receiver (lambda (x y z) ...)))
(let ((x (foo)) (y (bar)))
...))
Chris Hanson [Mon, 21 Sep 2009 09:08:58 +0000 (02:08 -0700)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme
Chris Hanson [Mon, 21 Sep 2009 09:07:34 +0000 (02:07 -0700)]
Use a little currying to turn the instruction set into a combinator language. Now passes a bunch of simple tests; more to write.
Chris Hanson [Mon, 21 Sep 2009 06:12:09 +0000 (23:12 -0700)]
Fix bugs in regsexp. Many simple parts now work.
Chris Hanson [Mon, 21 Sep 2009 06:11:48 +0000 (23:11 -0700)]
Fix oversight from previous change.
Taylor R Campbell [Sun, 20 Sep 2009 23:39:02 +0000 (19:39 -0400)]
Fix export of SYNTAX-RULES.
Taylor R Campbell [Sun, 20 Sep 2009 21:49:56 +0000 (17:49 -0400)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Joe Marshall [Sun, 20 Sep 2009 21:41:17 +0000 (14:41 -0700)]
Move transcript off the property list.
Taylor R Campbell [Sun, 20 Sep 2009 21:32:37 +0000 (17:32 -0400)]
Fix bug in LET* after the recent syntax reorganization.
Taylor R Campbell [Sun, 20 Sep 2009 19:52:56 +0000 (15:52 -0400)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Sun, 20 Sep 2009 19:27:46 +0000 (15:27 -0400)]
Add missing Edwin variable IMAIL-INLINE-MIME-TEXT-LIMIT to imail.pkg.
Taylor R Campbell [Sun, 20 Sep 2009 19:24:31 +0000 (15:24 -0400)]
Add many missing entries for Edwin commands to imail/imail.pkg.
Taylor R Campbell [Sun, 20 Sep 2009 17:59:26 +0000 (13:59 -0400)]
Signal errors with better messages in VECTOR-FIRST &c.
Chris Hanson [Sun, 20 Sep 2009 06:54:13 +0000 (23:54 -0700)]
Refactor syntax to break it into smaller, more coherent pieces.
Simplify where easy to do so.
Chris Hanson [Sun, 20 Sep 2009 04:40:44 +0000 (21:40 -0700)]
Fix some bugs in regsexp.
Chris Hanson [Sun, 20 Sep 2009 03:56:01 +0000 (20:56 -0700)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme
Chris Hanson [Sun, 20 Sep 2009 03:19:48 +0000 (20:19 -0700)]
Add script to run three-stage compile.
Chris Hanson [Sun, 20 Sep 2009 02:03:23 +0000 (19:03 -0700)]
Don't use built-in Scheme executables; provide env var to override.
Chris Hanson [Sat, 19 Sep 2009 23:32:12 +0000 (16:32 -0700)]
Back out change to disable type checks for accessors and modifiers;
it's tickling a compiler bug.
Chris Hanson [Sat, 19 Sep 2009 08:57:54 +0000 (01:57 -0700)]
More simplification.
Chris Hanson [Sat, 19 Sep 2009 07:18:49 +0000 (00:18 -0700)]
Fix logic in STRING-HEAD!. Also some small tweaks.
Taylor R Campbell [Fri, 18 Sep 2009 21:12:45 +0000 (17:12 -0400)]
Handle UNTERMINATED tokens in RFC822:TOKENS->STRING.
Taylor R Campbell [Fri, 18 Sep 2009 20:56:14 +0000 (16:56 -0400)]
Fix DBG-INFO-VECTOR? so that it accepts both new and old formats.
Joe Marshall [Thu, 10 Sep 2009 14:53:10 +0000 (07:53 -0700)]
Fix integration of ACCESS where the environment is SYSTEM-GLOBAL-ENVIRONMENT.
Joe Marshall [Thu, 10 Sep 2009 14:48:22 +0000 (07:48 -0700)]
Make symbol? an integrable operator.
Chris Hanson [Tue, 8 Sep 2009 07:05:04 +0000 (00:05 -0700)]
Implement regular s-expressions.