From 22e15ab5b409060afff21f85341f4eca5246444e Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Tue, 24 Apr 1990 03:14:04 +0000 Subject: [PATCH] New assembler changes. --- assembly/mips/array.lisp | 80 +++++++++++++++++------------------ assembly/mips/assem-rtns.lisp | 31 ++++++-------- 2 files changed, 53 insertions(+), 58 deletions(-) diff --git a/assembly/mips/array.lisp b/assembly/mips/array.lisp index 208addc71..7294ccf14 100644 --- a/assembly/mips/array.lisp +++ b/assembly/mips/array.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman (FAHLMAN@CMUC). ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/array.lisp,v 1.6 1990/04/19 23:56:50 wlott Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/array.lisp,v 1.7 1990/04/24 03:13:54 wlott Exp $ ;;; ;;; This file contains the support routines for arrays and vectors. ;;; @@ -18,14 +18,14 @@ (defmacro allocate-vector (type length words vector ndescr) `(pseudo-atomic (,ndescr) - (inst ori ,vector alloc-tn vm:other-pointer-type) - (inst addiu alloc-tn alloc-tn (+ (1- (ash 1 vm:lowtag-bits)) + (inst or ,vector alloc-tn vm:other-pointer-type) + (inst addu alloc-tn alloc-tn (+ (1- (ash 1 vm:lowtag-bits)) (* vm:vector-data-offset vm:word-bytes))) (inst addu alloc-tn alloc-tn ,words) - (loadi ,ndescr (lognot vm:lowtag-mask)) + (inst li ,ndescr (lognot vm:lowtag-mask)) (inst and alloc-tn alloc-tn ,ndescr) ,(if (constantp type) - `(loadi ,ndescr ,type) + `(inst li ,ndescr ,type) `(inst srl ,ndescr ,type vm:word-shift)) (storew ,ndescr ,vector 0 vm:other-pointer-type) (storew ,length ,vector vm:vector-length-slot vm:other-pointer-type))) @@ -61,15 +61,15 @@ (allocate-vector vm:simple-vector-type length length vector ndescr) (inst beq length zero-tn done) - (inst addiu lip vector (- (* vm:vector-data-offset vm:word-bytes) - vm:other-pointer-type)) + (inst addu lip vector (- (* vm:vector-data-offset vm:word-bytes) + vm:other-pointer-type)) loop (storew fill lip) - (inst addiu length length (fixnum -1)) + (inst addu length length (fixnum -1)) (inst bne length zero-tn loop) - (inst addiu lip lip vm:word-bytes) + (inst addu lip lip vm:word-bytes) done @@ -100,7 +100,7 @@ ;; 8 2 3 12 ;; (inst sra words length (+ vm:word-shift 2)) - (inst addiu words words 1) + (inst addu words words 1) (inst sll words words 2) (allocate-vector vm:simple-string-type length words vector ndescr) (maybe-invoke-gc vector words) @@ -122,28 +122,28 @@ (:temp data :sc non-descriptor-reg :type random) (:temp byte :sc non-descriptor-reg :type random)) (loadw length string vm:vector-length-slot vm:other-pointer-type) - (inst addiu lip string + (inst addu lip string (- (* vm:vector-data-offset vm:word-bytes) vm:other-pointer-type)) - (b test) + (inst b test) (move accum zero-tn) loop - (inst andi byte data #xff) + (inst and byte data #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) (inst or accum accum byte) (inst srl byte data 8) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) (inst or accum accum byte) (inst srl byte data 16) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) @@ -155,25 +155,25 @@ (inst srl accum accum 27) (inst or accum accum byte) - (inst addiu lip lip 4) + (inst addu lip lip 4) test - (inst addiu length length (fixnum -4)) + (inst addu length length (fixnum -4)) (inst lw data lip 0) (inst bgez length loop) - (nop) + (inst nop) - (inst addiu length length (fixnum 3)) + (inst addu length length (fixnum 3)) (inst beq length zero-tn one-more) - (inst addiu length length (fixnum -1)) + (inst addu length length (fixnum -1)) (inst beq length zero-tn two-more) - (inst addiu length length (fixnum -1)) + (inst addu length length (fixnum -1)) (inst bne length zero-tn done) - (nop) + (inst nop) (inst srl byte data 16) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) @@ -182,7 +182,7 @@ two-more (inst srl byte data 8) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) @@ -190,7 +190,7 @@ one-more - (inst andi byte data #xff) + (inst and byte data #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) @@ -212,28 +212,28 @@ (:temp data :sc non-descriptor-reg :type random) (:temp byte :sc non-descriptor-reg :type random)) (loadw length string vm:vector-length-slot vm:other-pointer-type) - (inst addiu lip string + (inst addu lip string (- (* vm:vector-data-offset vm:word-bytes) vm:other-pointer-type)) - (b test) + (inst b test) (move accum zero-tn) loop - (inst andi byte data #xff) + (inst and byte data #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) (inst or accum accum byte) (inst srl byte data 8) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) (inst or accum accum byte) (inst srl byte data 16) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) @@ -245,25 +245,25 @@ (inst srl accum accum 27) (inst or accum accum byte) - (inst addiu lip lip 4) + (inst addu lip lip 4) test - (inst addiu length length (fixnum -4)) + (inst addu length length (fixnum -4)) (inst lw data lip 0) (inst bgez length loop) - (nop) + (inst nop) - (inst addiu length length (fixnum 3)) + (inst addu length length (fixnum 3)) (inst beq length zero-tn one-more) - (inst addiu length length (fixnum -1)) + (inst addu length length (fixnum -1)) (inst beq length zero-tn two-more) - (inst addiu length length (fixnum -1)) + (inst addu length length (fixnum -1)) (inst bne length zero-tn done) - (nop) + (inst nop) (inst srl byte data 16) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) @@ -272,7 +272,7 @@ two-more (inst srl byte data 8) - (inst andi byte byte #xff) + (inst and byte byte #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) @@ -280,7 +280,7 @@ one-more - (inst andi byte data #xff) + (inst and byte data #xff) (inst xor accum accum byte) (inst sll byte accum 5) (inst srl accum accum 27) diff --git a/assembly/mips/assem-rtns.lisp b/assembly/mips/assem-rtns.lisp index 19e496bb2..27dd4c5a5 100644 --- a/assembly/mips/assem-rtns.lisp +++ b/assembly/mips/assem-rtns.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman (FAHLMAN@CMUC). ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/assem-rtns.lisp,v 1.4 1990/04/23 20:44:36 wlott Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/assem-rtns.lisp,v 1.5 1990/04/24 03:14:04 wlott Exp $ ;;; ;;; (in-package "C") @@ -35,15 +35,13 @@ (align vm:lowtag-bits) (inst word vm:function-header-type) (dotimes (i (1- vm:function-header-code-offset)) - (nop)) + (inst word 0)) ;; Cause the error. (cerror-call continue di:undefined-symbol-error cname) continue - (let ((not-sym (generate-cerror-code 'undefined-function - di:object-not-symbol-error - cname))) + (let ((not-sym (generate-cerror-code di:object-not-symbol-error cname))) (test-simple-type cname temp not-sym t vm:symbol-header-type)) (loadw lexenv cname vm:symbol-function-slot vm:other-pointer-type) @@ -64,13 +62,13 @@ (:temp target-uwp :sc any-reg :type fixnum)) (declare (ignore start count)) - (let ((error (generate-error-code 'unwind-error di:invalid-unwind-error))) + (let ((error (generate-error-code di:invalid-unwind-error))) (inst beq block zero-tn error)) (load-symbol-value cur-uwp lisp::*current-unwind-protect-block*) (loadw target-uwp block vm:unwind-block-current-uwp-slot) (inst bne cur-uwp target-uwp do-uwp) - (nop) + (inst nop) (move cur-uwp block) @@ -84,7 +82,7 @@ do-uwp (loadw next-uwp cur-uwp vm:unwind-block-current-uwp-slot) - (b do-exit) + (inst b do-exit) (store-symbol-value next-uwp lisp::*current-unwind-protect-block*)) @@ -100,22 +98,19 @@ loop - (let ((error (generate-error-code 'throw-error - di:unseen-throw-tag-error - target))) + (let ((error (generate-error-code di:unseen-throw-tag-error target))) (inst beq catch zero-tn error) - (nop)) + (inst nop)) (loadw tag catch vm:catch-block-tag-slot) (inst beq tag target exit) - (nop) - (b loop) + (inst nop) + (inst b loop) (loadw catch catch vm:catch-block-previous-catch-slot) exit (move target catch) - (inst load-assembly-address ndescr 'unwind) - (inst jr ndescr) - (nop)) - + (inst li ndescr (make-fixup 'unwind :assembly-routine)) + (inst j ndescr) + (inst nop)) -- GitLab