Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/mty-makai/config.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 192 - (show annotations) (download) (as text)
Mon May 26 06:29:35 2008 UTC (15 years, 10 months ago) by notanpe
File MIME type: text/x-chdr
File size: 2081 byte(s)
シーズン 2 に向けて
1 /***********************************************************************
2 *
3 * file: config.h
4 *
5 * $Id$
6 *
7 */
8
9 #ifndef CONFIG_H__
10 #define CONFIG_H__
11
12 /* 力の限りスレッドを起動 */
13 #define USE_MT 1
14
15 #define USE_DT 0
16
17 /* シーケンシャルサーチ用閾値
18 2004版に基づくものでは 3 */
19 #define KEY_SHUFFLE_POS 4
20
21 #include "mtytypes.h"
22
23 /****************************************************************
24 *
25 * USE_MMX ... i686-mmx
26 *
27 * P6, K7 以前のアーキテクチャではこれを利用すべし。
28 *
29 */
30
31 #if defined(USE_MMX)
32
33 #define N_STRIDE 6
34 typedef uint64_t WS_T;
35 typedef uint32_t ALU_T;
36 typedef int8_t SALTOFS_T;
37
38 #define REQUIRED_CAPS (CPUID_CMOV | CPUID_MMX)
39
40 #define CRYPT64_CLOBBER /* "%ecx", "%edx", */
41
42 /****************************************************************
43 *
44 * USE_64 ... x64-alu
45 *
46 * AMD64 K8(Opteron, Athlon64)では、XMMよりもALUの方が速い。
47 * 64-bit ALU に対して 3-issue.
48 *
49 */
50
51 #elif defined(USE_64) /* 64-bit ALU */
52
53 #define N_STRIDE 6
54 typedef uint64_t WS_T;
55 typedef uint64_t ALU_T;
56 typedef int8_t SALTOFS_T;
57
58 #define REQUIRED_CAPS (CPUID_CMOV)
59
60 #define CRYPT64_CLOBBER /* "%rcx", "%rdx",*/ "%r8", "%r9",
61
62 /****************************************************************
63 *
64 * USE_64_XMM ... x64-xmm
65 *
66 * Core2 Microarchitecture は、
67 * 128-bit XMM 演算を効率よく処理できる。
68 *
69 */
70
71 #elif defined(USE_64_XMM)
72
73 #define N_STRIDE 7
74 typedef DQWORD_T WS_T;
75 typedef uint64_t ALU_T;
76 typedef int32_t SALTOFS_T;
77
78 #define REQUIRED_CAPS (CPUID_CMOV | CPUID_SSE | CPUID_SSE2)
79
80 #define CRYPT64_CLOBBER /* "%rcx", "%rdx",*/
81
82 /****************************************************************
83 *
84 * USE_XMM ... default
85 *
86 * SSE2対応と言われているアーキテクチャでは妥当。
87 *
88 */
89
90 #else /* XMM */
91
92 #define N_STRIDE 7
93 typedef DQWORD_T WS_T;
94 typedef uint32_t ALU_T;
95 typedef int32_t SALTOFS_T;
96
97 #define REQUIRED_CAPS (CPUID_CMOV | CPUID_MMX | CPUID_SSE | CPUID_SSE2)
98
99 #define CRYPT64_CLOBBER /* "%ecx", "%edx", */
100
101 #endif
102
103 #include <limits.h>
104 #define ALU_BITS (CHAR_BIT * sizeof(ALU_T))
105
106 #endif /* CONFIG_H__ */
107
108 /*
109 * Local Variables:
110 * tab-width: 4
111 * End:
112 *
113 * EOF */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Rev URL

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26