1
2 #ifndef __ALPHA_SPECIAL_INSNS_H
3 #define __ALPHA_SPECIAL_INSNS_H
4
5 enum implver_enum {
6 IMPLVER_EV4,
7 IMPLVER_EV5,
8 IMPLVER_EV6
9 };
10
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
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
28
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),
35 };
36
37 #define amask(mask) \
38 ({ unsigned long __amask, __input = (mask); \
39 __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \
40 __amask; })
41
42 #endif