blob: 88d3452b21f028dcb3b5c7ccef4e6730a38803f0 [file] [log] [blame]
David Howellsec221202012-03-28 18:11:12 +01001#ifndef __ALPHA_SPECIAL_INSNS_H
2#define __ALPHA_SPECIAL_INSNS_H
3
4enum implver_enum {
5 IMPLVER_EV4,
6 IMPLVER_EV5,
7 IMPLVER_EV6
8};
9
10#ifdef CONFIG_ALPHA_GENERIC
11#define implver() \
12({ unsigned long __implver; \
13 __asm__ ("implver %0" : "=r"(__implver)); \
14 (enum implver_enum) __implver; })
15#else
16/* Try to eliminate some dead code. */
17#ifdef CONFIG_ALPHA_EV4
18#define implver() IMPLVER_EV4
19#endif
20#ifdef CONFIG_ALPHA_EV5
21#define implver() IMPLVER_EV5
22#endif
23#if defined(CONFIG_ALPHA_EV6)
24#define implver() IMPLVER_EV6
25#endif
26#endif
27
28enum amask_enum {
29 AMASK_BWX = (1UL << 0),
30 AMASK_FIX = (1UL << 1),
31 AMASK_CIX = (1UL << 2),
32 AMASK_MAX = (1UL << 8),
33 AMASK_PRECISE_TRAP = (1UL << 9),
34};
35
36#define amask(mask) \
37({ unsigned long __amask, __input = (mask); \
38 __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \
39 __amask; })
40
41#endif /* __ALPHA_SPECIAL_INSNS_H */