summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2015-10-14 18:21:25 +0200
committerManuel Mohr <manuel.mohr@kit.edu>2015-10-14 18:21:25 +0200
commit1da0df1e23c043ed011134648656c50b04f3f114 (patch)
treef3c962cad77c39aa68b5aa5858961c5f575f4e7b
parentc050707fe499b0cd3028b3329a99f848e4d786bd (diff)
Add ugly hack: set assumed stack alignment to 1.amd64-octopos
FIRM does not guarantee an aligned stack pointer. Therefore, the GC can miss pointers on the stack, unless we set the assumed stack alignment to 1. This slows down the collector quite a bit, so we should fix this properly as soon as possible.
-rw-r--r--include/private/gcconfig.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 008db1e..bb896b9 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -1043,7 +1043,8 @@
# define CPP_WORDSZ 64
# define ELF_CLASS ELFCLASS64
# else
-# define ALIGNMENT 4 /* Required by hardware */
+/* TODO: Change this back to 4! */
+# define ALIGNMENT 1 /* Required by hardware */
# define CPP_WORDSZ 32
# endif
/* Don't define USE_ASM_PUSH_REGS. We do use an asm helper, but */
@@ -1169,7 +1170,8 @@
# error This should be handled as X86_64
# else
# define CPP_WORDSZ 32
-# define ALIGNMENT 4
+/* TODO: Change this back to 4! */
+# define ALIGNMENT 1
/* Appears to hold for all "32 bit" compilers */
/* except Borland. The -a4 option fixes */
/* Borland. For Watcom the option is -zp4. */
@@ -2185,7 +2187,8 @@
# define ALIGNMENT 4
# define CPP_WORDSZ 32
# else
-# define ALIGNMENT 8
+/* TODO: Change this back to 8! */
+# define ALIGNMENT 1
# define CPP_WORDSZ 64
# endif
# ifndef HBLKSIZE