Skip to content
Snippets Groups Projects
Commit e04d2815 authored by rtoy's avatar rtoy
Browse files

o The branch instructions were missing the branch attribute.

o Fix typo in DEFINE-A-TAC-INSTRUCTION (frb should be frc).
parent 86bc9d98
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/insts.lisp,v 1.12 2005/06/19 02:41:04 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/insts.lisp,v 1.13 2005/09/06 00:39:00 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -1182,7 +1182,7 @@ about function addresses and register values.") ...@@ -1182,7 +1182,7 @@ about function addresses and register values.")
(:printer a-tac ((op ,op) (xo ,xo) (rc ,rc))) (:printer a-tac ((op ,op) (xo ,xo) (rc ,rc)))
(:cost ,cost) (:cost ,cost)
(:delay 1) (:delay 1)
(:dependencies (reads fra) (reads frb) ,@other-reads (:dependencies (reads fra) (reads frc) ,@other-reads
(writes frt) ,@other-writes) (writes frt) ,@other-writes)
(:emitter (:emitter
(emit-a-form-inst segment (emit-a-form-inst segment
...@@ -1290,6 +1290,7 @@ about function addresses and register values.") ...@@ -1290,6 +1290,7 @@ about function addresses and register values.")
(define-instruction bc (segment bo bi target) (define-instruction bc (segment bo bi target)
(:declare (type label target)) (:declare (type label target))
(:printer b ((op 16) (aa 0) (lk 0))) (:printer b ((op 16) (aa 0) (lk 0)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr)) (:dependencies (reads :ccr))
(:emitter (:emitter
...@@ -1298,14 +1299,16 @@ about function addresses and register values.") ...@@ -1298,14 +1299,16 @@ about function addresses and register values.")
(define-instruction bcl (segment bo bi target) (define-instruction bcl (segment bo bi target)
(:declare (type label target)) (:declare (type label target))
(:printer b ((op 16) (aa 0) (lk 1))) (:printer b ((op 16) (aa 0) (lk 1)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr)) (:dependencies (reads :ccr) (writes :lr))
(:emitter (:emitter
(emit-conditional-branch segment bo bi target nil t))) (emit-conditional-branch segment bo bi target nil t)))
(define-instruction bca (segment bo bi target) (define-instruction bca (segment bo bi target)
(:declare (type label target)) (:declare (type label target))
(:printer b ((op 16) (aa 1) (lk 0))) (:printer b ((op 16) (aa 1) (lk 0)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr)) (:dependencies (reads :ccr))
(:emitter (:emitter
...@@ -1314,8 +1317,9 @@ about function addresses and register values.") ...@@ -1314,8 +1317,9 @@ about function addresses and register values.")
(define-instruction bcla (segment bo bi target) (define-instruction bcla (segment bo bi target)
(:declare (type label target)) (:declare (type label target))
(:printer b ((op 16) (aa 1) (lk 1))) (:printer b ((op 16) (aa 1) (lk 1)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr)) (:dependencies (reads :ccr) (writes :lr))
(:emitter (:emitter
(emit-conditional-branch segment bo bi target t t))) (emit-conditional-branch segment bo bi target t t)))
...@@ -1326,6 +1330,7 @@ about function addresses and register values.") ...@@ -1326,6 +1330,7 @@ about function addresses and register values.")
(:declare (type label target)) (:declare (type label target))
(:printer b ((op 16) (bo #.(valid-bo-encoding :bo-u)) (bi 0) (aa 0) (lk 0)) (:printer b ((op 16) (bo #.(valid-bo-encoding :bo-u)) (bi 0) (aa 0) (lk 0))
'(:name :tab bd)) '(:name :tab bd))
(:attributes branch)
(:delay 1) (:delay 1)
(:emitter (:emitter
(emit-conditional-branch segment #.(valid-bo-encoding :bo-u) 0 target nil nil))) (emit-conditional-branch segment #.(valid-bo-encoding :bo-u) 0 target nil nil)))
...@@ -1334,6 +1339,8 @@ about function addresses and register values.") ...@@ -1334,6 +1339,8 @@ about function addresses and register values.")
(define-instruction bt (segment bi target) (define-instruction bt (segment bi target)
(:printer b ((op 16) (bo #.(valid-bo-encoding :bo-t)) (aa 0) (lk 0)) (:printer b ((op 16) (bo #.(valid-bo-encoding :bo-t)) (aa 0) (lk 0))
'(:name :tab bi ", " bd)) '(:name :tab bi ", " bd))
(:attributes branch)
(:dependencies (reads :ccr))
(:delay 1) (:delay 1)
(:emitter (:emitter
(emit-conditional-branch segment #.(valid-bo-encoding :bo-t) bi target nil nil))) (emit-conditional-branch segment #.(valid-bo-encoding :bo-t) bi target nil nil)))
...@@ -1341,12 +1348,16 @@ about function addresses and register values.") ...@@ -1341,12 +1348,16 @@ about function addresses and register values.")
(define-instruction bf (segment bi target) (define-instruction bf (segment bi target)
(:printer b ((op 16) (bo #.(valid-bo-encoding :bo-f)) (aa 0) (lk 0)) (:printer b ((op 16) (bo #.(valid-bo-encoding :bo-f)) (aa 0) (lk 0))
'(:name :tab bi ", " bd)) '(:name :tab bi ", " bd))
(:attributes branch)
(:dependencies (reads :ccr))
(:delay 1) (:delay 1)
(:emitter (:emitter
(emit-conditional-branch segment #.(valid-bo-encoding :bo-f) bi target nil nil))) (emit-conditional-branch segment #.(valid-bo-encoding :bo-f) bi target nil nil)))
(define-instruction b? (segment cr-field-name cr-name &optional (target nil target-p)) (define-instruction b? (segment cr-field-name cr-name &optional (target nil target-p))
(:delay 1) (:delay 1)
(:attributes branch)
(:dependencies (reads :ccr))
(:emitter (:emitter
(unless target-p (unless target-p
(setq target cr-name cr-name cr-field-name cr-field-name :cr0)) (setq target cr-name cr-name cr-field-name cr-field-name :cr0))
...@@ -1367,12 +1378,14 @@ about function addresses and register values.") ...@@ -1367,12 +1378,14 @@ about function addresses and register values.")
(define-instruction b (segment target) (define-instruction b (segment target)
(:printer i ((op 18) (aa 0) (lk 0))) (:printer i ((op 18) (aa 0) (lk 0)))
(:attributes branch)
(:delay 1) (:delay 1)
(:emitter (:emitter
(emit-i-form-branch segment target nil))) (emit-i-form-branch segment target nil)))
(define-instruction ba (segment target) (define-instruction ba (segment target)
(:printer i-abs ((op 18) (aa 1) (lk 0))) (:printer i-abs ((op 18) (aa 1) (lk 0)))
(:attributes branch)
(:delay 1) (:delay 1)
(:emitter (:emitter
(when (typep target 'fixup) (when (typep target 'fixup)
...@@ -1383,13 +1396,17 @@ about function addresses and register values.") ...@@ -1383,13 +1396,17 @@ about function addresses and register values.")
(define-instruction bl (segment target) (define-instruction bl (segment target)
(:printer i ((op 18) (aa 0) (lk 1))) (:printer i ((op 18) (aa 0) (lk 1)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (writes :lr))
(:emitter (:emitter
(emit-i-form-branch segment target t))) (emit-i-form-branch segment target t)))
(define-instruction bla (segment target) (define-instruction bla (segment target)
(:printer i-abs ((op 18) (aa 1) (lk 1))) (:printer i-abs ((op 18) (aa 1) (lk 1)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (writes :lr))
(:emitter (:emitter
(when (typep target 'fixup) (when (typep target 'fixup)
(note-fixup segment :ba target) (note-fixup segment :ba target)
...@@ -1398,6 +1415,7 @@ about function addresses and register values.") ...@@ -1398,6 +1415,7 @@ about function addresses and register values.")
(define-instruction blr (segment) (define-instruction blr (segment)
(:printer xl-bo-bi ((op 19) (xo 16) (bo #.(valid-bo-encoding :bo-u))(bi 0) (lk 0)) '(:name)) (:printer xl-bo-bi ((op 19) (xo 16) (bo #.(valid-bo-encoding :bo-u))(bi 0) (lk 0)) '(:name))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr) (reads :ctr)) (:dependencies (reads :ccr) (reads :ctr))
(:emitter (:emitter
...@@ -1405,6 +1423,7 @@ about function addresses and register values.") ...@@ -1405,6 +1423,7 @@ about function addresses and register values.")
(define-instruction bclr (segment bo bi) (define-instruction bclr (segment bo bi)
(:printer xl-bo-bi ((op 19) (xo 16))) (:printer xl-bo-bi ((op 19) (xo 16)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr) (reads :lr)) (:dependencies (reads :ccr) (reads :lr))
(:emitter (:emitter
...@@ -1412,8 +1431,9 @@ about function addresses and register values.") ...@@ -1412,8 +1431,9 @@ about function addresses and register values.")
(define-instruction bclrl (segment bo bi) (define-instruction bclrl (segment bo bi)
(:printer xl-bo-bi ((op 19) (xo 16) (lk 1))) (:printer xl-bo-bi ((op 19) (xo 16) (lk 1)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr) (reads :lr)) (:dependencies (reads :ccr) (reads :lr) (write :lr))
(:emitter (:emitter
(emit-x-form-inst segment 19 (valid-bo-encoding bo) (valid-bi-encoding bi) 0 16 1))) (emit-x-form-inst segment 19 (valid-bo-encoding bo) (valid-bi-encoding bi) 0 16 1)))
...@@ -1434,6 +1454,7 @@ about function addresses and register values.") ...@@ -1434,6 +1454,7 @@ about function addresses and register values.")
(define-instruction bcctr (segment bo bi) (define-instruction bcctr (segment bo bi)
(:printer xl-bo-bi ((op 19) (xo 528))) (:printer xl-bo-bi ((op 19) (xo 528)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr) (reads :ctr)) (:dependencies (reads :ccr) (reads :ctr))
(:emitter (:emitter
...@@ -1441,6 +1462,7 @@ about function addresses and register values.") ...@@ -1441,6 +1462,7 @@ about function addresses and register values.")
(define-instruction bcctrl (segment bo bi) (define-instruction bcctrl (segment bo bi)
(:printer xl-bo-bi ((op 19) (xo 528) (lk 1))) (:printer xl-bo-bi ((op 19) (xo 528) (lk 1)))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr) (reads :ctr) (writes :lr)) (:dependencies (reads :ccr) (reads :ctr) (writes :lr))
(:emitter (:emitter
...@@ -1448,6 +1470,7 @@ about function addresses and register values.") ...@@ -1448,6 +1470,7 @@ about function addresses and register values.")
(define-instruction bctr (segment) (define-instruction bctr (segment)
(:printer xl-bo-bi ((op 19) (xo 528) (bo #.(valid-bo-encoding :bo-u)) (bi 0) (lk 0)) '(:name)) (:printer xl-bo-bi ((op 19) (xo 528) (bo #.(valid-bo-encoding :bo-u)) (bi 0) (lk 0)) '(:name))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr) (reads :ctr)) (:dependencies (reads :ccr) (reads :ctr))
(:emitter (:emitter
...@@ -1455,6 +1478,7 @@ about function addresses and register values.") ...@@ -1455,6 +1478,7 @@ about function addresses and register values.")
(define-instruction bctrl (segment) (define-instruction bctrl (segment)
(:printer xl-bo-bi ((op 19) (xo 528) (bo #.(valid-bo-encoding :bo-u)) (bi 0) (lk 1)) '(:name)) (:printer xl-bo-bi ((op 19) (xo 528) (bo #.(valid-bo-encoding :bo-u)) (bi 0) (lk 1)) '(:name))
(:attributes branch)
(:delay 1) (:delay 1)
(:dependencies (reads :ccr) (reads :ctr)) (:dependencies (reads :ccr) (reads :ctr))
(:emitter (:emitter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment