From 9673663d57d27f52ceeec3f03763384d077a2fff Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Sun, 17 Jun 1990 22:24:38 +0000 Subject: [PATCH] Added buttloads of :arg-types and :result-types. --- compiler/mips/arith.lisp | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/compiler/mips/arith.lisp b/compiler/mips/arith.lisp index b4b52a7a3..e649a852f 100644 --- a/compiler/mips/arith.lisp +++ b/compiler/mips/arith.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman (FAHLMAN@CMUC). ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.25 1990/06/16 15:33:18 wlott Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.26 1990/06/17 22:24:38 wlott Exp $ ;;; ;;; This file contains the VM definition arithmetic VOPs for the MIPS. ;;; @@ -585,20 +585,24 @@ (define-vop (bignum-ref word-index-ref) (:variant vm:bignum-digits-offset vm:other-pointer-type) (:translate bignum::%bignum-ref) - (:results (value :scs (unsigned-reg)))) + (:results (value :scs (unsigned-reg))) + (:result-types unsigned-num)) (define-vop (bignum-set word-index-set) (:variant vm:bignum-digits-offset vm:other-pointer-type) (:translate bignum::%bignum-set) (:args (object :scs (descriptor-reg)) - (index :scs (any-reg immediate unsigned-immediate)) + (index :scs (any-reg immediate zero unsigned-immediate)) (value :scs (unsigned-reg))) - (:results (result :scs (unsigned-reg)))) + (:arg-types t positive-fixnum unsigned-num) + (:results (result :scs (unsigned-reg))) + (:result-types unsigned-num)) (define-vop (digit-0-or-plus) (:translate bignum::%digit-0-or-plusp) (:policy :fast-safe) (:args (digit :scs (unsigned-reg))) + (:arg-types unsigned-num) (:results (result :scs (descriptor-reg))) (:generator 3 (let ((done (gen-label))) @@ -613,9 +617,11 @@ (:args (a :scs (unsigned-reg)) (b :scs (unsigned-reg)) (c :scs (any-reg))) + (:arg-types unsigned-num unsigned-num positive-fixnum) (:temporary (:scs (unsigned-reg) :to (:result 0) :target result) res) (:results (result :scs (unsigned-reg)) (carry :scs (unsigned-reg) :from :eval)) + (:result-types unsigned-num positive-fixnum) (:temporary (:scs (non-descriptor-reg)) temp) (:generator 5 (let ((carry-in (gen-label)) @@ -641,9 +647,11 @@ (:args (a :scs (unsigned-reg)) (b :scs (unsigned-reg)) (c :scs (any-reg))) + (:arg-types unsigned-num unsigned-num positive-fixnum) (:temporary (:scs (unsigned-reg) :to (:result 0) :target result) res) (:results (result :scs (unsigned-reg)) (borrow :scs (unsigned-reg) :from :eval)) + (:result-types unsigned-num positive-fixnum) (:temporary (temp :scs (non-descriptor-reg))) (:generator 4 (let ((no-borrow-in (gen-label)) @@ -668,8 +676,10 @@ (:policy :fast-safe) (:args (x :scs (unsigned-reg)) (y :scs (unsigned-reg))) + (:arg-types unsigned-num unsigned-num) (:results (hi :scs (unsigned-reg)) (lo :scs (unsigned-reg))) + (:result-types unsigned-num unsigned-num) (:generator 3 (inst multu x y) (inst mflo lo) @@ -679,7 +689,9 @@ (:translate bignum::%lognot) (:policy :fast-safe) (:args (x :scs (unsigned-reg))) + (:arg-types unsigned-num) (:results (r :scs (unsigned-reg))) + (:result-types unsigned-num) (:generator 1 (inst nor r x zero-tn))) @@ -687,7 +699,9 @@ (:translate bignum::%fixnum-to-digit) (:policy :fast-safe) (:args (fixnum :scs (any-reg))) + (:arg-types tagged-num) (:results (digit :scs (unsigned-reg))) + (:result-types unsigned-num) (:generator 1 (inst sra digit fixnum 2))) @@ -697,9 +711,11 @@ (:args (a :scs (unsigned-reg) :target rem) (b :scs (unsigned-reg)) (c :scs (unsigned-reg))) + (:arg-types unsigned-num unsigned-num unsigned-num) (:temporary (:scs (unsigned-reg)) temp result) (:results (quo :scs (unsigned-reg)) (rem :scs (unsigned-reg))) + (:result-types unsigned-num unsigned-num) (:generator 230 (flet ((maybe-subtract (&optional (guess temp)) (inst subu temp guess 1) @@ -723,7 +739,9 @@ (:translate bignum::%fixnum-digit-with-correct-sign) (:policy :fast-safe) (:args (digit :scs (unsigned-reg) :target res)) + (:arg-types unsigned-num) (:results (res :scs (any-reg signed-reg))) + (:result-types signed-num) (:generator 1 (sc-case res (any-reg @@ -736,7 +754,9 @@ (:policy :fast-safe) (:args (digit :scs (unsigned-reg)) (count :scs (unsigned-reg))) + (:arg-types unsigned-num positive-fixnum) (:results (result :scs (unsigned-reg))) + (:result-types unsigned-num) (:generator 1 (inst sra result digit count))) @@ -745,7 +765,9 @@ (:policy :fast-safe) (:args (digit :scs (unsigned-reg)) (count :scs (unsigned-reg))) + (:arg-types unsigned-num positive-fixnum) (:results (result :scs (unsigned-reg))) + (:result-types unsigned-num) (:generator 1 (inst sll result digit count))) -- GitLab