From f23f1b33471c1ffe982b2839b2a9410a4ce7f198 Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Wed, 8 Dec 1999 14:19:20 +0000 Subject: [PATCH] For the store-conditional VOPs the new-value argument is not modified so need not be targeted to a temporary, possibly saving a temporary TN and move. --- compiler/x86/cell.lisp | 8 +++----- compiler/x86/macros.lisp | 14 +++++--------- compiler/x86/memory.lisp | 14 +++++--------- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/compiler/x86/cell.lisp b/compiler/x86/cell.lisp index 17173205b..e9b3f2d26 100644 --- a/compiler/x86/cell.lisp +++ b/compiler/x86/cell.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/cell.lisp,v 1.10 1999/12/04 16:03:55 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/cell.lisp,v 1.11 1999/12/08 14:19:19 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -338,20 +338,18 @@ (:args (object :scs (descriptor-reg) :to :eval) (slot :scs (any-reg) :to :result) (old-value :scs (descriptor-reg any-reg) :target eax) - (new-value :scs (descriptor-reg any-reg) :target temp)) + (new-value :scs (descriptor-reg any-reg))) (:arg-types instance positive-fixnum * *) (:temporary (:sc descriptor-reg :offset eax-offset :from (:argument 2) :to :result :target result) eax) - (:temporary (:sc descriptor-reg :from (:argument 3) :to :result) temp) (:results (result :scs (descriptor-reg any-reg))) (:policy :fast-safe) (:generator 5 (move eax old-value) - (move temp new-value) (inst cmpxchg (make-ea :dword :base object :index slot :scale 1 :disp (- (* instance-slots-offset word-bytes) instance-pointer-type)) - temp) + new-value) (move result eax))) (defknown %instance-xadd (instance index fixnum) fixnum ()) diff --git a/compiler/x86/macros.lisp b/compiler/x86/macros.lisp index f94b2f64a..06c6b875f 100644 --- a/compiler/x86/macros.lisp +++ b/compiler/x86/macros.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/macros.lisp,v 1.13 1999/12/04 16:05:21 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/macros.lisp,v 1.14 1999/12/08 14:19:20 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -433,19 +433,17 @@ (:args (object :scs (descriptor-reg) :to :result) (index :scs (any-reg) :to :result) (old-value :scs ,scs :target eax) - (new-value :scs ,scs :target temp)) + (new-value :scs ,scs)) (:arg-types ,type tagged-num ,el-type ,el-type) (:temporary (:sc ,(first scs) :offset eax-offset :from (:argument 2) :to :result :target result) eax) - (:temporary (:sc ,(first scs) :from (:argument 3) :to :result) temp) (:results (result :scs ,scs)) (:result-types ,el-type) (:generator 5 (move eax old-value) - (move temp new-value) (inst cmpxchg (make-ea :dword :base object :index index :scale 1 :disp (- (* ,offset word-bytes) ,lowtag)) - temp) + new-value) (move result eax))) (define-vop (,(symbolicate name "-C")) ,@(when translate @@ -453,19 +451,17 @@ (:policy :fast-safe) (:args (object :scs (descriptor-reg) :to :result) (old-value :scs ,scs :target eax) - (new-value :scs ,scs :target temp)) + (new-value :scs ,scs)) (:info index) (:arg-types ,type (:constant (signed-byte 30)) ,el-type ,el-type) (:temporary (:sc ,(first scs) :offset eax-offset :from (:argument 1) :to :result :target result) eax) - (:temporary (:sc ,(first scs) :from (:argument 2) :to :result) temp) (:results (result :scs ,scs)) (:result-types ,el-type) (:generator 4 (move eax old-value) - (move temp new-value) (inst cmpxchg (make-ea :dword :base object :disp (- (* (+ ,offset index) word-bytes) ,lowtag)) - temp) + new-value) (move result eax))))) diff --git a/compiler/x86/memory.lisp b/compiler/x86/memory.lisp index 4a81c7f51..f7713aac8 100644 --- a/compiler/x86/memory.lisp +++ b/compiler/x86/memory.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/memory.lisp,v 1.6 1999/03/08 00:53:34 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/memory.lisp,v 1.7 1999/12/08 14:19:20 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -87,18 +87,16 @@ (define-vop (cell-set-conditional) (:args (object :scs (descriptor-reg) :to :eval) (old-value :scs (descriptor-reg any-reg) :target eax) - (new-value :scs (descriptor-reg any-reg) :target temp)) + (new-value :scs (descriptor-reg any-reg))) (:temporary (:sc descriptor-reg :offset eax-offset :from (:argument 1) :to :result :target result) eax) - (:temporary (:sc descriptor-reg :from (:argument 2) :to :result) temp) (:variant-vars offset lowtag) (:results (result :scs (descriptor-reg any-reg))) (:generator 4 (move eax old-value) - (move temp new-value) (inst cmpxchg (make-ea :dword :base object :disp (- (* offset word-bytes) lowtag)) - temp) + new-value) (move result eax))) ;;; X86 special @@ -157,19 +155,17 @@ (define-vop (slot-set-conditional) (:args (object :scs (descriptor-reg) :to :eval) (old-value :scs (descriptor-reg any-reg) :target eax) - (new-value :scs (descriptor-reg any-reg) :target temp)) + (new-value :scs (descriptor-reg any-reg))) (:temporary (:sc descriptor-reg :offset eax-offset :from (:argument 1) :to :result :target result) eax) - (:temporary (:sc descriptor-reg :from (:argument 2) :to :result) temp) (:variant-vars base lowtag) (:results (result :scs (descriptor-reg any-reg))) (:info offset) (:generator 4 (move eax old-value) - (move temp new-value) (inst cmpxchg (make-ea :dword :base object :disp (- (* (+ base offset) word-bytes) lowtag)) - temp) + new-value) (move result eax))) ;;; X86 special -- GitLab