-
-
Notifications
You must be signed in to change notification settings - Fork 288
/
core-arch.h
150 lines (133 loc) · 4.05 KB
/
core-arch.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
* Copyright (C) 2022-2024 Colin Ian King
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef CORE_ARCH_H
#define CORE_ARCH_H
/* Arch specific, x86-64 */
#if defined(__x86_64__) || defined(__x86_64) || \
defined(__amd64__) || defined(__amd64)
#define STRESS_ARCH_X86 (1)
#define STRESS_ARCH_X86_64 (1)
#endif
/* Arch specific, x86-32 (i386 et al) */
#if defined(__i386__) || defined(__i386)
#define STRESS_ARCH_X86 (1)
#define STRESS_ARCH_X86_32 (1)
#endif
/* Arch specific, ARC64 */
#if defined(__ARC64__) || defined(__ARC64)
#define STRESS_ARCH_ARC64
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific, ARM */
#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) || \
defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_7__) || \
defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || \
defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || \
defined(__ARM_ARCH_8A__) || defined(__aarch64__)
#define STRESS_ARCH_ARM (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific RISC-V */
#if defined(__riscv) || \
defined(__riscv__)
#define STRESS_ARCH_RISCV (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific, IBM S390 */
#if defined(__s390__)
#define STRESS_ARCH_S390 (1)
#define STRESS_OPCODE_SIZE (48)
#define STRESS_OPCODE_MASK (0xffffffffffffULL)
#endif
/* Arch specific LoongArch64 */
#if defined(__loongarch64) || \
defined(__loongarch__)
#define STRESS_ARCH_LOONG64 (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific PPC64 */
#if defined(__PPC64__)
#define STRESS_ARCH_PPC64 (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific PPC (32 bit ) */
#if defined(__PPC__)
#define STRESS_ARCH_PPC (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific M68K */
#if defined(__m68k__) || \
defined(__mc68000__) || \
defined(__mc68010__) || \
defined(__mc68020__)
#define STRESS_ARCH_M68K (1)
#define STRESS_OPCODE_SIZE (16)
#define STRESS_OPCODE_MASK (0xffffUL)
#endif
/* Arch specific SPARC */
#if defined(__sparc) || \
defined(__sparc__) || \
defined(__sparc_v9__)
#define STRESS_ARCH_SPARC (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific SH4 */
#if defined(__SH4__)
#define STRESS_ARCH_SH4 (1)
#define STRESS_OPCODE_SIZE (16)
#define STRESS_OPCODE_MASK (0xffffUL)
#endif
/* Arch specific ALPHA */
#if defined(__alpha) || \
defined(__alpha__)
#define STRESS_ARCH_ALPHA (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
/* Arch specific HPPA */
#if defined(__hppa) || \
defined(__hppa__)
#define STRESS_ARCH_HPPA (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#undef HAVE_SIGALTSTACK
#endif
/* Arch specific Kalray VLIW core */
#if defined(__KVX__) || \
defined(__kvx__)
#define STRESS_ARCH_KVX (1)
#endif
/* Arch specific MIPS */
#if defined(__mips) || \
defined(__mips__) || \
defined(_mips)
#define STRESS_ARCH_MIPS (1)
#define STRESS_OPCODE_SIZE (32)
#define STRESS_OPCODE_MASK (0xffffffffUL)
#endif
#endif