From 7121b6b31a9c6300af775348fb390b75bef6b1d8 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Wed, 4 Aug 2010 17:59:25 +0000 Subject: [PATCH] 1.0.41.3: ppc: Implement memory-barrier-vops. * Add the VOPs for inlining the various memory-barriers. * Add the memory-barrier-vops feature to local-target-features on ppc systems in make-config.sh. --- make-config.sh | 2 +- src/compiler/ppc/system.lisp | 35 +++++++++++++++++++++++++++++++++++ version.lisp-expr | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/make-config.sh b/make-config.sh index 84b34f5..30cb6fb 100644 --- a/make-config.sh +++ b/make-config.sh @@ -329,7 +329,7 @@ elif [ "$sbcl_arch" = "mips" ]; then tools-for-build/determine-endianness >> $ltf elif [ "$sbcl_arch" = "ppc" ]; then printf ' :gencgc :stack-allocatable-closures :stack-allocatable-lists' >> $ltf - printf ' :linkage-table :raw-instance-init-vops' >> $ltf + printf ' :linkage-table :raw-instance-init-vops :memory-barrier-vops' >> $ltf if [ "$sbcl_os" = "linux" ]; then # Use a C program to detect which kind of glibc we're building on, # to bandage across the break in source compatibility between diff --git a/src/compiler/ppc/system.lisp b/src/compiler/ppc/system.lisp index 301da10..678b682 100644 --- a/src/compiler/ppc/system.lisp +++ b/src/compiler/ppc/system.lisp @@ -234,3 +234,38 @@ (inst lwz count count-vector offset) (inst addi count count 1) (inst stw count count-vector offset)))) + +;;;; Memory barrier support + +#!+memory-barrier-vops +(define-vop (%compiler-barrier) + (:policy :fast-safe) + (:translate %compiler-barrier) + (:generator 3)) + +#!+memory-barrier-vops +(define-vop (%memory-barrier) + (:policy :fast-safe) + (:translate %memory-barrier) + (:generator 3 + (inst sync))) + +#!+memory-barrier-vops +(define-vop (%read-barrier) + (:policy :fast-safe) + (:translate %read-barrier) + (:generator 3 + (inst sync))) + +#!+memory-barrier-vops +(define-vop (%write-barrier) + (:policy :fast-safe) + (:translate %write-barrier) + (:generator 3 + (inst sync))) + +#!+memory-barrier-vops +(define-vop (%data-dependency-barrier) + (:policy :fast-safe) + (:translate %data-dependency-barrier) + (:generator 3)) diff --git a/version.lisp-expr b/version.lisp-expr index 3bda1f8..ee49504 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.41.2" +"1.0.41.3" -- 1.7.10.4