Commit 285d1d96 authored by Raymond Toy's avatar Raymond Toy

Refine features to include sse4 for popcnt

popcnt is part of sse4, not sse3/ssse3, so add feature detection for
sse4 to enable use of this instruciton.

sse4 and ppcnt was first available in the Nehalem architecture, Nov
2008 in the first gen of Core i7 and i5 processors.  The oldest
machines I have access to date from 2011.

Also remove :ssse3 because we don't currently define or use any ssse3
instructions.

Add a bit of documentation about popcnt.

Setup CI to build with a bootstrap file to get these instructions.
parent 9e764577
Pipeline #1427 passed with stage
in 16 minutes and 37 seconds
variables:
download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2020/04"
version: "2020-04-x86"
bootstrap: ""
bootstrap: "-B boot-2020-04"
linux-runner:
tags:
......
......@@ -2,4 +2,6 @@
#+x86
(pushnew :sse3 *features*)
#+x86
(pushnew :ssse3 *features*)
\ No newline at end of file
(pushnew :ssse3 *features*)
#+x86
(pushnew :sse4 *features*)
......@@ -42,12 +42,21 @@
(setf *features* (delete :x87 *features*))
(sys:register-lisp-feature :sse2))
#+sse3
(progn
(setf *features* (delete :x87 *features*))
(sys:register-lisp-feature :sse3))
#+ssse3
(progn
(setf *features* (delete :x87 *features*))
(sys:register-lisp-feature :sse3)
(sys:register-lisp-feature :ssse3))
#+sse4
(progn
(setf *features* (delete :x87 *features*))
(sys:register-lisp-feature :sse4))
#+(or darwin linux)
(sys:register-lisp-runtime-feature :relocatable-stacks)
......
......@@ -964,7 +964,7 @@
(:arg-types unsigned-num)
(:results (result :scs (unsigned-reg)))
(:result-types positive-fixnum)
(:guard (backend-featurep :sse3))
(:guard (backend-featurep :sse4))
(:generator 2
(inst popcnt result arg)))
......
......@@ -3201,6 +3201,7 @@
(define-regular-sse-inst paddq #x66 #xd4)
)
;; SSE4 instruction
(define-instruction popcnt (segment dst src)
(:printer ext-reg-reg/mem
((prefix #xf3) (op #xb8)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment