summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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();