Permalink
Browse files

1.0.41.4: x86-64: Implement memory-barrier-vops.

  * Add the VOPs for the various memory-barriers.

  * Add the memory-barrier-vops feature to local-target-features on
x86-64 in make-config.sh.
  • Loading branch information...
1 parent 7121b6b commit 6ab1e0d948c9b571db7da0e7491cf8d7ca256601 Alastair Bridgewater committed Aug 4, 2010
Showing with 37 additions and 2 deletions.
  1. +1 −1 make-config.sh
  2. +35 −0 src/compiler/x86-64/system.lisp
  3. +1 −1 version.lisp-expr
View
@@ -315,7 +315,7 @@ elif [ "$sbcl_arch" = "x86-64" ]; then
printf ' :stack-allocatable-closures :stack-allocatable-vectors' >> $ltf
printf ' :stack-allocatable-lists :stack-allocatable-fixed-objects' >> $ltf
printf ' :alien-callbacks :cycle-counter :complex-float-vops' >> $ltf
- printf ' :float-eql-vops :inline-constants ' >> $ltf
+ printf ' :float-eql-vops :inline-constants :memory-barrier-vops' >> $ltf
elif [ "$sbcl_arch" = "mips" ]; then
printf ' :linkage-table' >> $ltf
printf ' :stack-allocatable-closures :stack-allocatable-vectors' >> $ltf
@@ -361,3 +361,38 @@ number of CPU cycles elapsed as secondary value. EXPERIMENTAL."
(inst inc (make-ea :qword :base count-vector
:disp (- (* (+ vector-data-offset index) n-word-bytes)
other-pointer-lowtag)))))
+
+;;;; 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 mfence)))
+
+#!+memory-barrier-vops
+(define-vop (%read-barrier)
+ (:policy :fast-safe)
+ (:translate %read-barrier)
+ (:generator 3
+ (inst lfence)))
+
+#!+memory-barrier-vops
+(define-vop (%write-barrier)
+ (:policy :fast-safe)
+ (:translate %write-barrier)
+ (:generator 3
+ (inst sfence)))
+
+#!+memory-barrier-vops
+(define-vop (%data-dependency-barrier)
+ (:policy :fast-safe)
+ (:translate %data-dependency-barrier)
+ (:generator 3))
View
@@ -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.3"
+"1.0.41.4"

0 comments on commit 6ab1e0d

Please sign in to comment.