From 5642ed8ddb53845646cc25c99053118507bd9f0a Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Fri, 3 Feb 2006 15:54:38 +0000 Subject: [PATCH] The mcrxr instruction is very, very slow on a G5, so don't use it. This patch is from Jon Boone, via Patrick Nordebo (KingNato) and Gary Byers. assembly/ppc/arith.lisp: o Change uses of mcrxr to mtxer compiler/ppc/insts.lisp: o Comment out the definition of mcrxr. --- assembly/ppc/arith.lisp | 8 ++++---- compiler/ppc/insts.lisp | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/assembly/ppc/arith.lisp b/assembly/ppc/arith.lisp index 8e4f7dd95..b0d55a0fe 100644 --- a/assembly/ppc/arith.lisp +++ b/assembly/ppc/arith.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/ppc/arith.lisp,v 1.8 2005/12/12 00:46:06 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/ppc/arith.lisp,v 1.9 2006/02/03 15:54:38 rtoy Rel $") ;;; ;;; ********************************************************************** ;;; @@ -43,7 +43,7 @@ (:temp ocfp any-reg ocfp-offset)) ; Clear the damned "sticky overflow" bit in :cr0 and :xer - (inst mcrxr :cr0) + (inst mtxer zero-tn) (inst or temp x y) (inst andi. temp temp 3) (inst bne DO-STATIC-FUN) @@ -90,7 +90,7 @@ (:temp ocfp any-reg ocfp-offset)) ; Clear the damned "sticky overflow" bit in :cr0 - (inst mcrxr :cr0) + (inst mtxer zero-tn) (inst or temp x y) (inst andi. temp temp 3) @@ -144,7 +144,7 @@ (:temp ocfp any-reg ocfp-offset)) ;; If either arg is not a fixnum, call the static function. But first ... - (inst mcrxr :cr0) + (inst mtxer zero-tn) (inst or temp x y) (inst andi. temp temp 3) diff --git a/compiler/ppc/insts.lisp b/compiler/ppc/insts.lisp index 83a049f90..bd2b420d0 100644 --- a/compiler/ppc/insts.lisp +++ b/compiler/ppc/insts.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/ppc/insts.lisp,v 1.16 2006/01/18 15:21:26 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/insts.lisp,v 1.17 2006/02/03 15:54:38 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1819,6 +1819,12 @@ about function addresses and register values.") (define-2-x-5-instructions nand 31 476) (define-4-xo-instructions divw 31 491 :cost 36) + +;; This instruction runs very slowly on a G5 (emulated?), so we don't +;; want to use this. Comment this instruction out so we don't use it +;; by accident, but leave it here so the next person doesn't have to +;; define it from scratch. Use mtxer zero-tn instead. +#+nil (define-instruction mcrxr (segment crf) (:printer x-18 ((op 31) (xo 512))) (:delay 1) -- GitLab