Add framework for yet another assembler module dubbed "cpuid." Idea
is to have a placeholder to small routines, which can be written only
in assembler. In IA-32 case this includes processor capability
identification and access to Time-Stamp Counter. As discussed earlier
OPENSSL_ia32cap is introduced to control recently added SSE2 code
pathes (see docs/crypto/OPENSSL_ia32cap.pod). For the moment the
code is operational on ELF platforms only. I haven't checked it yet,
but I have all reasons to believe that Windows build should fail to
link too. I'll be looking into it shortly...
diff --git a/crypto/amd64cpuid.pl b/crypto/amd64cpuid.pl
new file mode 100644
index 0000000..baf801d
--- /dev/null
+++ b/crypto/amd64cpuid.pl
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+
+$output=shift;
+$win64a=1 if ($output =~ /win64a\.[s|asm]/);
+open STDOUT,">$output" || die "can't open $output: $!";
+
+print<<___ if(defined($win64a));
+TEXT SEGMENT
+PUBLIC OPENSSL_rdtsc
+ALIGN 16
+OPENSSL_rdtsc PROC NEAR
+ rdtsc
+ shl rdx,32
+ or rax,rdx
+ ret
+OPENSSL_rdtsc ENDP
+TEXT ENDS
+END
+___
+print<<___ if(!defined($win64a));
+.text
+.globl OPENSSL_rdtsc
+.align 16
+OPENSSL_rdtsc:
+ rdtsc
+ shl \$32,%rdx
+ or %rdx,%rax
+ ret
+.size OPENSSL_rdtsc,.-OPENSSL_rdtsc
+___