0.8.1.21:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 3 Jul 2003 14:28:24 +0000 (14:28 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 3 Jul 2003 14:28:24 +0000 (14:28 +0000)
Constant base-char compares for PPC
... also fix some problems revealed by OpenMCL: the initarg for
SIMPLE-CONDITIONS is :FORMAT-CONTROL, not :FORMAT-STRING
... also fix something observed way back when by KingNato on #lisp
IRC: in arch_get_bad_addr, change a bogus && to ||

src/code/early-extensions.lisp
src/code/stream.lisp
src/compiler/ir1report.lisp
src/compiler/ppc/char.lisp
src/runtime/ppc-arch.c
version.lisp-expr

index 61c6404..ff5fb92 100644 (file)
@@ -816,7 +816,7 @@ which can be found at <http://sbcl.sourceforge.net/>.~:@>"
   (error 'simple-type-error ; maybe should be TYPE-BUG, subclass of BUG?
         :value value
         :expected-type type
-        :format-string "~@<~S ~_is not a ~_~S~:>"
+        :format-control "~@<~S ~_is not a ~_~S~:>"
         :format-arguments (list value type)))
 \f
 ;;; Return a function like FUN, but expecting its (two) arguments in
index 3e2c5ca..aa91999 100644 (file)
           ;; private predicate function..) is ugly and confusing, but
           ;; I can't see any other way. -- WHN 2001-04-14
           :expected-type '(satisfies stream-associated-with-file-p)
-          :format-string
+          :format-control
           "~@<The stream ~2I~_~S ~I~_isn't associated with a file.~:>"
           :format-arguments (list stream))))
 
index 4c1f514..f598a04 100644 (file)
              (policy *lexenv* (= inhibit-warnings 3)))
     (restart-case
        (signal (make-condition 'simple-compiler-note
-                               :format-string format-string
+                               :format-control format-string
                                :format-arguments format-args))
       (muffle-warning ()
        (return-from compiler-notify (values))))
       (progn
        (restart-case
            (signal (make-condition 'simple-compiler-note
-                                   :format-string (car rest)
+                                   :format-control (car rest)
                                    :format-arguments (cdr rest)))
          (muffle-warning ()
            (return-from maybe-compiler-notify (values))))
index 308ddb0..04192de 100644 (file)
@@ -1,29 +1,31 @@
-;;;
-;;; Written by Rob MacLachlan
-;;; Converted for the MIPS R2000 by Christopher Hoover.
-;;; And then to the SPARC by William Lott.
-;;;
-(in-package "SB!VM")
+;;;; the PPC VM definition of character operations
 
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; This software is derived from the CMU CL system, which was
+;;;; written at Carnegie Mellon University and released into the
+;;;; public domain. The software is in the public domain and is
+;;;; provided with absolutely no warranty. See the COPYING and CREDITS
+;;;; files for more information.
 
+(in-package "SB!VM")
 \f
 ;;;; Moves and coercions:
 
 ;;; Move a tagged char to an untagged representation.
-;;;
 (define-vop (move-to-base-char)
   (:args (x :scs (any-reg descriptor-reg)))
   (:results (y :scs (base-char-reg)))
   (:note "character untagging")
   (:generator 1
     (inst srwi y x sb!vm:n-widetag-bits)))
-;;;
+
 (define-move-vop move-to-base-char :move
   (any-reg descriptor-reg) (base-char-reg))
 
 
 ;;; Move an untagged char to a tagged representation.
-;;;
 (define-vop (move-from-base-char)
   (:args (x :scs (base-char-reg)))
   (:results (y :scs (any-reg descriptor-reg)))
   (:generator 1
     (inst slwi y x sb!vm:n-widetag-bits)
     (inst ori y y sb!vm:base-char-widetag)))
-;;;
+
 (define-move-vop move-from-base-char :move
   (base-char-reg) (any-reg descriptor-reg))
 
 ;;; Move untagged base-char values.
-;;;
 (define-vop (base-char-move)
   (:args (x :target y
            :scs (base-char-reg)
   (:affected)
   (:generator 0
     (move y x)))
-;;;
+
 (define-move-vop base-char-move :move
   (base-char-reg) (base-char-reg))
 
-
 ;;; Move untagged base-char arguments/return-values.
-;;;
 (define-vop (move-base-char-arg)
   (:args (x :target y
            :scs (base-char-reg))
        (move y x))
       (base-char-stack
        (storew x fp (tn-offset y))))))
-;;;
+
 (define-move-vop move-base-char-arg :move-arg
   (any-reg base-char-reg) (base-char-reg))
 
 
 ;;; Use standard MOVE-ARG + coercion to move an untagged base-char
 ;;; to a descriptor passing location.
-;;;
 (define-move-vop move-arg :move-arg
   (base-char-reg) (any-reg descriptor-reg))
 
 
 \f
 ;;; Comparison of base-chars.
-;;;
 (define-vop (base-char-compare)
   (:args (x :scs (base-char-reg))
         (y :scs (base-char-reg)))
   (:translate char>)
   (:variant :gt :le))
 
+(define-vop (base-char-compare/c)
+  (:args (x :scs (base-char-reg)))
+  (:arg-types base-char (:constant base-char))
+  (:conditional)
+  (:info target not-p y)
+  (:policy :fast-safe)
+  (:note "inline comparison")
+  (:variant-vars condition not-condition)
+  (:generator 2
+    (inst cmplwi x (sb!xc:char-code y))
+    (inst b? (if not-p not-condition condition) target)))
+
+(define-vop (fast-char=/base-char/c base-char-compare/c)
+  (:translate char=)
+  (:variant :eq :ne))
+
+(define-vop (fast-char</base-char/c base-char-compare/c)
+  (:translate char<)
+  (:variant :lt :ge))
+
+(define-vop (fast-char>/base-char/c base-char-compare/c)
+  (:translate char>)
+  (:variant :gt :le))
+
index 84c3365..3d209e9 100644 (file)
@@ -49,7 +49,7 @@ arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *context)
     if ((((unsigned long)pc) & 3) != 0 ||
        ((pc < READ_ONLY_SPACE_START ||
          pc >= READ_ONLY_SPACE_START+READ_ONLY_SPACE_SIZE) &&
-        ((lispobj *)pc < current_dynamic_space &&
+        ((lispobj *)pc < current_dynamic_space || 
          (lispobj *)pc >= current_dynamic_space + DYNAMIC_SPACE_SIZE)))
        return 0;
     
index f9bf478..429f72e 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.1.20"
+"0.8.1.21"