summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-02-13 07:44:19 +0100
committerMatthias Braun <matze@braunis.de>2017-02-13 09:02:11 +0100
commitf0093f525c8db84e2df3fd315d997a719c0bfdce (patch)
tree3376b3c1bb24acaff48073e35cbbffa0bb9c9e18 /src
parent1601575c1ac8cad0004a3964e1f2a94b8becd971 (diff)
predefs: Define ILP32
Diffstat (limited to 'src')
-rw-r--r--src/driver/predefs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/driver/predefs.c b/src/driver/predefs.c
index 12fc1b2..b70a8e8 100644
--- a/src/driver/predefs.c
+++ b/src/driver/predefs.c
@@ -332,6 +332,11 @@ void add_predefined_macros(void)
&& get_atomic_type_size(ATOMIC_TYPE_INT) == 4) {
add_define("_LP64", "1", false);
add_define("__LP64__", "1", false);
+ } else if (get_atomic_type_size(ATOMIC_TYPE_LONG) == 4
+ && get_ctype_size(type_void_ptr) == 4
+ && get_atomic_type_size(ATOMIC_TYPE_INT) == 4) {
+ add_define("_ILP32", "1", false);
+ add_define("__ILP32__", "1", false);
}
ir_mode *float_mode = be_get_mode_float_arithmetic();