From e8c711a427b6905cb1b642f62aec89dba9c8e359 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 8 Sep 2003 16:57:56 +0000 Subject: [PATCH] 0.8.3.46: Really really really really fix the ASH bug on MIPS ... really. Even for constant shifts. --- src/compiler/mips/arith.lisp | 38 +++++++++++++++++++------------------- version.lisp-expr | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index a0f9b3585..810650435 100644 --- a/src/compiler/mips/arith.lisp +++ b/src/compiler/mips/arith.lisp @@ -1,6 +1,15 @@ -(in-package "SB!VM") +;;;; the VM definition arithmetic VOPs for MIPS +;;;; 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") ;;;; Unary operations. @@ -250,15 +259,11 @@ (:results (result :scs (unsigned-reg))) (:result-types unsigned-num) (:generator 1 - (cond ((< count 0) - ;; It is a right shift. - (inst srl result number (min (- count) 31))) - ((> count 0) - ;; It is a left shift. - (inst sll result number (min count 31))) - (t - ;; Count=0? Shouldn't happen, but it's easy: - (move result number))))) + (cond + ((< count -31) (move result zero-tn)) + ((< count 0) (inst srl result number (min (- count) 31))) + ((> count 0) (inst sll result number (min count 31))) + (t (bug "identity ASH not transformed away"))))) (define-vop (fast-ash-c/signed=>signed) (:policy :fast-safe) @@ -270,15 +275,10 @@ (:results (result :scs (signed-reg))) (:result-types signed-num) (:generator 1 - (cond ((< count 0) - ;; It is a right shift. - (inst sra result number (min (- count) 31))) - ((> count 0) - ;; It is a left shift. - (inst sll result number (min count 31))) - (t - ;; Count=0? Shouldn't happen, but it's easy: - (move result number))))) + (cond + ((< count 0) (inst sra result number (min (- count) 31))) + ((> count 0) (inst sll result number (min count 31))) + (t (bug "identity ASH not transformed away"))))) (define-vop (signed-byte-32-len) (:translate integer-length) diff --git a/version.lisp-expr b/version.lisp-expr index cefce680a..043331735 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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.3.45" +"0.8.3.46" -- 2.11.4.GIT