#| -*-Scheme-*-
-$Id: ctop.scm,v 1.16 2006/09/16 11:19:09 gjr Exp $
+$Id: ctop.scm,v 1.17 2006/09/17 12:10:04 gjr Exp $
Copyright (c) 1992-1999, 2006 Massachusetts Institute of Technology
(write-string ";Executing \"")
(write-string command-line)
(write-string "\"")))
- (let ((result ((ucode-primitive system) command-line)))
- #|
+ (let ((result (run-shell-command command-line)))
+ #|
;; Some C compilers always fail
(if (not (zero? result))
(error "compiler: C compiler/linker failed"))
#| -*-Scheme-*-
-$Id: lapgen.scm,v 1.18 2006/09/16 11:19:09 gjr Exp $
+$Id: lapgen.scm,v 1.19 2006/09/17 12:10:04 gjr Exp $
Copyright 1993,1998,2001,2002,2004,2006 Massachusetts Institute of Technology
(lambda (label)
(LAP "if (!(" ,val1 ,cc ,val2 "))\n\t goto " ,label ";\n\t")))
(LAP))
+
+(define (compare/unsigned cc val1 val2)
+ (set-current-branches!
+ (lambda (label)
+ (LAP "if (((unsigned long) " ,val1 ")"
+ ,cc "((unsigned long) " ,val2 "))\n\t goto " ,label ";\n\t"))
+ (lambda (label)
+ (LAP "if (!(((unsigned long) " ,val1 ")"
+ ,cc "((unsigned long) " ,val2 ")))\n\t goto " ,label ";\n\t")))
+ (LAP))
\f
(define (define-arithmetic-method operator methods method)
(let ((entry (assq operator (cdr methods))))
#| -*-Scheme-*-
-$Id: make.scm,v 1.6 2006/09/16 11:19:09 gjr Exp $
+$Id: make.scm,v 1.7 2006/09/17 12:10:04 gjr Exp $
Copyright (c) 1992, 1999, 2006 Massachusetts Institute of Technology
(declare (usual-integrations))
+(load-option 'synchronous-subprocess)
+
(begin
(declare-shared-library "sf+compiler" (lambda () true))
(let ((value ((load "base/make")
#| -*-Scheme-*-
-$Id: rulfix.scm,v 1.7 2003/02/14 18:28:02 cph Exp $
+$Id: rulfix.scm,v 1.8 2006/09/17 12:10:04 gjr Exp $
-Copyright (c) 1992-1999, 2001, 2002 Massachusetts Institute of Technology
+Copyright (c) 1992-1999, 2001, 2002, 2006 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(FIXNUM-PRED-2-ARGS (? predicate)
(REGISTER (? source1))
(REGISTER (? source2)))
- (compare (fixnum-pred-2->cc predicate)
- (standard-source! source1 'LONG)
- (standard-source! source2 'LONG)))
+ ((comparator predicate)
+ (fixnum-pred-2->cc predicate)
+ (standard-source! source1 'LONG)
+ (standard-source! source2 'LONG)))
(define-rule predicate
(FIXNUM-PRED-2-ARGS (? predicate)
(REGISTER (? source))
(OBJECT->FIXNUM (CONSTANT (? constant))))
- (compare (fixnum-pred-2->cc predicate)
- (standard-source! source 'LONG)
- (longify constant)))
+ ((comparator predicate)
+ (fixnum-pred-2->cc predicate)
+ (standard-source! source 'LONG)
+ (longify constant)))
(define-rule predicate
(FIXNUM-PRED-2-ARGS (? predicate)
(OBJECT->FIXNUM (CONSTANT (? constant)))
(REGISTER (? source)))
- (compare (fixnum-pred-2->cc predicate)
- (longify constant)
- (standard-source! source 'LONG)))
+ ((comparator predicate)
+ (fixnum-pred-2->cc predicate)
+ (longify constant)
+ (standard-source! source 'LONG)))
+(define-integrable (comparator predicate)
+ (if (memq predicate '(UNSIGNED-LESS-THAN-FIXNUM?
+ UNSIGNED-GREATER-THAN-FIXNUM?))
+ compare/unsigned
+ compare))
+
(define (fixnum-pred-2->cc predicate)
(case predicate
((EQUAL-FIXNUM?) " == ")
- ((LESS-THAN-FIXNUM?) " < ")
- ((GREATER-THAN-FIXNUM?) " > ")
+ ((LESS-THAN-FIXNUM? UNSIGNED-LESS-THAN-FIXNUM?) " < ")
+ ((GREATER-THAN-FIXNUM? UNSIGNED-GREATER-THAN-FIXNUM?) " > ")
(else
(error "unknown fixnum predicate" predicate))))