summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2012-09-17 13:10:47 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2012-10-30 10:20:22 +0100
commit62b37b9d362073a42e27275cf4e2b9826d042437 (patch)
tree58a623905c33c30ba7f4ef6ac3c3713d27b2a2db
parent47143e8e0c7b1da7d1e155a5776ce1d5d68c51ea (diff)
explicitely set long long/unsigned long long/double alignment on windows
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index c9182cb..7590a9b 100644
--- a/main.c
+++ b/main.c
@@ -985,7 +985,7 @@ static void init_types_and_adjust(void)
/* operating system ABI specifics */
if (firm_is_darwin_os(target_machine)) {
- if (machine_size == 32) {
+ if (is_ia32_cpu(target_machine->cpu_type)) {
props[ATOMIC_TYPE_LONGLONG].struct_alignment = 4;
props[ATOMIC_TYPE_ULONGLONG].struct_alignment = 4;
props[ATOMIC_TYPE_DOUBLE].struct_alignment = 4;
@@ -994,7 +994,11 @@ static void init_types_and_adjust(void)
props[ATOMIC_TYPE_LONG_DOUBLE].struct_alignment = 16;
}
} else if (firm_is_windows_os(target_machine)) {
- if (machine_size == 64) {
+ if (is_ia32_cpu(target_machine->cpu_type)) {
+ props[ATOMIC_TYPE_LONGLONG].struct_alignment = 8;
+ props[ATOMIC_TYPE_ULONGLONG].struct_alignment = 8;
+ props[ATOMIC_TYPE_DOUBLE].struct_alignment = 8;
+ } else if (machine_size == 64) {
/* to ease porting of old c-code microsoft decided to use 32bits
* even for long */
props[ATOMIC_TYPE_LONG] = props[ATOMIC_TYPE_INT];