Created
March 25, 2019 11:02
-
-
Save stassats/40c688ba2ed9c8a7813a829a9b05589b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(sb-c:defknown simd-ref ((simple-array double-float (*)) sb-int:index) | |
(simd-pack double-float) | |
(sb-c:movable sb-c:flushable sb-c:always-translatable) | |
:overwrite-fndb-silently t) | |
(define-vop (simd-ref) | |
(:translate simd-example::simd-ref) | |
(:policy :fast-safe) | |
(:args (array :scs (descriptor-reg)) | |
(index :scs (any-reg))) | |
(:arg-types * positive-fixnum) | |
(:results (value :scs (double-sse-reg))) | |
(:result-types simd-pack-double) | |
(:generator 5 | |
(inst movapd value (make-ea-for-float-ref array index 0 16 | |
:scale (ash 2 (- word-shift n-fixnum-tag-bits)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment