directiv.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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_EXPORT,
  29. D_GROUP,
  30. D_IMPORT,
  31. D_LIBRARY,
  32. D_MAP,
  33. D_MODULE,
  34. D_ORG,
  35. D_OSABI,
  36. D_SAFESEH,
  37. D_UPPERCASE,
  38. D_PREFIX,
  39. D_SUFFIX,
  40. D_GPREFIX,
  41. D_GSUFFIX,
  42. D_LPREFIX,
  43. D_LSUFFIX,
  44. D_LIMIT,
  45. D_SUBSECTIONS_VIA_SYMBOLS,
  46. D_NO_DEAD_STRIP,
  47. D_MAXDUMP,
  48. D_NODEPEND,
  49. D_NOSECLABELS
  50. };
  51. extern const struct perfect_hash directive_hash;
  52. extern const char * const directive_tbl[38];
  53. static inline enum directive directive_find(const char *str)
  54. {
  55. return perfhash_find(&directive_hash, str);
  56. }
  57. static inline const char * directive_name(enum directive x)
  58. {
  59. size_t ix = (size_t)x - (3);
  60. if (ix >= 38)
  61. return NULL;
  62. return directive_tbl[ix];
  63. }
  64. static inline const char * directive_dname(enum directive x)
  65. {
  66. const char *y = directive_name(x);
  67. return y ? y : invalid_enum_str(x);
  68. }
  69. #endif /* DIRECTIV_H */