special_insns.h 886 B

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