extra: revert the mod_expr changes for modify expression hooks
[smatch.git] / target-arm64.c
blobd92ab16be592ee3ccab9e309bc4e8cfdd20799a3
1 #include "symbol.h"
2 #include "target.h"
3 #include "machine.h"
6 static void init_arm64(const struct target *self)
8 if (arch_cmodel == CMODEL_UNKNOWN)
9 arch_cmodel = CMODEL_SMALL;
12 static void predefine_arm64(const struct target *self)
14 static const char *cmodels[CMODEL_LAST] = {
15 [CMODEL_LARGE] = "LARGE",
16 [CMODEL_SMALL] = "SMALL",
17 [CMODEL_TINY] = "TINY",
19 const char *cmodel = cmodels[arch_cmodel];
21 predefine("__aarch64__", 1, "1");
23 if (arch_big_endian)
24 predefine("__AARCH64EB__", 0, "1");
25 else
26 predefine("__AARCH64EL__", 0, "1");
28 if (cmodel)
29 predefine_strong("__AARCH64_CMODEL_%s__", cmodel);
32 const struct target target_arm64 = {
33 .mach = MACH_ARM64,
34 .bitness = ARCH_LP64,
36 .big_endian = 0,
37 .unsigned_char = 1,
38 .has_int128 = 1,
40 .wchar = &uint_ctype,
42 .init = init_arm64,
43 .predefine = predefine_arm64,