directiv.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * This file is generated from ./asm/directiv.dat
  3. * by perfhash.pl; do not edit.
  4. */
  5. #ifndef DIRECTIV_H
  6. #define DIRECTIV_H 1
  7. #include "perfhash.h"
  8. enum directive {
  9. D_none,
  10. D_unknown,
  11. D_corrupt,
  12. D_ABSOLUTE,
  13. D_BITS,
  14. D_COMMON,
  15. D_CPU,
  16. D_DEBUG,
  17. D_DEFAULT,
  18. D_EXTERN,
  19. D_FLOAT,
  20. D_GLOBAL,
  21. D_STATIC,
  22. D_LIST,
  23. D_SECTION,
  24. D_SEGMENT,
  25. D_WARNING,
  26. D_SECTALIGN,
  27. D_PRAGMA,
  28. D_REQUIRED,
  29. D_EXPORT,
  30. D_GROUP,
  31. D_IMPORT,
  32. D_LIBRARY,
  33. D_MAP,
  34. D_MODULE,
  35. D_ORG,
  36. D_OSABI,
  37. D_SAFESEH,
  38. D_UPPERCASE,
  39. D_PREFIX,
  40. D_SUFFIX,
  41. D_GPREFIX,
  42. D_GSUFFIX,
  43. D_LPREFIX,
  44. D_LSUFFIX,
  45. D_LIMIT,
  46. D_OPTIONS,
  47. D_SUBSECTIONS_VIA_SYMBOLS,
  48. D_NO_DEAD_STRIP,
  49. D_MAXDUMP,
  50. D_NODEPEND,
  51. D_NOSECLABELS
  52. };
  53. extern const struct perfect_hash directive_hash;
  54. extern const char * const directive_tbl[40];
  55. static inline enum directive directive_find(const char *str)
  56. {
  57. return perfhash_find(&directive_hash, str);
  58. }
  59. static inline const char * directive_name(enum directive x)
  60. {
  61. size_t ix = (size_t)x - (3);
  62. if (ix >= 40)
  63. return NULL;
  64. return directive_tbl[ix];
  65. }
  66. static inline const char * directive_dname(enum directive x)
  67. {
  68. const char *y = directive_name(x);
  69. return y ? y : invalid_enum_str(x);
  70. }
  71. #endif /* DIRECTIV_H */