diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-08-19 10:19:29 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-08-19 10:19:29 -0400 |
commit | 082ad86132ddda2552f10640e176b321a76397a1 (patch) | |
tree | 0953a34a438befcd89489f081a2039af994bad9a /x64dll.asm | |
parent | d41b3c82119ea16588ab28ca24b5fb07515de60e (diff) | |
download | cryptopp-git-082ad86132ddda2552f10640e176b321a76397a1.tar.gz |
Fix missing _xgetbv for Visual Studio 2008 and below
Diffstat (limited to 'x64dll.asm')
-rw-r--r-- | x64dll.asm | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1964,5 +1964,19 @@ pop rsi ret
SHA256_HashMultipleBlocks_SSE2 ENDP
+ ALIGN 8
+ExtendedControlRegister PROC
+;; First paramter is RCX, and xgetbv expects the CTR in ECX
+;; http://www.agner.org/optimize/vectorclass/read.php?i=65
+DB 0fh
+DB 01h
+DB 0d0h
+;; xcr = (EDX << 32) | EAX
+and rax, 0ffffffffh
+shl rdx, 32
+or rax, rdx
+ret
+ExtendedControlRegister ENDP
+
_TEXT ENDS
END
|