head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.14
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.12
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.10
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	netbsd-7-2-RELEASE:1.1.1.1
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	netbsd-7-1-2-RELEASE:1.1.1.1
	pgoyette-compat:1.2.0.8
	pgoyette-compat-base:1.2
	netbsd-7-1-1-RELEASE:1.1.1.1
	perseant-stdc-iso10646:1.2.0.6
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.4
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	netbsd-7-1:1.1.1.1.0.34
	netbsd-7-1-RELEASE:1.1.1.1
	netbsd-7-1-RC2:1.1.1.1
	netbsd-7-nhusb-base-20170116:1.1.1.1
	bouyer-socketcan:1.2.0.2
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	netbsd-7-1-RC1:1.1.1.1
	pgoyette-localcount-20161104:1.2
	netbsd-7-0-2-RELEASE:1.1.1.1
	localcount-20160914:1.1.1.1
	netbsd-7-nhusb:1.1.1.1.0.32
	netbsd-7-nhusb-base:1.1.1.1
	pgoyette-localcount-20160806:1.1.1.1
	pgoyette-localcount-20160726:1.1.1.1
	pgoyette-localcount:1.1.1.1.0.30
	pgoyette-localcount-base:1.1.1.1
	netbsd-7-0-1-RELEASE:1.1.1.1
	openssl-1-0-1t:1.1.1.1
	openssl-1-0-1s:1.1.1.1
	openssl-1-0-1r:1.1.1.1
	openssl-1-0-1q:1.1.1.1
	netbsd-7-0:1.1.1.1.0.28
	netbsd-7-0-RELEASE:1.1.1.1
	netbsd-7-0-RC3:1.1.1.1
	netbsd-7-0-RC2:1.1.1.1
	openssl-1-0-1p:1.1.1.1
	netbsd-7-0-RC1:1.1.1.1
	openssl-1-0-1o:1.1.1.1
	openssl-1-0-1n:1.1.1.1
	openssl-1-0-1m:1.1.1.1
	openssl-1-0-1k:1.1.1.1
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.1.0.26
	netbsd-7-base:1.1.1.1
	openssl-1-0-1i:1.1.1.1
	openssl-1-0-1h:1.1.1.1
	yamt-pagecache-base9:1.1.1.1
	yamt-pagecache-tag8:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	openssl-1-0-1g:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.24
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	openssl-1-0-1f:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.16
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.22
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	khorben-n900:1.1.1.1.0.20
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.18
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	openssl-1-0-1e:1.1.1.1
	openssl-1-0-1d:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.14
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.12
	tls-maxphys-base:1.1.1.1
	matt-nb6-plus:1.1.1.1.0.10
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	openssl-1-0-1c:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	netbsd-6:1.1.1.1.0.8
	netbsd-6-base:1.1.1.1
	yamt-pagecache-base3:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.6
	yamt-pagecache-base:1.1.1.1
	openssl-1-0-1-stable-SNAP-20110605:1.1.1.1
	cherry-xenmp:1.1.1.1.0.4
	cherry-xenmp-base:1.1.1.1
	bouyer-quota2-nbase:1.1.1.1
	bouyer-quota2:1.1.1.1.0.2
	bouyer-quota2-base:1.1.1.1
	matt-mips64-premerge-20101231:1.1.1.1
	OPENSSL_SNAP_20091226:1.1.1.1
	matt-premerge-20091211:1.1.1.1
	OPENSSL_SNAP_20090805:1.1.1.1
	OPENSSL_SNAP_20090710:1.1.1.1
	OPENSSL:1.1.1;
locks; strict;
comment	@// @;


1.2
date	2016.10.14.16.23.22;	author spz;	state dead;
branches;
next	1.1;
commitid	KSNaMLG5BFGR98qz;

1.1
date	2009.07.19.23.06.07;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2009.07.19.23.06.07;	author christos;	state Exp;
branches
	1.1.1.1.30.1;
next	;

1.1.1.1.30.1
date	2016.11.04.14.42.35;	author pgoyette;	state dead;
branches;
next	;
commitid	2m1JRwYmpwPkOOsz;


desc
@@


1.2
log
@merge for openssl 1.0.2j
@
text
@//
// gettsc.inl
//
// gives access to the Pentium's (secret) cycle counter
//
// This software was written by Leonard Janke (janke@@unixg.ubc.ca)
// in 1996-7 and is entered, by him, into the public domain.

#if defined(__WATCOMC__)
void GetTSC(unsigned long&);
#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
#elif defined(__GNUC__)
inline
void GetTSC(unsigned long& tsc)
{
  asm volatile(".byte 15, 49\n\t"
	       : "=eax" (tsc)
	       :
	       : "%edx", "%eax");
}
#elif defined(_MSC_VER)
inline
void GetTSC(unsigned long& tsc)
{
  unsigned long a;
  __asm _emit 0fh
  __asm _emit 31h
  __asm mov a, eax;
  tsc=a;
}
#endif      

#include <stdio.h>
#include <stdlib.h>
#include <openssl/sha.h>

extern "C" {
void sha1_block_x86(SHA_CTX *ctx, unsigned char *buffer,int num);
}

void main(int argc,char *argv[])
	{
	unsigned char buffer[64*256];
	SHA_CTX ctx;
	unsigned long s1,s2,e1,e2;
	unsigned char k[16];
	unsigned long data[2];
	unsigned char iv[8];
	int i,num=0,numm;
	int j=0;

	if (argc >= 2)
		num=atoi(argv[1]);

	if (num == 0) num=16;
	if (num > 250) num=16;
	numm=num+2;
	num*=64;
	numm*=64;

	for (j=0; j<6; j++)
		{
		for (i=0; i<10; i++) /**/
			{
			sha1_block_x86(&ctx,buffer,numm);
			GetTSC(s1);
			sha1_block_x86(&ctx,buffer,numm);
			GetTSC(e1);
			GetTSC(s2);
			sha1_block_x86(&ctx,buffer,num);
			GetTSC(e2);
			sha1_block_x86(&ctx,buffer,num);
			}

		printf("sha1 (%d bytes) %d %d (%.2f)\n",num,
			e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2);
		}
	}

@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@import new openssl snapshot
@
text
@@


1.1.1.1.30.1
log
@Sync with HEAD
@
text
@@

