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