diff options
Diffstat (limited to 'target-s390.c')
-rw-r--r-- | target-s390.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/target-s390.c b/target-s390.c index 277e0909..159a6b11 100644 --- a/target-s390.c +++ b/target-s390.c @@ -3,6 +3,11 @@ #include "machine.h" +static void predefine_s390(const struct target *self) +{ + predefine("__s390__", 1, "1"); +} + const struct target target_s390 = { .mach = MACH_S390, .bitness = ARCH_LP32, @@ -14,8 +19,19 @@ const struct target target_s390 = { .max_fp_alignment = 8, .target_64bit = &target_s390x, + + .predefine = predefine_s390, }; + +static void predefine_s390x(const struct target *self) +{ + predefine("__zarch__", 1, "1"); + predefine("__s390x__", 1, "1"); + + predefine_s390(self); +} + const struct target target_s390x = { .mach = MACH_S390X, .bitness = ARCH_LP64, @@ -26,4 +42,6 @@ const struct target target_s390x = { .max_fp_alignment = 8, .target_32bit = &target_s390, + + .predefine = predefine_s390x, }; |