Linux 4.18.10
[linux/fpc-iii.git] / arch / alpha / include / asm / special_insns.h
blobca2c5c30b22ea78a4591a218732b4ad7c7864e17
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ALPHA_SPECIAL_INSNS_H
3 #define __ALPHA_SPECIAL_INSNS_H
5 enum implver_enum {
6 IMPLVER_EV4,
7 IMPLVER_EV5,
8 IMPLVER_EV6
9 };
11 #ifdef CONFIG_ALPHA_GENERIC
12 #define implver() \
13 ({ unsigned long __implver; \
14 __asm__ ("implver %0" : "=r"(__implver)); \
15 (enum implver_enum) __implver; })
16 #else
17 /* Try to eliminate some dead code. */
18 #ifdef CONFIG_ALPHA_EV4
19 #define implver() IMPLVER_EV4
20 #endif
21 #ifdef CONFIG_ALPHA_EV5
22 #define implver() IMPLVER_EV5
23 #endif
24 #if defined(CONFIG_ALPHA_EV6)
25 #define implver() IMPLVER_EV6
26 #endif
27 #endif
29 enum amask_enum {
30 AMASK_BWX = (1UL << 0),
31 AMASK_FIX = (1UL << 1),
32 AMASK_CIX = (1UL << 2),
33 AMASK_MAX = (1UL << 8),
34 AMASK_PRECISE_TRAP = (1UL << 9),
37 #define amask(mask) \
38 ({ unsigned long __amask, __input = (mask); \
39 __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \
40 __amask; })
42 #endif /* __ALPHA_SPECIAL_INSNS_H */